Mason James [Wed, 21 Sep 2022 11:38:59 +0000 (23:38 +1200)]
Bug 28493: Make koha-passwd display the username
to test...
1/ run command
$ sudo koha-passwd dev1
Password for dev1: CraZyPa$$WoRD!!
Press enter to clear the screen...
^C
2/ apply patch
3/ run command again, note 'username' section
$ sudo koha-passwd dev1
Username for dev1: koha_dev1 <<<<<<<<<<<<
Password for dev1: CraZyPa$$WoRD!!
Press enter to clear the screen...
^C
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4ce7f8c49378c0e32212493779b07e3ab369dee7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ba51185fbd00591a72af41782ba2d6fd956b731a) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 3ab7309e6738ab082610c875b3dccb82b3c20642) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Fri, 14 Jul 2023 11:36:47 +0000 (07:36 -0400)]
Bug 34279: Don't enforce overduefinescap unless it is greater than 0
When creating a circ rule, we can set overduefinescap to blank or 0 and no cap is enforced. If we edit that rule, the blank/0 is converted to "0.00" which perl considers true, thus zero-ing out any calculated fine.
Considering we've always ignored an overdue fines cap of 0, we should also ignore 0.00. However, perl is evaluating it as a string which makes it true instead of false as 0 is.
Test Plan:
1) Apply the first patch ( unit tests )
2) prove t/db_dependent/Circulation/CalcFine.t
3) Note the test fails
4) Apply the second patch as well
5) prove t/db_dependent/Circulation/CalcFine.t
6) Note the test passes
Test Plan 2:
1) Create an all/all/all rule with an overduefinescap of 0.00, with a
daily fine. Enable CalculateFinesOnReturn
2) Backdate a checkout so it is overdue
3) Return this item, note the lack of a fine
4) Apply this patch set
5) Backdate a checkout and return it again
6) Note the fine is generated!
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1763b136d1dcd3348ee26bca8663823b5a05f07c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 662da18be2ec7c6c9348a704d9ad8ac955292862) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 7cb0a706cc5f69d63eccb735160827acd73cd9d2) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Fri, 14 Jul 2023 11:32:11 +0000 (07:32 -0400)]
Bug 34279: Unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8096ec9fff44a04c8ff32525499652116d1a8ad0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e360c5637c1f910100e10f049823fda01f588d9) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 0860515897fbcedab332c093cc32193d37bed465) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Aleisha Amohia [Tue, 13 Jun 2023 05:29:22 +0000 (17:29 +1200)]
Bug 33992: Only consider the date when auto-expiring problematic recalls
This patch carries this fix into the misc/cronjobs/recalls/expire_recalls.pl cronjob so that recalls are automatically expired when they have been waiting a problematic number of days, not considering hours, as expected.
To test, follow the test plan from the first patch. This will set you up with a waiting problematic recall.
Run the cronjob manually
perl misc/cronjobs/recalls/expire_recalls.pl
Refresh your 'Recalls awaiting pickup' page. Your problematic recall should be gone/expired.
Expiration dates will apply when expiring any 'unfulfilled' recall i.e. newly requested, overdue to be returned, and awaiting pickup.
Sponsored-by: Auckland University of Technology Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d2052088ec62654f81154be0b9916b8e8630891) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a5f4d170117e264ed15c8cf40c799ddfd2f6299) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 4afe2a2b0a45a672bcae5df445b67ef9b4bb1e65) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2bc251cfdd1efdf6d0f7f299838ff067744ff17b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 835bc43d316df60882c09fb201caa75e027af0a3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit f26621c8c4ba4fbb292af99708d43593ea2e1e15) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Phil Ringnalda [Sat, 1 Jul 2023 15:41:15 +0000 (08:41 -0700)]
Bug 34182: Don't set biblio.serial based on biblio.seriestitle in AddBiblio
A misunderstanding of the intention of some dead code that probably wanted
to set biblio.series (which doesn't exist) left us setting biblio.serial
if biblio.seriestitle was set. The only thing series and serial have in
common is the first four letters. We shouldn't set serial on something
with a series (unless someone also sets serial on it, of course).
Test plan:
1. Administration - MARC bibliographic framework - Actions button next to
Default framework - MARC structure
2. In the Search for tag input type 942 and click search
3. Actions button next to 942 - Edit subfields
4. Tab s - check the checkbox for Editor, uncheck the checkbox for
Collapsed - Save changes
5. Cataloging - New record
6. Click in the input for 000 and hold down Tab until you get past 008
to fill in mandatory default values, then type any character in 040
subfield c
7. Tab 2 - In 245 subfield a type Series not serial
8. Tab 4 - In 490 subfield a type any character
9. Tab 9 - Set the value of subfield c to Books
10. Click save and leave the tab open to keep the biblionumber
11. Cataloging - New record - repeat step 6
12. Tab 2 - In 245 subfield a type Serial not series
13. Tab 9 - Set the value of subfield c to Books - Type 1 in subfield s
14. Click save, the biblionumber should be one higher than the first one
15. Reports - Create from SQL
16. Type something in Report name, paste in the SQL
SELECT biblio.serial, biblio.seriestitle, biblio.title FROM biblio WHERE
biblionumber IN ("","")
and put your first biblionumber in the first "", your second in the
second.
17. Save report - Run report
18. Series not serial should have a blank in the serial column and the
character you typed in the seriestitle column; Serial not series
should have a 1 in the serial column and a blank in the seriestitle
column.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 65b7c6731933f4b7d284ac07b9adab0d2ada60ca) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a25c9e637bbf7f053d5d65d21d9b7f139c316524) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit fe01585fcb31d5d39842bbc13128cbc08b03b4eb) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 5 Jul 2023 10:41:09 +0000 (12:41 +0200)]
Bug 34184: Add empty option for suggestion "document type"
Currently when editing a suggestion, the document type will preselect to the
first entry as we don't have an empty entry.
This can lead to data errors easily.
Test plan:
Create a new suggestion
=> Notice that "document type" is empty by default, pick one
Edit it again
=> Notice that the value is kept and empty can be picked, pick empty
Edit again
=> Empty is selected and saved in DB
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6485f244e085fe48b796dd64178659c2f4a5e4ba) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cb07de6a981eab80c5764beb35c774e2910359ca) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 339e7adfbc8b450505f4db050932a876dff7c964) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 7 Jun 2023 13:20:40 +0000 (13:20 +0000)]
Bug 33939: Preserve order budget dropdowns and default budget dropdowns seperately
The dropdowns have different hints after bug 22802. We need to preserve those when adding
or hiding inactive budgets
To test:
1 - Add some inactive budgets to Koha
2 - Use the settings and file from bug 22802 to stage a file and begin adding to basket
3 - When adding to basket test the 'Show inactive funds' on both the 'Select to import' tab and the 'Default accounting details' tab
4 - Ensure the dropdown hints/defaults don't change when hiding/showing budgets
5 - Confirm inactive budgets are correctly shown/hidden
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 80eb5ac35be44afd5547e1fa75da475d88f95612) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a2a8cb86b0d73f11514158a29e1b0780f89a04a6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 2ee83ca00a1f1a395970d25480b3b0a9ed9df086) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0f2a47d3ce78a23aa1b6253188108ce3b0047b7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8ecb70b338d0456a73af92d50baf765bcff4f9a7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 08741b6426189a74180f25a42bdfe1344df5d154) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Sat, 13 May 2023 12:18:02 +0000 (12:18 +0000)]
Bug 33727: Merge both Calendar tests
The old t tests become part of the first subtest.
Test plan:
Run the new t/db_dependent/Calendar.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eb6c36c4ddec644619486dea5520e89ef9af56b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6052f0ec174fb313998cbe38d17af4d9390ee319) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 419d3ca563cbfc3cb2bad831cd774f98b4368a79) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Sat, 13 May 2023 12:06:55 +0000 (12:06 +0000)]
Bug 33727: Groundwork for Calendar.t
Update test while removing need for Test::DBIx::Class.
Test plan:
Run t/Calendar.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e736a5d5f342325651944772b74c5ace1b8814f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d77d59fcaa5cb9fbbf92777282101a64ef285df7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 06a85cc89442eeb0f189063ada80c5e8e02c5bd3) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 34243: Fix copy/pasted city references in api tests
Two occurrences.
Just comments.
Test plan:
Read the patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 308d75d05d105a5829c98617b5229fae587c32f3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ef77656e85fc959ad7f769a8dbdec8e97cc23c4e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit d2498373a617fd2ba8f937cfa58850e381021690) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Phil Ringnalda [Tue, 27 Jun 2023 22:34:59 +0000 (15:34 -0700)]
Bug 34097: Prevent clicking ellipsis for dateaccessioned plugin from scrolling up
Test plan:
1. Find a record with several items (in ktd "MacLaren's Gaelic
self-taught" will do nicely
2. Click the Edit button next to one of the items
3. Click the "..." to the right of "d - Date acquired" and verify that the
page doesn't scroll up to the top, and that the current date is
inserted in the field
4. Click the "..." to the right of "w - Price effective from" and verify
that the page doesn't scroll up and the current date is inserted
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3824547e5c92328ae0bf54939ec0315b1cbfd98f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2d24f269f5692ca333d55381e337a5a90a1d1eff) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 9fef2b809d3da374f8b11f3e99a8bed3b4900647) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Matt Blenkinsop [Tue, 23 May 2023 14:01:40 +0000 (14:01 +0000)]
Bug 33808: Add aria-labels in reports-toolbar.inc
This patch adds an aria-label and an aria-haspopup to Download buttons
identified as non-descriptive in accessibility testing
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8fac9067b2494cca29a2b2147b78366c6a53bcf6) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eba9d136604c6f2e4847d4d71396b08b22e6b4d5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 1e621efd8c4c6c9c6d8e80b7a03031ff00ffad00) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
i.e. `">test<a ...` was successfully injected into the HTML.
I'm attaching a quick patch I've used to patch up our instance. It just indiscriminately URI-escapes all parameter keys. I didn't decode them back since as far as I understand all valid keys do not contain special characters.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Amit Gupta [Wed, 22 Jan 2020 16:07:22 +0000 (21:37 +0530)]
Bug 22990: Add CSRF protection to boraccount, pay and suggestion
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Test plan would have been nioe.
Tested by changing MAX_AGE with suggestions.
Bug 22990: Fix for shelves table
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 22990: Fix template toolkit syntax issues in shelves_results.tt
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 22990: (follow-up) Fix suggestion.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 13 Apr 2022 12:55:04 +0000 (13:55 +0100)]
Bug 30524: Core CSRF checking code
Split out from bug 22990 as requested.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30524: Add xt/find-missing-csrf.t
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30524: (QA follow-up) Polishing xt script
Test plan:
Run it again. Same results?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 30524: Unit tests
Test plan:
Run t/Output.t
Run t/db_dependent/Auth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 33717: Typo in search_for_data_inconsistencies.pl
This patch corrects a typo in the output of
search_for_data_inconsistencies.pl when a bibliographic record has no
title.
The patch also replaces biblio to bibliographic record in the same
sentence for terminology consistency.
To test:
- Have a bibliographic record without a title
- Run misc/maintenance/search_for_data_inconsistencies.pl
- Read output, make sure the sentence is correct
Marcel de Rooy [Fri, 12 May 2023 08:33:32 +0000 (08:33 +0000)]
Bug 33335: (QA follow-up) Polishing and comments
Just send the codes and descriptions only to client.
Adding a few comments to the reduce construction.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 020bc275b05ac74bacf52325ac2933d56e78ce32) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 7eabf447d1df66c31743c1160e3d83b771ea1b54) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 2 May 2023 14:26:45 +0000 (16:26 +0200)]
Bug 33335: Use To.json to serialize
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 706cd01ba264ded1f0b237c74f90e511acf2de81) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 04ce17dde59e4d5994bbe7547465e9b9afbd6e4e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marius Mandrescu [Tue, 28 Mar 2023 16:04:49 +0000 (12:04 -0400)]
Bug 33335: Fix JavaScript error on the MARC overlay rules page
The "MARC overlay rules" page doesn't display or work correctly
if a patron category code contains a "-".
This happens because of the JavaScript function in
"marc-overlay-rules.tt" line 469. This causes an error
"Uncaught SyntaxError: missing : after property id".
Test plan:
1. Go to Administration > Patron categories.
2. Make sure you don't have a patron category code that contains
a "-".
3. Go to Administration > Record overlay rules.
4. The table should display correctly, and you can add, edit
and delete rules.
5. Return to Patron categories.
6. Add a new patron category with a "-" in the patron category code.
7. Return to Record overlay rules page:
=> The page doesn't display and load correctly (see the attached
image) - the normal DataTables header and footer aren't
displayed, and you can't add, edit or delete overlay rules.
=> If you turn on web developer tools, an error is displayed in the
console: "Uncaught SyntaxError: missing : after property id".
8. Apply the patch.
9. Repeat the step 7, the Record overlay rules page should now
display correctly and you should be able to add, edit and
delete rules.
10. Sign off.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 351e380a1468562fe579e53d85389ccc9a53418e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit e528bb87c7375eaecf11f265b258e2b7ec5ce202) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Aleisha Amohia [Tue, 8 Nov 2022 19:58:22 +0000 (19:58 +0000)]
Bug 32129: Use patron category when checking if item can fill recall
This patch uses the patron category of the patron who requested the most
relevant recall to check for more specific circulation rules relating to
recalls. This ensures that patrons who are allowed to place recalls are
able to fill their recalls, especially when recalls are not generally
available for all patron categories.
To test:
1) Go to Administration -> System preferences and enable UseRecalls
2) Go to Administration -> Circulation and fines rules and set a general
All/All rule and a Category A/Itemtype A rule. All values can be set
however you like except for these recalls rules:
All/All rule:
Recalls allowed: 0
Recalls per record: 0
On shelf recalls allowed: if any unavailable
Category A/Itemtype A rule:
Recalls allowed: 5
Recalls per record: 5
On shelf recalls allowed: if any unavailable
3) Find an item of Itemtype A. Check it out to Patron A (any category).
4) Log into the OPAC as Patron B (of Category A). Find the item and
place a recall on the item.
5) Back in the staff interface, check in the item. This should trigger
the recalls process so you can allocate the item to Patron B's recall,
however the pop-up box to confirm the recall does not show. This is the
bug.
6) Apply the patch and restart services
7) Check in the item again. Confirm the pop-up box to confirm the recall
shows and you are able to allocate the item to Patron B's recall.
8) Confirm tests pass t/db_dependent/Koha/Item.t
Sponsored-by: Auckland University of Technology Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cf8c901f55efa586a3c8b01cbbe4780c0fb028b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit a104de7094271e1d107754432a37fdc7a12cfca3) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 23 Dec 2022 15:04:26 +0000 (15:04 +0000)]
Bug 30687: Allow pickup location to be forced when override is allowed
This is Julian's patch with some extra cleanup to reduce repeated code
If AllowHoldPolicyOverride is enabled and only some pickup locations are
available, you still have the possibility to force one of the others
pickup locations.
But when there are zero pickup locations available, that is not
possible.
This patch change that by always displaying the list of pickup locations
when AllowHoldPolicyOverride is enabled.
Test plan:
1. Apply patch
2. Disable AllowHoldPolicyOverride
3. Create a biblio B with an item I at library A.
4. Configure this library A to not be a pickup location
5. Add a "Default holds policy by item type" for item I type where "Hold
pickup library match" is "item's home library"
6. Try to place a hold on biblio B
You should not be able to place a hold because there is no valid
pickup locations
7. Enable AllowHoldPolicyOverride
8. Try to place a hold on biblio B
You should now see all valid pickup locations in a dropdown list
(with an exclamation mark in front of each option) with none selected
by default
9. Verify you can place a title-level hold and an item-level hold
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab93008da7eb61b697e4586c679b88c2eebaacd0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit e3c420ab768f64838daf0dc65afac00fb58aabc5) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Fri, 28 Apr 2023 18:30:19 +0000 (14:30 -0400)]
Bug 32993: Holds priority changed incorrectly with dropdown selector
Test Plan:
1) Find record with at least 3 holds.
2) Change first holds priority as 2, Priority is changed to 3.
3) Try to change priority back to 1, Priority is changed to 2.
4) Apply this patch
5) Reload the page
2) Change first holds priority as 2, Priority is changed to 2.
3) Try to change priority back to 1, Priority is changed to 1.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Hinemoea Viault <hinemoea.viault@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d9e4cf41515234d8d61c369aab3c3e49be1ac3d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c15e5068d0f13ed8a8b105ea1ed795030be6c269) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Fri, 17 Feb 2023 13:01:02 +0000 (13:01 +0000)]
Bug 32995: Pass user agent string for OverDrive fulfillment
This patch simply adds the string Koha/VERSION to the fulfillment
request
TO test:
1 - Have OverDrive credentials for testing
2 - Enable all the overdrive options in system preferences
3 - Sign in to opac with an overdrive user and verify you can checkout
and download titles
4 - Sign off
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Not tested with OverDrive, but change looks harmless enough.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d27a3419cce0da8c90d3f57d54d6cf669001f210) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 0e086450109133ac00cbabf4874965b4f4f0216f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 10 May 2023 09:04:13 +0000 (11:04 +0200)]
Bug 33677: Remove verbose option from koha-worker man
Signed-off-by: Magnus Enger <magnus@libriotech.no>
No more mention of verbose.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1bd49fcab8c03ee43aba12cae8661f9488c9bf8d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 165c945b5eade8ddae60715781fc1a406b95e499) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 10 May 2023 08:41:30 +0000 (10:41 +0200)]
Bug 33642: Fix 'No log found.' in viewlog
It should ease translatability and remove an extra space.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ca450dbc97f12f895830e17562a2e118996a439) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 68412485e3eda514b4a5ca4c333dcae357978368) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c39d4ea0b26cfb2448902546115efef1cfe2ca6e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 42b8f60bf4e61744df794750d2fbef9fb4f1013c) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 32627: Calculate expirationdate relative to waitingdate
Hold::set_waiting should calculate the MaxPickupDelay expiration date
based on waitingdate rather than the current date, to avoid resetting
the expirationdate on a hold that was already waiting.
To test:
1. Place a hold and check in the item so the hold will be set to Waiting
2. Confirm that the expiration date is correct based on the
ReservesMaxPickupDelay setting
3. Adjust your system clock to one day later
4. Check in the item again and confirm the hold
5. Note that the expiration date has changed
7. Apply patch and restart_all
8. Repeat steps 1-4. Confirm that the expiration date is calculated
correctly, and does not change when the item is checked in again
9. Reset your system clock to the current date
10. Set ExcludeHolidaysFromMaxPickupDelay to Use the Calendar
11. Add an upcoming holiday to the calendar
12. Repeat steps 1-4. Confirm the expiration date correctly accounts for
the holiday, and does not change when the item is checked in again
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 21bcb6e85520b2963dde71c21ccb5e169c4c5e28) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 276bd9af4b9b64b1c5f870c7b59f33039f7e28fa) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 9 May 2023 08:11:19 +0000 (10:11 +0200)]
Bug 33684: Make mandatory date fields required when editing a patron
Date fields in BorrowerMandatoryField are not required by the validation
form when a new patron is added or modified.
This is because the 'required' prop does not exist on the input element
when the flatpickr instance is created.
We should either add it in the DOM directly (tt), but it will require to
do it "manually" for each date fields, or add it when we add it to the
inputs. This patch implements the second option.
Test plan:
1. Add "dateofbirth" to syspref BorrowerMandatoryField.
2. Add patron and leave date of birth input field empty.
3. Save.
=> Form is not submitted and you are asked to fill in a date of birth
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
https://bugs.koha-community.org/show_bug.cgi?id=33648 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ae3d6f1876c807aed3efb908f538e83bf6376abe) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 112f27f61e5f1cff42becbe7027df603f1348d5e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Mon, 24 Apr 2023 23:53:50 +0000 (23:53 +0000)]
Bug 33512: (follow-up) Check item count before adding add/edit button
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7f1cc03e3e16c4538126d69e43f5d9ff67ecd0b2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 7c4ac22a4215274115128eb7b2cf3e0ac9cb7adf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 15 Apr 2023 23:14:10 +0000 (23:14 +0000)]
Bug 33512: (QA follow-up) Remove 'Click to' from buttons
This is following recommendations from accessibility
guidelines. It being a link or button already indicates
that you need to click it. We don't need to spell it out.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0eec6e9f244f95bf8d6f1bf105f0d706456bb316) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit e82262442d988aa19df600a17ae7edac4bbc4564) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 12 Apr 2023 22:28:06 +0000 (22:28 +0000)]
Bug 33512: Change text and add button classes on serial-edit page
To test:
1. Create a subscription
2. Make sure that you choose "Create an item record" when receiving the serial and associate it with a record.
3. Fill out the numbering pattern stuff and save the subscription.
4. Receive and change the status to arrived. Doing so will make the item subfields appear for editing.
5. Add some stuff, like a barcode, and Save.
6. Now, if you have made a mistake, you may want to edit the serial/item. Check the edit box and click 'Edit serials '
7. For your issue that has already arrived click 'Click to add item'. The item record from before appears.
8. Apply patch.
9. Try 6 & 7 again. The existing items should now read 'Click to edit item'
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f04de4636aaf04582a20e7848da0773d0a045c30) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 42bb21540207a1df252fbc493a838b0d39f64892) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Thu, 4 May 2023 13:59:03 +0000 (13:59 +0000)]
Bug 33302: (QA follow-up) Rephrase errors to be more user friendly
These error message will show within the patron account. The goal
of this patch is to make them a little more user friendly avoiding
'patron' and 'hold group' terminology :)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e599c790fa0a2e5909916b4f3335d2a7b2a20a9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ddae00994002fa79c2f766ab714cc0b0d48f450a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 28 Mar 2023 11:31:42 +0000 (11:31 +0000)]
Bug 33302: Send and display errors when a hold cannot be placed on the OPAC
This patch changes opac-reserve.pl to return the error(s) when placing
a hold as a pipe delimited list which is then translated to a message for the
user
To test:
1 - Find a record with items available on the opac
2 - Click 'place hold' and set things up, but do not confirm
3 - In staff client, do something to make hold invalid:
- Make item damaged
- Make library not a pickup location
- Place other holds for patron up to limit
- etc.
4 - Confirm hold on OPAC
5 - You are sent to patron's account, hold is not placed
6 - There is little or no message to explain why
7 - Apply patch
8 - Repeat
9 - Now errors are clear
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ee318d20f5506e9b4c955633f0e9eddc9c171f29) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 28db837abbf781dfd9ad096f070f32771bfac457) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 17 Apr 2023 19:24:18 +0000 (19:24 +0000)]
Bug 33206: Unit test
Signed-off-by: Nick <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 82eb5d7d262a686ad6d3573e3e86a57e051c4f4c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit be7df5dc0db7d02597ddeec2899a17fb63613536) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Sat, 11 Mar 2023 16:03:10 +0000 (17:03 +0100)]
Bug 33206: Bad title__sort made of multifield 245
In MARC 21, having title search field defined in mappings.yaml as 245abp
(more than one subfield), the Koha generated title__sort will have not
only $a, but also other subfields cut by ind2 characters, i.e.:
This is because copying an array of pointers in Perl causes you to
point to the same (anonymous) element. Therefore, the intended
modification only for subfield "a"
(Koha/SearchEngine/Elasticsearch.pm, ~line 1157) causes in fact
modification for all the subfields sharing the same mapping
definition and introduction of the nonfiling_characters_indicator to
all subfields 245 when processing 245abp. And this is obviously not
what is intended and results (in some cases) with bad sort order
when sorting by titles.
Test plan
=========
1. Have a standard Koha ES installation. In mappings.yaml
you should have 245abp for title search field.
2. Insert / download / modify a record with 245 $b or $p,
an article at the beginning of the title, and correctly
set 2nd indicator. For instance:
Signed-off-by: Nick <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1330bd7c8d2ac256c93e38b95a6040c3fda3db92) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit d210a26306eb43869f5115b65072182c1b6a4127)
Katrin Fischer [Fri, 21 Apr 2023 19:46:19 +0000 (19:46 +0000)]
Bug 33586: Fix sequence of fields for memberresultst in table configuration
The sequence of options actually matters, not the name.
Library and category were switched, this patch fixes it and
now it should all hide/show as expected:
* Go to administration > table configuration
* Hide library in memberresultst
* Go to patron search and search
* Verify that category was hidden instead
* Apply patch
* Verify now label and columns for library and category
match with configuration.
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ef95d91424d8c45228a1ffb30ed1388a086ca84) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 61ba63a52c1a0550f390d22122ce8cc90f1079ad) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Philip Orr [Tue, 25 Apr 2023 10:34:09 +0000 (10:34 +0000)]
Bug 28315: Remove duplicate function definition
This patch removes the unnecessary second definition of the JS function PopupMARCFieldDoc from addbiblio.tt.
To test:
1. Apply the patch
2. Check that addbiblio.tt contains only one function definition for PopupMARCFieldDoc
3. Navigate to "Cataloging" -> "Add MARC record"
4. Check that after clicking on the question mark symbol next to any MARC field, the loc description of that MARC field is opened in a new tab
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2b880e57bb1ccd4b8270ec8bfdcdc86e18a2e48) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 4a9be2cbe3da28bb73b1268f27d6ea0c7710f3fe) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Mon, 17 Apr 2023 00:34:05 +0000 (00:34 +0000)]
Bug 32232: Ignore DST when calculating patron age
This change calculates patron age using the floating timezone, so that
datetimes missing midnight don't cause fatal errors in the comparison.
Test plan:
0. Apply patch
1. Change <timezone></timezone> in koha-conf.xml to include Canada/Eastern
2. koha-plack --restart kohadev
3. Create a patron, setting the date of birth to one of these three dates
- 1947-04-27
- 1948-04-25
- 1949-04-24
4. Save the patron
5. Patron detail page loads instead of producing fatal error
Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5771e6f463c72e17d42478c9970df1c7fb2286f8) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit beaf8076cf3a801cd680f794fee65c9e58f950df) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Tue, 11 Apr 2023 20:41:28 +0000 (20:41 +0000)]
Bug 33233: Don't allow disabled attribute to remain when using browser's back button
To test:
1. Go to OPAC advanced search and do a search using only one of the inputs.
2. Once the search is complete use the browser's back button to return to the advanced search.
3. Notice the unused inputs are disabled.
4. Apply patch and try again. Now the inputs should not be disabled.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3811bb4381e34db7da1fd4593560fef519c4fde4) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c9b0106bd9d24ac7d11529023630f801284cd63b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
David Cook [Tue, 2 May 2023 00:16:30 +0000 (00:16 +0000)]
Bug 33645: Make koha-foreach return 0 if it completes successfully
This patch adds an "exit 0" to the end of koha-foreach, so that it
returns a successful exit code if it reaches the bottom of the script
without errors.
Test plan:
0) `koha-foreach echo`
1) `echo $?`
2) Note that the exit status is 1
3) Apply patch
4) `./debian/scripts/koha-foreach echo`
5) `echo $?`
6) Note that the exit status is 0
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e8a187eb7422419592899ea12903f9ff29f96cfd) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ef3985df0673304117f8c90fc673482d81410c06) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Fri, 17 Mar 2023 22:42:47 +0000 (22:42 +0000)]
Bug 33196: Generalize pseudonymization system preference description
The Pseudonymization system preference description in
the staff interface is: "Disable/Enable pseudonymization
to comply with GDPR for personal information. Patrons and
transactions will be copied to a separate table for
statistics purpose."
GDPR is a European Union (and, at time of writing, UK) law;
it makes the system preference look irrelevant for
libraries outside this area. However, this is not correct:
pseudonymization may be useful for libraries anywhere.
This generalized the system preference description and
only uses GDPR as an example instead of the only purpose.
It also updates the fields listed to more closely reflect
the labels on the patron form.
To test:
* Search for "Pseudonymization" in the systme preferences
* Verify that the description of the system preference is
very GDPR
* Apply patch
* Verify the system preference description is improved
https://bugs.koha-community.org/show_bug.cgi?id=33196 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 54cdae763365636e71a231432d5afff637796963) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b6a8c6ce59173ab95494a8a1571c55591af4c59a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 4 Feb 2023 23:54:22 +0000 (23:54 +0000)]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set
Makes sure the focus is in the first form field when adding
a new OAI set: setSpec
To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a5034792c5269ef11f2acddd3d6055886cded06) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b9abcea244ecc43762fab6a607ea3564b2da1291) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Marcel de Rooy [Fri, 17 Feb 2023 08:33:41 +0000 (08:33 +0000)]
Bug 32990: Prevent deadlock in _update_batch_record_counts
Resolves:
C4::ImportBatch::_update_batch_record_counts(): DBI Exception: DBD::mysql::st execute failed: Deadlock found when trying to get lock; try restarting transaction at /usr/share/koha/C4/ImportBatch.pm line 392
See also bug 32558.
Test plan:
If you apply 32558 first, run multiple processes that stage a marc import.
Without this patch, you can trigger the deadlock.
With this patch, it works.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a6d10dc312cd6fe5e33a72af6259ac9b05f6db7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e838f4327aa0d9da51f607691db5adea260b20f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sun, 5 Feb 2023 00:17:01 +0000 (00:17 +0000)]
Bug 31410: Set focus for cursor to Server name when adding a new Z39.50/SRU server
This makes sure that the focus is in the first form field when
adding a new Z39.50 or SRU server.
To test:
* Administration > Z39.50/SRU servers
* Add a new server for each
* Verify the focus is not in the form
* Apply patch
* Verify the focus is now in the first form field
* Edit an existing server
* Verify the focus is not in the form
Not having the focus when editing is to avoid accidental changes.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2504a282b5890168616c1a87206f8762c38a660d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 71f20a1c3513759393a9bae3654eb295fcb4016e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 3 May 2023 10:58:22 +0000 (10:58 +0000)]
Bug 30367: (follow-up) Same adjustment for gitlab
This adds the same update for gitlab code. I was unable to trigger the error,
however, I confirm searching for 'PayPal' returns a result after this patch
as well as before.
JD amended patch: fix indentation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88000fbccbcfe707ee3d8bf72f549c1ac11be3f3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1d5d0cbde7fcc5afebd7c7d98aabded55d046c34) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2. Restart all services:
$ restart_all
3. Search for the term 'barclaycard'
The search will give an error:
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/JSON.pm line 190
4. Apply patch
5. Repeat
6. No error
Note: The barclaycard plugin won't install even though it is returned as of this note - the plugin needs an update I believe, I don't think it's a Koha issue Signed-off-by: David Nind <david@davidnind.com>
JD amended patch: fix indentation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b12aa543e2e2fe1c46eca4a0e07daa369b033793) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 63289fb34ca01a18ad0dca9c064ac07923a99f19) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Thu, 27 Apr 2023 11:23:03 +0000 (11:23 +0000)]
Bug 33626: Remove invalid params
This patch reformats the params passed to scroll_helper as defined here:
https://metacpan.org/pod/Search::Elasticsearch::Client::7_0::Scroll
To test:
1 - perl misc/maintenance/compare_es_to_db.pl
2 - It dies:
[Param] ** Unknown param (scroll_in_qs) in (search) request. , called from sub Search::Elasticsearch::Client::7_0::Direct::scroll_helper at misc/maintenance/compare_es_to_db.pl line 55.
3 - Apply patch
4 - Repeat
5 - It succeeds!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daa92a937193321c49c97cca5bad8809d7889d21) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 38666a8bd784dafe2934bdbd6fb3f1693f9ae442) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 3 May 2023 09:16:14 +0000 (11:16 +0200)]
Bug 32412: Do not reload COCE image for biblio
We do not want to fetch again the new image for the biblio record. We
only want to fetch those for the shelf browser.
Note that the third parameter 'covernewwindow' was not used.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 13dccaaf055b49473c1cc4a6ac34c0a23eb182a0) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3da06bdd73fa576b735303205c8124d8580b6ec4) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Tue, 4 Apr 2023 21:50:39 +0000 (21:50 +0000)]
Bug 32412: Empty coce container before appending image
To test:
1. Apply patch and clear browser cache
2. Turn on Coce for the OPAC.
3. OPACShelfBrowser must be on
4. Find a record that returns a cover image and open it's detail page.
5. Use the next/previous navigation links in the OPACShelfBrowser
6. Notice that no extra image is being added to the biblio-cover-slider.
7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser.
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fec0bd18ae1e982232bf5b5d7d000c2bc6984589) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b53a7fef584eedf3f134c6442a3a7de3bf8f00a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sun, 23 Apr 2023 21:16:52 +0000 (21:16 +0000)]
Bug 32701: Fix I18N JavaScript libraries on self checkout help page
The help page was missing the fixes from bug 28488. The missing
libraries are causing a JavaScript error on the page and likely
other issues.
To test:
* Make sure WebBasedSelfCheck is activated and configured
Note: In ktd you don't need to configure anything, it's already set up.
* In the OPAC, go to:
/cgi-bin/koha/sco/sco-main.pl
* Click on the link to the help in the top right corner
* Verify you see the error in the console:
jQuery.Deferred exception: __ is not defined
* Apply patch
* Restart things
* Reload the page
* Veriy the errors are gone
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 289f0e80517713814fb0752b932fe612ba2d0bc4) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c92a40cf1ffcda1dda65fa358dc6c46794c271d) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Sun, 9 Apr 2023 18:25:41 +0000 (18:25 +0000)]
Bug 33470: Don't calculate overridden hold limits
This patch can largely be checked in the code to ensure it makes sense, it
moves a conditional up one level for the two different checks that could prevent holds
To test:
1 - Attempt to place a hold via the REST API with an invalid pickup location
Set pickup location as no in branches to make this easy
2 - Confirm you get an error
3 - Attempt again with header (bug 27760):
x-koha-override: any
4 - Hold is placed
5 - Repeat 1-4 above but with an item that cannot be held
6 - Apply patch
7 - Repeat 1-4 above
8 - Results should be the same
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3c31212df4d1917004a20998f47777ef0aea35d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 309e1b0cb8df29265919080e8c772fe3997a69e3) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 10 May 2023 05:37:57 +0000 (07:37 +0200)]
Bug 33702: Prevent ILL requests to be modified by somebody else
Same as previous patch, but for 'update' and 'cancreq'.
We remove the redirect, but here we only want to focus on the security
fix.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Confirmed. Without this patch a patron can modify and cancel any ILL
request in the OPAC. With this patch the patron is redirected to the
404 page if modification or cancellation is attempted.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Tue, 9 May 2023 13:37:51 +0000 (15:37 +0200)]
Bug 33702: Patrons should only see their own ILLs in the OPAC
To reproduce:
- Enable the ILL module
- Install the FreeForm backend as described here:
https://wiki.koha-community.org/wiki/ILL_backends
- Go to the ILL module and add two different ILL requests by
clicking on "New ILL request" and entering the necessary details.
- Make sure you connect the two requests to two *different* patrons
in the field marked "Card number, username or surname"
- Make the two titles different, and make a not of which title is
connected to which patron
- Log in as one of the two patrons who now have an ILL request each,
in the OPAC
- Go to the "Interlibrary loan requests" tab
- Click on "View" for the request connected to this patron. The URL
will look like something like this:
http://<opac>/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=2
- Now change the number at the end to correspond to the the ILL request
connected to the *other* patron
- Verify you can see the details of an ILL request conncted to another
patron than the patron you are logged in as
To test:
- Apply the patch
- Restart all the things if you are testing with ktd
- Reload the detail view of the ILL request that belongs to the patron
you are not logged in as
- Verify you are redirect to the 404 page and can not see the details
of the request that belongs to the patron you are not logged in as
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Wed, 8 Feb 2023 23:28:59 +0000 (23:28 +0000)]
Bug 32921: Honor SelfCheckTimeout when modal is open
To test:
1. Set the 'SelfCheckTimeout' system preference to something low for testing.
2. Make sure 'SelfCheckReceiptPrompt' is set to 'Show'.
3. Log in to SCO and press finish but leave the modal open.
4. Wait until the 'SelfCheckTimeout' time has expired, nothing happens.
5. Apply patch and try again. You should be logged out when SelfCheckTimeout expires.
Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com>
JD amended patch - fix indentation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e074ffa6be15c97e6724041b12d930ed70855f1d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d75bf866bb05e0a8ab457ed3f48a2e84243bfb9) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4ab67c196debf387f2053c3916f4cdac76901db3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 53722e6c3172d0e04d5e7b8d2576a93ddeded2f0) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Thu, 4 May 2023 13:08:54 +0000 (13:08 +0000)]
Bug 33262: Unit tests
prove t/db_dependent/Biblio.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 177b53d79492f7636c5e9e37a6e1f3c3f8fa8707) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f79ae8283d10852bf2974efd2ea0f4bff5c63d6b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Thu, 4 May 2023 12:15:36 +0000 (12:15 +0000)]
Bug 33262: Store the biblionumber of a deleted record in the order line
When a bibliographic record is deleted and linked to an order
in the acquisition module, the biblionumber in the order line is
currently deleted as well. This makes it impossible to tell what
was ordered in the first place. This is a big issue for libraries
that need to be able to track how money was spent over long periods
of time.
With this patch the biblionumber of the deleted record will be moved
to a new column deleted_biblionumber in the order line, keeping the FK
on biblionumber.
To test:
* Apply patch, run dataase update
* Create a order/basket in the acquisitions module
* Order several things, you can use existing records from the sample data
* Make sure you order one of the records at least twice
* Take a look at the aqorders table in your database, using a report:
SELECT biblionumber, deleted_biblionumber, ordernumber from aqorders;
* From the catalog, delete the items on the records and then the records
Note: There is a warning about attached orders warning about consequences
for acquisitions. I have chosen to keep it at this point in time, as
there are still visible side effects of deleting the record, like bug 10758.
* Re-run the report and compare results to the first run. deleted_biblionumber
should now be filled with the biblionumber of the deleted record.
biblionumber should be NULL/empty.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c8faeac4cd4cfdeab04c25bedb534d3823bbe83c) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 508fbb0fafc7efe6b03af624784492eb4edee8a0) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Thu, 4 May 2023 13:23:31 +0000 (13:23 +0000)]
Bug 33262: Add deleted_biblionumber column to aqorders table
This adds a new column deleted_biblionumber to the aqorders table.
This will allow us to store the biblionumber of a deleted record,
so we will still be able to tell what has been ordered once the
record is deleted.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0cf7687e833986d95ce9fa49bdb33252944fbbea) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 16464ef65688f8566db38766698d25b6df1d063e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Mon, 1 May 2023 22:13:02 +0000 (22:13 +0000)]
Bug 32253: Load all CodeMirror lines initially when using advanced editor
To test:
1. Have advanced editor turned on.
2. Load a record with many lines and see that not all the lines appear until you click on the visible ones.
3. Apply patch and try again
4. All lines should load.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 827df32798cd8046d62cb6630fd33395d78fb3ef) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 278d0bf18a6169b7b5b6b304df318b38fca1894c) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Wed, 12 Apr 2023 20:59:34 +0000 (20:59 +0000)]
Bug 33505: Improve styling of scan index page
This patch makes some changes to the 'scan index' page.
* Updates second h1 heading "Scan index:" to h2 level heading "Scan index"
* Removes table from the search form
* Moves search index pull down and search term into one line
* Reorders options with search index first and search term after, matching
the advanced search form
* Removes the catalog results toolbar from the top, card hold etc. are not needed
here.
* Fixes doubled up id attribute: scan-index by turning one into scan-index-term.
To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* Check display, especially search options, options at the top of the page etc.
* Apply patch
* Verify changes listed above
* Regression test the normal search results, all should look the same with and without patch.
* If you think the scan index page is nicer now - sign off.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 358cb91a72e85d6ec0e85b8d88b1793062113bd3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a0d28c0620da21e18af660acde0b9e2eb223333e) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Wed, 12 Apr 2023 20:19:38 +0000 (20:19 +0000)]
Bug 33506: Fix false index for series and keep selected index on scan index page
The pull down with search options had the wrong index
linked to the Series entry: su instead of se
To test:
* Go to advanced search in staff interface
* Activate 'More options'
* Check checkbox for scan indexes
* Switch to author (especially when using Elasticsearch)
* Search for C
* Verify search results link to authors using c
* Switch to series
* Verify search results use 'su' for subject
* Verify that search option pull down always jumps back to first
entry: Any word
* Apply patch
* Verify the search results for series now use correct index se
* Verify that coming from advanced search, the correct search option is selected
* Verify that changing the search option also keeps the selection after searching
Note: with Elasticsearch and default configuration author, title and series will
give you results.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 970fe62f785ce06ca57a8bae8936158c632069ea) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d2d6761e95827edb0d6d56df65a44f39aa397d62) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 33597: (follow-up) Two other occurrences for holdfor
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f99bcfb6521835e6d21cad3c83973aefb0f16cf4) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41557555a9ceff4bc70e4fa1a53d270d3acf7143) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Resolve:
Cookie “holdfor” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it.
Did not see warning for holdforclub. But since it is created with Lax, we should remove it with Lax.
Test plan:
Similar to previous patch. Check console on logout page.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e5e311cb0c88b9223ce98d685668962edc7baee) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8567143eea4dde52cce0c856e3c12a6154eda0b) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 33597: Get rid of warning about intranet_bib_list
Resolve:
Cookie “intranet_bib_list” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it.
basket_22.1200022.js:67:65
Test plan:
Do not apply this patch.
Logout from staff.
Check browser console warnings.
Apply this patch.
Login and logout again.
Check warnings again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95de1f3e92947f157dbbbf789d88beb48645648b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d11c9fec33f6ebb072094437240408bd8f300a9f) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Fri, 28 Apr 2023 15:53:19 +0000 (15:53 +0000)]
Bug 33634: Correct anchors in system preference submenu
To test:
1. Go to Koha Administration -> Global system preferences
2. Go to a tab with a few headings like Circulation
3. Click on a heading in the sidebar navigation under Circulation that takes you a bit down the page, like Recalls
4. Notice this anchor link does not work, you are not taken to the recalls preferences
5. Apply patch
6. Try again, the links should take you to the proper place.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d1278aa14bf2a161df87c9d73f105b2c96c5022) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b0a196e115e6cb07ebc12653463d52a4a3252a30) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Wed, 12 Apr 2023 10:49:51 +0000 (11:49 +0100)]
Bug 33504: Update patron_to_html to deal with null
In the patron_to_html function we were dealing explicitly with the case
where patron may be passed undefined, but forgetting that it may be
returned as 'null' from the api too. Changing from `( patron ===
undefined )` to `( patron == null )` is the recommended approach for
detecting 'undefined or null' in javascript.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Martin's test plan from Bugzilla:
To test.
1) Use ILS-DI to renew an checkout
2) View the circulation history for the item
3) Click the 'View' button next to the count of renewals
4) Note that the modal just stalls at 'Retrieving renewals'
5) Apply the patch
6) Now the 'retrieving renewals' message should list the renewals instead.
Note that step 2 should be something like "Go to the "Circulation
history" of the patron.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 744ac4825ba9a346e2ad1c8e413d3d9423658512) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 31db36fb34843efe42ef3257d3d187c8611a53f7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sun, 19 Mar 2023 22:06:12 +0000 (22:06 +0000)]
Bug 33156: Fix JS error on batch patron modification
The error currently breaks some of the functionality for
updating patron attributes linked to AV values. With the
bug, the input field will not change to the AV list when selected
from the pull down of patron attributes.
It was probably bug 29648 that changed the data structure
without adapting for the additional data that is pushed
to the object for the patron attribute columns.
To test:
* Create several extended patron attributes
* Make sure at least one is linked to an AV
* Repeatable and unique patron attributes can't be
updated in batch patron modification, so you need some
that can be modified.
* Go to tools > batch patron modification
* Enter one or more cardnumbers to update
* Verify the table is missing columns, export and configure
* Verify when selecting the AV tied patron attribute, the input
remains a text one
* Apply patch
* Both should work now as expected
Note: I believe there are some more errors on this page,
but they should better be handled separately. So with this
patch we push configuration again for each column to table
columns, but the very last column keeps missing from the
columns settings.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ca83d4b8c5581646af50d8378003b4233ad5fa2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1cd959c68b6e463fc504410919f009879e1e34f8) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Mason James [Thu, 27 Apr 2023 14:15:05 +0000 (02:15 +1200)]
Bug 33629: allow pbuilder to use network via build-git-snapshot
to test...
- build master packages, observe failure :(
debian/build-git-snapshot -d -v 22.12.00-24~git1 -D dev -b base_22.12.00+deb10 --noautoversion
"/usr/bin/perl" build-resources.PL
yarn install v1.22.19
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
- apply patch
- build master packages, observe success :)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0a0c6554d72ea5acec1a6c4fe63b77e9383e2e56) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e65aa28abe52341277861551d4a356eaacc6c389) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 33603: Fix misc/maintenance/search_for_data_inconsistencies.pl when biblio.biblionumber on control field
Since bug 29486, misc/maintenance/search_for_data_inconsistencies.pl search for biblio.biblionumber in MARC record with $record->subfield().
This fails when field is a control field (< 10).
Idem for biblioitems.biblioitemnumber
Test plan :
1.0) On a UNIMARC database (biblio.biblionumber is on 001)
1.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Without patch you get error : Control fields (generally, just tags below 010) do not have subfields, use data()
=> With patch no error
2.0) On a MARC21 database (biblio.biblionumber is on 999c)
2.1) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see no error
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc1695ba96b79d85fe778af1c60b092b149dd449) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9971011fb9271ee2c8bae9e979c15b51a7fdaad2) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30352: Add a comment to the substatus translation
The tric of combining the XPath union operator (|) with the
value-of instruction works as a sort of ternary operation.
The value-of only picks the string value of the first node
from the union in document order.
So, if there is a translation, it will be the first node. If there
is no translation, the original substatus will be used. Note that
there will be no translation for authorised values like Staff
collection, etc.
Test plan:
None. Just comments.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c652ed4b1dcc204d36921d55120d91c758803632) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 105b9fc3138fd606e850d7efcd28f1269b52c53a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 30352: Allow translation of Not for loan in OPAC XSLT results
Note: Test plan below can be followed in English. If you would like
to see the vernacular results, you need to update PO files and
translate 'Not for loan', and update templates (xslt files) accordingly.
The bootstrap PO does not yet include that string without %s suffix
in the current codebase.
Test plan:
[1] Apply this patch and make the following change in
MARC21slim2OPACResults.xsl, line 1207.
Change:
<status english="Not for loan">Not for loan</status>
to:
<status english="Not for loan">NOT for loan</status>
Important: Change text inside, not the attribute!
Restart all.
[2] Pick a biblio, add some items with different statuses: Checked out,
Damaged, Not for loan, Staff collection.
[3] Make it appear in a OPAC results display (not detail).
[4] You should see the different statuses, including NOT for loan. The
uppercase NOT serves to prove that the string has been translated. Also
verify that you see Staff collection as-is.
[5] Bonus: Toggle with values in Reference_NFL_Statuses to move results
from Reference section to Not available section v.v.
[6] Revert the change from step 1. Sign off :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d7e3cec32dffa5f96de696f8707bf8e015c49d2) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9871a02b26bea775b03090d65e633a260ea10baf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Mon, 13 Mar 2023 14:06:52 +0000 (15:06 +0100)]
Bug 33210: (Bug 31963 follow-up) No hold fee message on OPAC should be displayed when there is no fee
After resolving Bug 31963 everything works as expected when there is
hold fee defined (!= 0). But in case when the fee for given patron
category is set to 0.00, the user will always see the message "You will
be charged a hold fee of 0,00 ...", which is obviously not intended.
This is because categories.reservefee is returned from database as
'0.000000' and as such, without type casting, is interpreted as string
in Perl. Prior to Bug 31963 the result was compared to 0 before sending
anything to the template, so the casting was done, now it is not.
To test:
========
1. Go to Administration -> Patron categories
2. Edit your patron category and give a hold fee of 0.
3. HoldFeeMode does not matter - you can set it to any value.
4. In another tab, open the OPAC.
5. Search the OPAC for any record with an item.
6. Go to place a hold on this record. You will see "You will be
charged a hold fee of 0,00" --> This is a bug.
7. Apply patch and restart services.
6. Repeat step 6.
8. You should NOT see the hold fee message.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e4b94e4d82d5f96a0b1125f41fc8e41a47826627) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 56f4586290e32dc4acccf32a7ab9c4a4928f0233) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Janusz Kaczmarek [Fri, 24 Mar 2023 16:17:20 +0000 (17:17 +0100)]
Bug 33210: Add unit test
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 203646418a75efb86f513e33a0f3d4e13675c50d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 181f54a0ac9ff89c9a04e0c6ef314bc46abb4b91) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
To test:
1. Turn on SyndeticsCoverImages and SyndeticsEnabled.
2. Check the staff results page and make sure you can change the image size via SyndeticsCoverImageSize.
3. Check the OPAC results page.
4. Turn on 'OPACShelfBrowser' and make sure you change the image sizes within the shelf browser.
5. Test the OPAC checkout history page. ( opac-readingrecord.tt )
6. Have a checkout and an overdue to test the 2 tables on the OPAC summary pahe. ( opac-user.tt )
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daac367f300cea09688aa184c6ead1cd9a978f15) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit a48ed69eb2c33c660854d3cf560e121a0731161a) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Fri, 21 Apr 2023 06:39:56 +0000 (08:39 +0200)]
Bug 33579: Typo: record record
To reproduce:
- Search for records
- Select two or more records
- Select "Edit" > "Batch delete records"
- Click "Delete selcted records"
- Click "View detail of the enqueued job"
- Verify the page says "Type: Batch bibliographic record record deletion"
To test:
- Repeat the steps above
- The page should now say "Type: Batch bibliographic record deletion"
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 180de413c92e6bee5ac0e65e6ac255d780dab72d) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 9f92f880639a69076cc70792d956a788bb4b56fb) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 18 Feb 2023 11:53:49 +0000 (11:53 +0000)]
Bug 31432: Make 245$n$p visible by default in frameworks
$n (part_number) and $p (part_name) now have their own
columns in the database, but we are still hiding them
by default. It woudl ease testing and cataloguig if
we changed them to be visible by default in new installations.
To test:
* Check that in your current frameworks when adding a new
record, 245 n and p are hidden
* Apply the patch and start over: drop your db and run the
web installer
* Verify that the fields are now visible
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 340880253042d36e429ee0805039fa2589241180) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit bc4b29dfaa064c57644b59f73de547be2b5335c7) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
See comment on former patch too. We need to activate the spinner
early and we can simplify the code to remove it.
Note: unfortunately this is kind of a workaround, since using
load would be nicer but currently hard to implement since the cover
image code is scattered/widespread.
This code still checks the complete attribute, we could argue that
it should just remove the spinner. Note too that the spinner belongs
to a div where multiple img may be part of. If we do not remove the
spinner now, something went wrong at load time, but if you can
actually see the spinner is another thing.
Test plan:
See former patch.
Check few cover images on detail page, enable various providers.
Bonus: I tested with a sleep statement in opac-image.pl.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1bd4f53e9015f9dc764d51618acbaaec8ad275ff) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit ee4cc43b97d1c234379feb558ff1b2e38bf69cb1) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 32642: Loading spinner always visible when cover image is short (OPAC)
We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded.
this patch remove the spinner when the image is loaded,.
To test:
1. Make sure the OPACLocalCoverImages system preference is enabled
1.1. Go to Administration > Global system preferences
1.2. Search for Coverimages
1.3. Set OPACLocalCoverImages to 'Show'
1.4. Click 'Save all Enhanced content preferences'
2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test)
2.1. Download the attached image
2.2. Find a record without an image
2.3. Click the 'Images' tab
2.4. Click 'Upload'
2.5. Click 'Drop files here or click to select a file' and choose the downloaded image
2.6. Click 'Process images'
3. View the record in the OPAC
3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface
3.2. Click on 'OPAC view: Open in new window.'
--> Note that the image is displayed normally, but the spinner is also displayed
4. Apply the patch
5. View the record in the OPAC
--> Note that the spinner is no more displayed
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This needs a follow-up; the code in this template activates the spinner
actually when the job has been done already and did not remove it.
And we did not see that but only with a short image like above.
The construction with .one, .each is not needed given the execution
context.
Kyle Hall [Tue, 14 Mar 2023 11:06:21 +0000 (07:06 -0400)]
Bug 33216: Catch and handle RegisterRequired exceptions for SIP fee paid messages
If registers are being used in Koha, they are required. If a SIP account has no register and a fee paid message is sent, the SIP server crashes and the client never gets a response. It would be much better if Koha would response with 38 response where "payment accepted" is N, and an AF field stating that the SIP account needs to be associated with a register.
Test Plan:
1) Enable UseCashRegisters, set RequireCashRegister to "always require a
cash register". Do *not* set a cash register for the SIP account you
will be testing with.
2) Using the SIP cli tester, send a fee paid message for a patron owing
fees.
3) Note the lack of a SIP response
4) Apply this patch
5) Restart the SIP server
6) Repeat step 2, you should now get a SIP response with the error
message in it!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0411bf0573708327a9c0271f4d01c2996641bb3f) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit c6610d5ed97c03a090039606aecfe7f5d6917876) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Tue, 28 Mar 2023 11:35:05 +0000 (12:35 +0100)]
Bug 18398: (follow-up) Update POD & Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 488e67656ffa3016a32f39eb68c5a3aa7fb8a68e) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit fc4d7c3d4deeec4f9bfae2dd31e83be7527e2887) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 10 Mar 2023 10:02:19 +0000 (10:02 +0000)]
Bug 18398: Update C4::Message enqueue to use $patron->notice_email_address
This patch updates the enque method in C4::Message to expect a
Koha::Patron object in the parameters and then uses that patron object
to select the correct email address for notices as defined by
AutoEmailPrimaryAddress.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f7cfe3a705b4c594e1e9b70c1e7e1ffa0b39a073) Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit f58b41460b41cfc034e15baabda1dc1ab5f88b81) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>