Matt Blenkinsop [Tue, 23 May 2023 16:08:31 +0000 (16:08 +0000)]
Bug 33812: Checkboxes need labels in opac-messaging.tt
Aria-labels have been added to checkboxes in the OPAC messaging preferences table to assist with screen reading. The relevant preference has been mentioned in each label to identify what the checkbox is for.
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 25 Sep 2023 12:46:08 +0000 (12:46 +0000)]
Bug 34865: Use OPACURLOpenInNewWindow for library URLs
If a library has a URL defined it is shown in the OPAC under the
libraries page. This patch updates the template so that the link
respects the OPACURLOpenInNewWindow system preference.
To test, apply the patch and go to Administration -> Libraries and edit
a library if necessary so that it has a URL defined.
In the OPAC, go to the Libraries page. Test that the library link
respects whichever setting you have for OPACURLOpenInNewWindow
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34679: Change description for RELTERMS authorized value category
This patch changes the description of the RELTERMS authorized value
category to "List of relator codes and terms".
To test:
1. Apply patch
2. Go to Administration > Authorized values
3. Search for category RELTERMS
--> The description should read "List of relator codes and terms"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: Fixed QA failures
FAIL t/db_dependent/Koha/Patron.t
FAIL spelling
personnal ==> personal
personnal ==> personal
personnal ==> personal
personnal ==> personal
WARN tidiness
The file is less tidy than before (bad/messy lines before: 361, now: 382)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Moving all tests into one subtest with two underlying
subtests for checking accessors after new or set.
This will make it more easy to merge with the db
dependent counterpart.
Test plan:
Run t/Patron.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34825: Remove Test::DBIx::Class from Letters.t
Includes a tidy.
Test plan:
Run t/Letters.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test::DBIx::Class is not even used here.
Just like C4::Biblio.
We should remove TestBuilder too (this is t not t/db)!
Test plan:
Run t/Search.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>
Bug 34969: Remove unneeded module from buildQuery.t
Test plan:
Run t/Search/buildQuery.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>
Pedro Amorim [Mon, 25 Sep 2023 16:10:06 +0000 (16:10 +0000)]
Bug 34905: Fix icon
Test plan, on k-t-d:
1) Install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Create a new FreeForm ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
3) Pick a request type and input "42" in cardnumber and select a random library.
4) Notice the "Place request with partners" icon is gone from the top action bar.
5) Apply patch. Repeat.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34970: Remove most modules from SuggestionEngine_AuthorityFile.t
There is really no need for all those modules here.
What remains, is just a trivial test.
Test plan:
Run t/SuggestionEngine_AuthorityFile.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>
Owen Leonard [Thu, 28 Sep 2023 11:25:02 +0000 (11:25 +0000)]
Bug 34944: Remove the use of event attributes from OPAC full serial issue page
This patch removes the use of event attributes (onclick) from the OPAC's
full serial issues template. These events are defined now along with the
other in-page JS.
To test you must have a serial record with issues from multiple years.
- Locate the serial record and view the detail page.
- Click "More details" at the bottom of the "Subscriptions" tab.
- Click the "Full history" tab.
- Test the "Show year" controls to confirm that clicking each year
correctly filters the table of issues to show only issues from that
year.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34912: Add 14 hours to 1970 date in Account(s).t
This makes those tests pass in whatever timezone.
Test plan:
Do not yet apply patch.
Change timezone on commandline with: export TZ='Etc/GMT-14'
NOTE: GMT-14 is what we also call UTC+14 (sign reversed).
Run prove t/db_dependent/Accounts.t t/db_dependent/Koha/Account.t
This fails now.
Apply patch.
Rerun tests and verify that they pass now.
Bonus: Try some other time zone.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34916: Fix wrong borrowernumber in ArticleRequests.t
Simple fix: Send patron to userenv instead of library only.
Test plan:
Do not apply patch.
Remove borrowernumber 51.
Run t/db_dependent/Koha/ArticleRequests.t. (FAIL)
Apply patch, rerun test (PASS)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Wed, 27 Sep 2023 21:22:43 +0000 (21:22 +0000)]
Bug 34939: Set hour:minute to 23:59 when inputing dates unless explicitly set
1. Find some places in the staff interface where data-flatpickr-enable-time is set to true. Examples: renew.tt or circulation.tt
2. Directly input a date in whatever date format you have specified in DateFormat but omit the hour/minute. Example: 12/12/2023
3. See that the hour/minute default to 00:00 if your TimeFormat is 24hr and 12:00 AM if your time format is 12hr
4. Apply patch, clear browser cache.
5. Try step again, setting a date like '12/12/2023'. The hour:minute should be added as 23:59.
6. With TimeFormat set to 24hr try entering a date with the hour:minute like '12/12/2023 11:22'. The hour:minute should be set to 11:22.
7. With TimeFormat set to 12hr try entering a date with the hour:minute like '12/12/2023 11:22 AM'. The hour:minute should be set to 11:22 AM.
8. Play with this in as many TimeFormat and DateFormat combonatinons as you can.
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> 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>
Nick Clemens [Mon, 18 Sep 2023 17:25:15 +0000 (17:25 +0000)]
Bug 34822: Process real time holds along with indexing
Current code already skips indexing when adding record to instead index in a single call. This patch pdates the code to do the same thing for real time holds queue updates.
Note: Newly added records do not need to be updated as they won't have holds yet.
To test:
1 - Have a marc file with several records that match records in your catalog
You can export part of your catalog to generate one
2 - Set system preference: RealTimeHoldsQueue to 'enable'
3 - Stage and import file, make sure you are matching and overlaying
4 - Go to Administration->Manage jobs
5 - Note a batch update for each updated record
6 - Apply patch
7 - Repeat
8 - Note a single job added for the entire batch containing only updated records
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>
Matt Blenkinsop [Fri, 29 Sep 2023 12:44:11 +0000 (12:44 +0000)]
Bug 34689: Ignore itemnumber when creating item hash
A primary key error can be thrown when an item number is included in a new title hash. We need the item creation to ignore an itemnumber even if it is included in a MARC Framework
Test plan:
1) Edit the MARC framework relating to books (BKS in KTD)
2) In the 952$9 field (Koha itemnumber (autogenerated)), change the value of "Managed in tab" to "items (10)"
3) In the catalog, find a record that uses that MARC framework
4) Click "New" and choose to add a new item
5) Enter a barcode and click the "Add & duplicate" button
6) The page will refresh and an item will have been added
7) Enter a new barcode and click the same button again
8) An error will be thrown
9) Click the back button in the browser
10) Apply patch and restart_all
11) Click the add and duplicate button again
12) This time no error will be thrown and the page will refresh with another new item added
13) Sign off!
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>
Nick Clemens [Mon, 25 Sep 2023 13:12:40 +0000 (13:12 +0000)]
Bug 34645: (follow-up) save sort1 and sort2 in order
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>
Nick Clemens [Mon, 18 Sep 2023 16:32:10 +0000 (16:32 +0000)]
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields
Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that discount and sort1 and sort2 are not populated per the Marc
Apply patch, restart all
Stage and add to basket again
Confirm discount and sort1 and sort2 are populated correctly
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>
Bug 34932: Patron.t - Pass borrowernumber of manager to userenv
Test plan:
Make sure that you do not have borrowr 51.
Run t/db_dependent/Koha/Patron.t.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
Matt Blenkinsop [Fri, 15 Sep 2023 10:27:39 +0000 (10:27 +0000)]
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)
__() should be used in .js files, not .tt files
To test, apply the patch and update a translation, e.g. fr-FR:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, in this case
misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
should find the lines in the commit
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>
Jacob O'Mara [Tue, 26 Sep 2023 14:19:45 +0000 (15:19 +0100)]
Bug 34917: Fix default sort column of table in suggestion.tt
Test plan:
1. Navigate to Acquisitions and load the suggestions management page
2. Ensure that there are some suggestions in the table
3. Observe that the default sort is on the "Suggester Category" column
4. Apply Patch
5. Observe that the default sort is now on the "Suggested on" column
instead
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 2 Oct 2023 15:43:29 +0000 (15:43 +0000)]
Bug 34389: Fix inconsistencies in debit types titles, breadcrumbs, and header
This patch fixes a couple of inconsistencies in the debit types
administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.
To test, apply the patch and go to Administration -> Debit types. Test
each variation of the page:
- Main page
- New debit type
- Modify debit type
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>
Owen Leonard [Mon, 2 Oct 2023 16:14:21 +0000 (16:14 +0000)]
Bug 34391: Fix inconsistencies in cash registers titles, breadcrumbs, and headers
Fix inconsistencies in cash register page titles, breadcrumbs, and
header
This patch fixes a couple of inconsistencies in the cash register
administration page, making sure the page title, breadcrumb
navigation, and page headers are consistent with each other.
To test, apply the patch and go to Administration -> Cash register. Test
each variation of the page:
- Main page
- New cash register
- Modify cash register
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>
David Nind [Sat, 30 Sep 2023 09:03:06 +0000 (09:03 +0000)]
Bug 34942: Fix typo - 'brower' to 'browser'
This fixes a typo in a message used in the advanced cataloguing
editor when macros are converted from being stored in the browser to
being stored in the database (bug 17268 - Advanced cataloging editor
- rancor - macros are lost when browser storage cleared).
Test plan:
1. Search for 'brower' in the codebase - there should be one occurance:
grep -rn --exclude=*.po brower *
2. Apply the patch.
3. Run the search in step 1 again, there should now be no occurances.
4. Review the diff for the patch a nd make sure that the change makes
sense.
5. Sign off! 8-)
Signed-off-by: David Nind <david@davidnind.com> 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>
Instead of the fallback to 51, we pass a borrower that has
permission for editing items.
Test plan:
Do not apply patch.
Run test without a borrower 51 in db. (FAIL)
Apply patch.
Run test again. (PASS)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34930: Change timezone in Koha/Object.t where tests assume it
This is the case for subtest: attributes_from_api() tests.
Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Object.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Patrons.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 27 Sep 2023 15:42:26 +0000 (15:42 +0000)]
Bug 34934: Remove the use of event attributes from OPAC lists page
This patch removes the use of event attributes (onclick, onchange) from
the OPAC lists template. These events are defined now along with the
other in-page JS.
The patch also removes a "delete list" button which was only shown
when viewing an empty list and which was redundant.
To test, apply the patch and log into the OPAC.
- Go to Lists -> New list.
- Change the category to "Private" and the "Allow changes" dropdown to
"Staff only."
- You should see a message, 'The "Staff only" permission has no actual
effect while this list is strictly private'
- Change the category to "Public." The message should disappear.
- View the contents of a list.
- Click the "Send list" button at the top of the table of titles.
- It should trigger the "Sending your list" popup window.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 27 Sep 2023 16:26:03 +0000 (16:26 +0000)]
Bug 34936: Remove the use of event attributes from OPAC detail page
This patch removes the use of event attributes (onclick) from the OPAC's
bibliographic detail page template. These events are defined now along
with the other in-page JS.
The patch also adjusts the global "Dopop" function so that the popup
window is a litte bigger. The comments form did not fit well.
In checking for use of the "Dopop" function I found that it was being
redefined in opac-topissues.tt for no reason so I removed it.
To test you must have the OPACComments system preference enabled.
- Log in to the OPAC, locate a bibliographic record, and view the detail
page.
- Under the "Comments" tab, click the "Post your comments on this title"
link. It should trigger a popup window.
- Submit your comment. When the detail page reloads, return to the
"Comments" tab and click the "Edit" link on your comment. The same
popup window should be triggered.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Julian Maurice [Mon, 27 Feb 2023 09:05:44 +0000 (10:05 +0100)]
Bug 33074: Take ReservesControlBranch into account in opac-reserve.pl
Test plan:
1. Set system preferences:
- Disable OPACAllowUserToChooseBranch
- Set ReservesControlBranch to "item's home library"
- Enable UseBranchTransferLimits
- Set BranchTransferLimitsType to "item type"
- Enable canreservefromotherbranches
- Disable IndependantBranches
2. Create two libraries: ITEM_LIB and PATRON_LIB
3. Set circulation rules:
- Remove all circulation rules (DELETE FROM circulation_rules)
- Set a default rule that allow some holds and with "OPAC item level
holds" = "force". Allow "on shelf" holds for easier testing.
- In the rules for ITEM_LIB, under "Default checkout, hold and return
policy",
- set "Hold policy" to "From any library"
- set "Hold pickup library match" to "item's home library"
- In the rules for PATRON_LIB, under "Default checkout, hold and
return policy",
- set "Hold policy" to "From any library",
- set "Hold pickup library match" to "any library"
4. In "Library transfer limits" disable all transfers from ITEM_LIB to
PATRON_LIB for an item type (let's say "BOOK")
5. Create a biblio with an item:
- item type must be the same as in previous step ("BOOK")
- home branch and holding branch must be ITEM_LIB
6. Create a patron at PATRON_LIB, give it a password so it can log in.
7. Go to OPAC, and login with this patron
8. Try to place a hold for the new item. You should be allowed to place
a hold, but when doing it, no holds will be created.
9. Apply patch, restart Koha
10. Try to place a hold for the new item. This time the hold should be
created
Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Merged tidy patch and switch to Koha::Policy::Holds here. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 22 Sep 2023 12:59:54 +0000 (14:59 +0200)]
Bug 34842: Fix Illrequest/Config.t if DB upgraded twice
Not sure this is correct, but I think it is!
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pedro Amorim [Mon, 25 Sep 2023 10:21:36 +0000 (10:21 +0000)]
Bug 34836: Add patron check to isbd and marc detail pages
Test plan:
- Go to circulation rules and set On shelf holds allowed to If all unavailable
- Log out
- Visit a MARC detail or ISBD detail bib record on OPAC:
http://localhost:8080/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=76
http://localhost:8080/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=76
- Notice it blows up with error 500, on both occasions
- Apply patch. Repeat.
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>
Jonathan Druart [Thu, 3 Aug 2023 08:01:32 +0000 (10:01 +0200)]
Bug 34369: Fix 'Did you mean'
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>
Jonathan Druart [Tue, 1 Aug 2023 07:12:10 +0000 (09:12 +0200)]
Bug 34369: Pass csrf token from syspref API client (for Vue app)
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>
David Cook [Tue, 1 Aug 2023 06:56:23 +0000 (06:56 +0000)]
Bug 34369: Require CSRF token for updating system preferences
This patch adds the requirements that updating a system preference
requires a CSRF token. (Also, adding and deleting local system preferences.)
0. Apply patch
1. koha-plack --reload kohadev
2. Add local system preference
3. Update local system preference
4. Delete local system preference
5. Update normal system preference
6. Note no errors
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>
David Cook [Wed, 13 Sep 2023 01:33:43 +0000 (01:33 +0000)]
Bug 34761: Prevent XSS for searches and saved search filters
</script> tags are interpreted in JSON strings as HTML, which can
lead to XSS attacks.
This patch puts HTML escaped JSON in the value of a hidden HTML element.
The Javascript then takes the value as a string, parses it as JSON,
and is able to use it to save search filters without triggering a
XSS attack.
This patch also adds DataTable's built-in HTML escaping for the query
and limits on the admin UI for the search filters.
Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=SavedSearchFilters
2. Enable the system preference
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
4. Click "Save search as filter"
5. Checkbox "Show in staff interface?"
6. Type "E-TEST" into box and click 'Save'
7. Go to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
8. Click "E-TEST" under "Custom search filters"
9. Note that you see search results
10. Go to
http://localhost:8081/cgi-bin/koha/admin/search_filters.pl
11. Note that for "E-TEST" you see a "Query" like
{"operators":[],"operands":["e"],"indexes":[]}
12. Note that for "E-TEST" you see a "Limits" like
{"limits":[]}
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>
David Cook [Mon, 24 Jul 2023 04:31:15 +0000 (04:31 +0000)]
Bug 34349: Validate/escape inputs for task scheduler
This change validates and escapes inputs for task scheduler.
Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/tools/scheduler.pl
3. Input a time a minute in the future and leave the date blank
4. Choose an existing report and output format
5. Type a malicious string which is also a valid email address
into the Email field
6. Click "Save"
7. Note that the job is added but the Email is wrapped in single
quotes
8. Try using a non-malicious email address with a single quote.
9. Note that the single quote is escaped, so that it will still
be used by runreport.pl
JD amended patch: tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed pars for $email =~ regex, removed old commented lines. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 16 Aug 2023 02:51:43 +0000 (02:51 +0000)]
Bug 34513: Add checkauth unit test for resetting auth state when changing users
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 16 Aug 2023 02:21:40 +0000 (02:21 +0000)]
Bug 34513: Add end-to-end test for authorization check after first failed authorization
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Fri, 11 Aug 2023 03:03:01 +0000 (03:03 +0000)]
Bug 34513: Set auth state correctly when changing auth sessions
This patch sets the $auth_state to failed when changing auth sessions,
so that the new login attempt gets processed correctly (instead
of skipping the authorization step).
Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=baseurl
3. Log in as an OPAC user with 0 permissions
4. Note the auth screen "Error: You do not have permission to access this page"
5. Click "Log in"
6. Note that you're still shown a login screen (and that you've been logged out of
your previous authenticated session)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34653: Make koha-foreach return the correct status code
I think the correct behavior for this script should be that koha-foreach
will return 0 (success) if all the commands it tried to run succeeded, but
1 (failure) if any of the commands failed.
To test:
1. $ koha-create --create-db test
2. $ vi test.sh
if [ $USER = 'kohadev-koha' ]; then
echo "FAILED";
exit 1;
else
echo "SUCCESS";
exit 0;
fi
3. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
4. $ echo $?
5. Note that the exit status is 0 (success)
6. Apply patch
7. $ debian/scripts/koha-foreach sh test.sh
FAILED
kohadev: 1 status returned by "sh test.sh"
SUCCESS
8. $ echo $?
9. Note that the exit status is 1 (failure)
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>
David Cook [Fri, 8 Sep 2023 01:53:38 +0000 (01:53 +0000)]
Bug 30843: Add unit test for Koha::Auth::TwoFactorAuth::verify
This change adds a unit test to test Koha::Auth::TwoFactorAuth::verify
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Wed, 6 Sep 2023 05:12:50 +0000 (05:12 +0000)]
Bug 30843: Add mfa_range configuration option for TOTP
This change adds a mfa_range configuration option for TOTP
to koha-conf.xml, and overrides the "verify" method from
Auth::GoogleAuth in order to provide a new default for "range"
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
3. Change the syspref to "Enable"
4. Go to
http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51
5. Click "More" and "Manage two-factor authentication"
6. Register using an app
7. In an Incognito window, go to
http://localhost:8081/cgi-bin/koha/mainpage.pl
8. Sign in with the "koha" user
9. Note down a code from your Authenticator app
10. Wait until after 60 seconds and try it
11. Note it says "Invalid two-factor code"
12. Try a new code from the app
13. Note that it works
14. Add <mfa_range>10</mfa_range> to /etc/koha/sites/kohadev/koha-conf.xml
15. Clear memcached and koha-plack --restart kohadev
16. Sign in with the "koha" user
17. Note down a code from your Authenticator app
18. Wait 4 minutes and then try it
19. Note that it works
20. Disable your two-factor authentication and click to re-enable it
21. Use a code older than 60 seconds when registering for the two
factor authentication
22. Note that the code works
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Tue, 6 Jun 2023 16:16:22 +0000 (12:16 -0400)]
Bug 33926: Add ability to specify fields allowed in a response
At this time, we can specify fields to hide in SIP response at the login level. From a security perspective, it would be useful to also be able to specify which fields are allowed in a response.
Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 8 Sep 2023 15:34:33 +0000 (15:34 +0000)]
Bug 28449: Add column with invoice number to basket summary page
At the moment it's quite a lot of clicks to get from the basket
summary to the invoice something was received in. This adds a nice
shortcut by creating a new column for the invoicenumber in the basket
summary table.
To test:
* Make sure you have a basket with some received and unreceived
order lines
* Verify that the (received) shows for your received lines
* Verify no invoice number or link to it in sight
* Apply patch
* Verify that there is now a column for the Invoice containing
the invoice number as a link to the invoice
* Test with a staff patron, that doesn't have edit_invoices permission
* Verify that now instead of a link you see the invoice number as text
Be happy, sign off ;)
Note: this doesn't change the CSV export. The way the CSV is built is
quite different to the summary table, so it would be better handled
in a separate bug/patch. The columns are already quite different!
Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 29 Aug 2023 14:53:03 +0000 (14:53 +0000)]
Bug 34618: Add sort 1 and 2 fields to basket in acquisitions
This patch adds the option to display sort1 and sort2 columns in the
view of the contents of a basket in acquisitions. The columns are
labeled "Statistic 1" and "Statistic 2" to match the labels in the
order creation/edit form.
The fields are hidden by default in the updated table configuration.
To test, apply the patch and restart services.
- Go to acquisitions and create a basket if necessary:
- Search for a vendor and click New -> Basket from the vendor
toolbar on the vendor search results screen.
- Create a basket, then click "Add to basket" from the basket details
page.
- Add an order to the basket.
- With at least one order in the basket, check the table of orders in
the basket.
- The columns should be unchanged.
- The table configuration button should show the two statistics fields
as hidden. Test that they can be displayed.
- Go to Administration -> Table settings.
- Under Acquisitions -> basket, try changing the settings for the
Statistic 1 and Statistic 2 fields, and check that your changes are
reflected in the basket view.
- Test with a vendor which has an EDI account:
- Enable the EDIFACT system preference.
- Go to Administration -> EDI accounts and create an account for your
vendor.
- Confirm that the table of orders in your basket still displays
correctly now that the "Supplier report" column is present.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 18 Aug 2023 11:16:44 +0000 (11:16 +0000)]
Bug 33428: (follow-up): Default to searching 'standard' fields
Before this patch set, a search for patrons from article requests or
reserves would search the attributes by default. They were not considered
'standard' searches, however.
This patch simply defaults to searching the 'standard' fields unless a value is passed
To test:
1 - Apply other patches
2 - Have patrons with searchable attributes
3 - From a title, click the holds or artickle requests tab
4 - Search for the attribute values and confirm patrons are not returned
5 - Apply this patch
6 - Search again, patrons are now returned
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Thu, 10 Aug 2023 18:58:55 +0000 (18:58 +0000)]
Bug 33428: Parse search fields in buildPatronSearchQuery
This patch moves the parsing of standard search_field into the buildPatronQuery subroutine
and adds a check for 'standard' field before adding attributes to the search
To test:
1 - Add a new attribute type and make it searchable
2 - Add a value to a patron
3 - Search for this value using 'Standard' fields, confirm you get the patron
4 - Search for the value using 'Cardnumber' field, confirm you get the patron - BAD!
5 - Apply patch
6 - Repeat cardnumebr search, confirm patron not found - Yay!
7 - Search standard, confirm patron is found
8 - Add a new field to 'DefaultPatronSearchFields
9 - Confirm it appears in patron search dropdown
10 - Confirm a search of this field with the attribute value does not return the patron
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Tue, 19 Sep 2023 21:33:00 +0000 (21:33 +0000)]
Bug 34748: Fix column name in columns configuration for basket table
The first column was named basket_number, but it's actually the
order_line.
To test:
* Edit column configuration for acquisition > basket
* Make sure to set at least one checkbox for 'basket_number'
* Apply patch, run database update
* Verify that the first column is now 'order_line', but your
settings have been preserved
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>
Martin Renvoize [Fri, 10 Feb 2023 15:50:44 +0000 (15:50 +0000)]
Bug 29822: Update unit tests
Signed-off-by: David Nind <david@davidnind.com> 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>
Martin Renvoize [Fri, 10 Feb 2023 15:39:32 +0000 (15:39 +0000)]
Bug 29822: Database and Preference description updates
Signed-off-by: David Nind <david@davidnind.com> 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>
Martin Renvoize [Fri, 10 Feb 2023 15:22:04 +0000 (15:22 +0000)]
Bug 29822: Update code to reference by pipe
Moving to modalselect also has the effect of moving from comma delimited
to pipe delimitation for the preference contents
Signed-off-by: David Nind <david@davidnind.com> 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>
Martin Renvoize [Thu, 9 Feb 2023 17:32:19 +0000 (17:32 +0000)]
Bug 29822: Use the modal
As requested by Katrin.. switch to the modal and expose all fields from
the borrowers database table
Signed-off-by: David Nind <david@davidnind.com> 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>
Martin Renvoize [Fri, 23 Dec 2022 11:05:01 +0000 (11:05 +0000)]
Bug 29822: Update 'DefaultPatronSearchFields' to a select list
This patch updates the `DefaultPatronSearchFields` preference from
freetext expecting a comma delimited list of borrower fields to a
multi-select with a sensible list of fields available.
I opted to not use the Modal approach with all borrower fields listed as
I felt it made more sense to only expose a more limited subset of the
fields available to us.
Signed-off-by: David Nind <david@davidnind.com> 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>
Aleisha Amohia [Thu, 15 Jun 2023 05:21:37 +0000 (17:21 +1200)]
Bug 34016: Manage recalls via SIP
This enhancement allows SIP to better handle recalled items - preventing the check-out of recalled items if they have been allocated to another patron, or fulfilling recalls if the item was recalled and allocated to this patron.
To test:
1. Run test `prove t/db_dependent/SIP/Transaction.t`
2. Confirm the test fails when trying to fulfill the recall
3. Apply the patch and restart services
4. Run test again `prove t/db_dependent/SIP/Transaction.t`
5. Confirm tests pass
Sponsored-by: Auckland University of Technology 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>
Aleisha Amohia [Thu, 15 Jun 2023 05:21:21 +0000 (17:21 +1200)]
Bug 34016: Tests for fulfilling recalls via SIP
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>
Owen Leonard [Thu, 13 Jul 2023 11:57:02 +0000 (11:57 +0000)]
Bug 34114: Replace the use of jQueryUI sortable
This patch adds a replacement for jQueryUI sortable, a standalone
library called Sortable. The patch updates pages which previously used
jQueryUI for sorting.
The patch updates the style of most sortable elements to use the
"grip-vertical" Font Awesome icon.
To test, apply the patch and test the following pages, confirming that
sortable elements are sortable and that the newly sorted state is saved
correctly:
- Administration -> System prefernces -> I18N/L10N
- With multiple languages installed, test that languages listed in the
'language' and 'OPACLanguages' preferences can be sorted and that
after saving your changes the interface relfects your changes: In
the footer and header of the OPAC and in the footer of the staff
interface.
- Administration -> MARC bibliographic framework -> MARC structure ->
Edit subfields of a tag.
- Test using a tag with multiple subfields, e.g. MARC21 245.
- Test that you can click and drag to reorder the tabs in the
subfield edit view.
- Test that when you save your changes, including changes to the
"New" tab position, that fields are ordered correctly both in the
display on this page and in the basic MARC editor.
- Perform the same tests on Authorities: Administration -> Authority
types -> MARC structure -> Edit subfields of a tag.
- Authorities -> New (or edit) authority
- Multiple subfields of a tag should be sortable.
- Multiple copies of the same tag should be sortable relative to each
other.
- Confirm that your changes are saved correctly and that the detail
view of your updated authority record is correct.
- Perform the same tests on Cataloging -> New (or edit) record in the
basic MARC editor.
- Enable the StockRotation system preference if necessary.
- Go to Cataloging -> Stock rotation
- If necessary, create a new rota and add multiple stages
- In the "Manage stages" view you should be able to click and drag
to reorder stages. The new position should be saved immediately
via AJAX.
Signed-off-by: paul <paul.poulain@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Andreas Roussos [Tue, 1 Aug 2023 18:49:55 +0000 (20:49 +0200)]
Bug 21828: build $bib_heading_fields only once per invocation
In UNIMARC instances, the run time of link_bibs_to_authorities.pl
can be reduced by up to 80% and the number of DBI calls
can be reduced by up to 90% with a very simple fix that
optimises the constructor of the C4::Heading::UNIMARC object.
Currently, the constructor resets the $bib_heading_fields hash
*in each invocation* (i.e. for every field the bibliographic
record contains), then populating it again with the results
fetched from the database! This is inefficient.
The patch/fix is trivial: we take advantage of the fact that
$bib_heading_fields is declared at the top of the
C4::Heading::UNIMARC module and is thus a package variable
that is in scope for the entire execution of the program
(more info here: https://stackoverflow.com/q/75317862).
Placing the section that generates the $bib_heading_fields
hash inside a "unless ( defined $bib_heading_fields )" code
block is enough to cause a significant reduction in the
number of "expensive" SQL SELECT queries that must be run.
Test plan:
0) Have a UNIMARC instance with some sample data (the KTD one
will do just fine for this experiment).
Observe the output from the script and the DBI profiling info.
[You may want to play with different DBI_PROFILE levels (such as
2, 4, 6, 8, etc.) to see what's going on under the hood DBI-wise,
for reference see: https://metacpan.org/pod/DBI::Profile]
2) Apply this patch.
3) Rerun the script from step 1), it should run a lot faster!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 27 Jul 2023 13:01:24 +0000 (15:01 +0200)]
Bug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened
If checkin or renew failed, we should not refresh the table or it will
hide the error message.
Test plan:
Apply the DO NOT PUSH patch
Do a renew
=> No error in the table
Apply this patch
Do a renew
=> You see the error
Revert the DO NOT PUSH patch
Do a renew
=> The table is refreshed
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface
Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
- background-color: #E6FCB7;
This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'
Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
currently logged in.
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>
Jonathan Druart [Thu, 8 Jun 2023 07:36:35 +0000 (09:36 +0200)]
Bug 33948: Replace GetAllIssues with Koha::Checkouts - staff
This patch replace GetAllIssues in readingrec.pl which is the only
occurrence in the staff code.
To test this patch you will need several items in your checkout history
in order to confirm that the display is the same before and after the
patch.
However there is one change! And it's a bug fix (or an enhancement, it
depends on how you see things). It includes checkouts with deleted items, which is
a long standing bug (see bug 8483).
Performance will be compared as well.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 19 Sep 2023 10:57:52 +0000 (10:57 +0000)]
Bug 33499: Make interface URL clickable on vendor details
This patch adds markup around the vendor details interface URL so that
it is a clickable link.
To test, apply the patch and go to Acquisitions.
- Search for a vendor
- If you don't have a vendor with interfaces defined, edit one
- Under Interfaces -> Interface details, fill out the form, including
the URI field.
- Add more than one interface
- Save your changes and then view the vendor details page
- In the Interfaces section the interfaces you defined should have
clickable links.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 30825: Remove GetReservesControlBranch in favour of Koha::Item->holds_control_library
This patch removes the GetReservesControlBranch method, and replaces its
uses with the newly introduced method.
To test:
1. Apply this patch
2. Verify that placing holds from the OPAC works
=> SUCCESS: Things work as expected
3. Run:
$ kshell
k$ prove t/db_dependent/Reserves* \
t/db_dependent/Hold* \
t/db_dependent/Koha/Hold* \
t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This simple method takes care of calculating the control branch for an
item and a patron, depending on a syspref.
It targets replacing C4::Reserves::GetReservesControlBranch
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 22 Sep 2023 06:30:35 +0000 (08:30 +0200)]
Bug 34720: Say if syspref has been inserted
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>
Bug 30403 had wrong syspref name in its
atomic update file. This patch fixes this in
db_rev 221200018.pl and adds new atomic
update file.
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>