Commit Graph

53116 Commits

Author SHA1 Message Date
Martin Renvoize d0da9aadde Bug 38517: Add the 25.05 release team
This patch updates the teams.yaml to include the voted in 25.05
release team.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f8ee288523)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:56:53 +01:00
Jonathan Druart 5292c281ba Bug 38437: Auto-show modal on single receive
Might have been broken by the bootstrap 5 upgrade, but not sure.
Not sure why the click does not trigger the modal.

1. Place an order in acquisitions
   1.1. Go to Acquisitions
   1.2. Click 'Search' next to 'Search vendors'
   1.3. Click 'Add to basket' next to 'My basket'
   1.4. Search for an existing record (e.g. search for Shakespeare)
   1.5. Click 'Add order' next to a result or in the detailed record
   1.6. In the item form, choose an item type
   1.7. Click 'Add item'
   1.8. Choose a fund
   1.9. Enter a price in 'Vendor price'
   1.10. Click 'Save'
   1.11. Click 'Close basket'
   1.12. Click 'Yes, close'
2. Receive the order
   2.1. Click 'Receive shipments'
   2.2. Enter a value in 'Vendor invoice'
   2.3. Click 'Next'
   2.4. Click 'Receive' next to your order
   => The modal is shown

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ef455af344)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 15c702da91)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:50:02 +01:00
Jonathan Druart 43076cabd2 Bug 38526: (bug 36822 follow-up): Improve datetime comparison in tests
17:39:54 koha_1       |     #   Failed test 'updated_on correctly saved on newly created user'
17:39:54 koha_1       |     #   at t/db_dependent/Auth_with_shibboleth.t line 319.
17:39:54 koha_1       |     #     Structures begin differing at:
17:39:54 koha_1       |     #          $got->[0] = '2024-11-19 16:39:30'
17:39:54 koha_1       |     #     $expected->[0] = '2024-11-19 16:39:29'
17:39:54 koha_1       |     # Looks like you failed 1 test of 54.

We must use t::lib::Dates::compare to compare datetimes in tests.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ed25a48ccf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3b31cf80c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:46:43 +01:00
George Veranis 9f5497343a Bug 28075: (follow-up) adding all choices and values of 135a
Extend patch of 135a to cover all choices with all possible values as
described by IFLA for 135a.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9a72d3c757)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5a07b6a869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:42:28 +01:00
Didier Gautheron 7ae4f0092e Bug 28075: Add missing UNIMARC coded data 135a
This patch add more values to selection of 135a in UNIMARC

Test Plan:
    1) Add on default framework the field 135a and check the Editor option
    2) Set on plugin section the value of unimarc_field_135a.pl
    3) Open cataloguing editor and use 135 field tag editor to select a value
    4) Apply patch
    5) Open cataloguing editor and use 135 field tag editor to select a value,
       after patch you have more options to select

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3fa03e2e66)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4f7327c5c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:42:28 +01:00
Phil Ringnalda feb6d0e2c1 Bug 29818: Cannot save subscription frequency without display order
The schema says that subscription_frequencies.displayorder can be null, and
everything else deals with it being null just fine, but if you try to save
a new frequency without specifying display order with strict_sql_modes set,
you get an error.

Test plan:
 1. Without the patch, Serials - Manage frequencies - New frequency
 2. Description is mandatory, so fill it in, then click Save
 3. Boom! Apply patch, restart_all
 4. Repeat steps 1-2, and verify that no error is thrown and the new
    frequency shows up (at the top of the list since nothing comes before
    something)
 5. New frequency, fill in Description, try typing something other than a
    number in Display order and saving. You should be told to follow the
    directions that only numeric characters are allowed

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 77c003ed54)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20c59c0171)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:37:34 +01:00
David Cook 9094a6dcf5 Bug 37854: Re-indent HTML (whitespace-only)
This whitespace only change re-indents the HTML

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f067830305)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fa90836eda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:32:53 +01:00
David Cook 4ee80d462b Bug 37854: Add fieldset.rows so that Javascript works
This change adds a fieldset.rows that the Javascript produced
by C4/Barcodes/ValueBuilder.pm will work here too like it
does for /cgi-bin/koha/cataloguing/additem.pl and
/cgi-bin/koha/acqui/neworderempty.pl

The fieldset.rows element ruins the styling, so we add some context
specific styling to the styling is preserved.

Test plan:
0. Apply the patch
1. Set "autoBarcode" to "generated in the form <branchcode>yymm0001"
2. Create a vendor
3. Create a backet with "Create items when" set to "receiving an order"
4. Add an order (any order)
5. Close the basket
6. Receive the shipment
7. Click in the barcode field
8. Note that you get a barcode like CPL24090001 and not undefined24090001

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 79b5228116)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b6a5bf7674)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:32:53 +01:00
Nick Clemens a0a7b5f018 Bug 37326: decode barcode file in inventory tool
This patch ensures that barcodes uploaded as a file into batchMod are run through
any transformations to match the behaviour of barcodes entered in a list

To test:
1 - Edit BarcodeSeparators system preference to remove \s
2 - Install barcode transformer plugin:
    https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/tag/v1.2.0
3 - Configure the plguin:
item:
  -
    match: "^[A-Z]* \| "
    search: "^[A-Z]* \| "
    replace: ""
  -
    match: " \| .*$"
    search: " \| .*$"
    replace: ""
4 - Go to Cataloging->Batch item modification
5 - Enter a list of barcodes into the 'Scan one by one' box like:
ERR | 12345 | ERR
FOO | 23456 | FOO
BAR | 34567 | BAR
6 - Click 'Continue'
7 - Note the barcodes not found are:
12345
23456
34567
8 - Save the barcodes with extra text into a file
9 - Perform batch mod, supplying the barcodes via the file
10 - Note the barcodes not found are the original strings
11 - Apply patch, restart all
12 - Perform batch modification using file again
13 - Note the not found barcodes are the transformed version
14 - Sign off!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d794891005)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1793c53863)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:31:23 +01:00
Lucas Gass e98d0b2142 Bug 23426: (Rmaint follow-up) Adjust tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a61cfb1a35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:29:36 +01:00
Jan Kissig b6bfb2b7f0 Bug 23426: (follow-up) Fix failing test to send correct summary flag
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7509681e10)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e849ae175b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:29:36 +01:00
Jan Kissig 0d62f50a49 Bug 23426: (follow-up) Enhance sip_cli_emulator.pl for test plan
This follow up enhances the sip_cli_emulator.pl to use start-item and/or end-item as params. With these new params the original test plan can be extended:

Test plan:
a) create several manual invoices for patron 23529000035676 : http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=19
b) run
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "   Y      " --start-item=1 --end-item=2
   to get fine 1 and 2 or
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "   Y      " --start-item=3 --end-item=3
   to retrieve fine 3

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cfb841f9e6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9d9027cb41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:29:36 +01:00
Jan Kissig e89b35ae28 Bug 23426: (follow-up) This patch reintroduces the former implementation of fine items
The original implementation of fine items was accidently overwritten with this patch. This follow up reverts these changes but keeps additional improvements that were also part of this patch.
These are:
- Returning the active currency as part of the response (BH)
- Fixing the number of items in the response which are specified in BP and BQ when other items as fine items are requested.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e5bd8aec41)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2685372f23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:29:36 +01:00
Jan Kissig d04f781661 Bug 23426: (follow-up) Add tests
Test plan:
[1] Prove t/db_dependent/SIP/Message.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
EDIT: Tidied inline.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit efe0b8c627)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3dec3a9cb8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:29:36 +01:00
Jan Kissig c7df4b4943 Bug 23426: Add fine items to patron information response in SIP2
This patch adds fine items (AV) to patron information response in SIP2
In addition the active currency we be part of the response (BH)
This also fixes the number of items in the response which are specified in BP and BQ in the request

to test:
a) create a manual invoice for patron 23529000035676 : http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=19
b) in ktd call: perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "      Y   "
c) verify that no |AV field is in response
d) apply patch
e) in ktd call: perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 23529000035676 -m patron_information -s "      Y   "
f) verify that response includes fields like '|AVManual fee '

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Tidied inline
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1d80470105)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d140000c98)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:29:35 +01:00
Hammat Wele 2b785e30d3 Bug 36132: Allow to delete multiple patron lists on any page
Plan test :
1. Apply the patch.
2. Create at least 22 patron lists (Navigate to Tools > Patron lists > New patron list).
3. Select the lists you want to delete on the 2nd page
4. Click the "Delete selected lists" button.
5. Confirm that the selected lists have been deleted.
6. Ensure that the button cannot be used if no list is selected.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 96cc191e10)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 388186c0ac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:28:36 +01:00
Jonathan Druart f55cbb1c01 Bug 38357: Prevent holidays to be wrongly added
This patch resets @holiday_list to an empty array, to prevent holidays
to be accumulated in worker's memory.

If you added single holidays to library A then others to library B,
holidays from A were also added to B.

Test plan:
Go to /cgi-bin/koha/tools/holidays.pl
Define the holidays for Centerville
 Select a date
 To: another date (pick only 2 days to ease testing)
 Set a title "cpl"
 Tick "Holidays on a range"
 Save
Define the holidays for Fairview
 Select *another* date
 To: another date (pick only 2 days to ease testing)
 Set a title "fpl"
 Tick "Holidays on a range"
 Save

=> Without this patch Fairview has 4 days of holidays instead of 2
=> With this patch applied the dates you selected are considered
holidays for Fairview

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 43e22821a9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f5a0b225f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:27:21 +01:00
Owen Leonard 1d0f870a13 Bug 24690: Make OPACPopupAuthorsSearch work with search terms containing parenthesis
This patch updates the OPACPopupAuthorsSearch feature so that it wraps
search terms with quotes. This is the behavior we have in place for
author searches outside the context of OPACPopupAuthorisSearch, e.g.
'au:"Criterion Collection (Firm)"'

To test, apply the patch and enable the OPACPopupAuthorsSearch system
preference.

- Search for a record in the OPAC which has author data containing
  parentheses (it should not be a field linked to an authority record).
- View the detail page for that record.
- Click on one of the problematic author links.
- This should trigger a modal window with a list of authors and
  checkboxes for each.
- With just the single checkbox checked, click "Search."
- The search should return the correct results.
- Test other author searches to confirm that they work too.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d7ae20f0cb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bf57e14322)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:25:04 +01:00
Martin Renvoize 3d6f8429d1 Bug 38322: (QA follow-up) Fix spelling
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a9e7e8f14d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 087ceae831)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:19:33 +01:00
Nick Clemens 1ca7043c9a Bug 38322: Adjust tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0e899b8882)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c2f7e2708)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:19:33 +01:00
Pedro Amorim 13540a26a0 Bug 37178: Disable sorting on comments column
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0ed10ee3da)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fabcb433d7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:15:19 +01:00
Pedro Amorim 2df3ad8f2a Bug 38284: Add patron check for TrackLastPatronActivityTriggers
If an invalid or empty cardnumber is supplied to patron status request SIP message, SIP dies silently and no 'READ:' exists on the response.

Test plan:
1) Apply tests plan, run tests:
$ prove t/db_dependent/SIP/Message.t
2) Verify tests fail. Apply 2nd patch. Run tests again. Verify they pass.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 87256d7ae3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4a460068a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:09:57 +01:00
Pedro Amorim a0f21e3c36 Bug 38284: Add tests
Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5acf88d91d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 41e74dd1a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:09:57 +01:00
Aleisha Amohia 7ced9fb502 Bug 33348: Tests
prove t/Koha/SearchEngine/Elasticsearch/Search.t

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8e73930408)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d444b97d03)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:07:57 +01:00
Aleisha Amohia eca41b9c6e Bug 33348: (follow-up) Fix if no 008 defined
And copy fix across to Zebra search as well.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c40544951)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 97477f9258)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:07:57 +01:00
Aleisha Amohia 44aa26d018 Bug 33348: Show authority heading use with Elasticsearch
This patch ensures the ShowHeadingUse system preference and feature works as expected when using Elasticsearch as the searchengine.

To test, follow the test plan at Bug 29990 Comment 9. Ensure the SearchEngine system preference is set to Elasticsearch.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fc9f22a93)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e8979cb4e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:07:57 +01:00
Paul Derscheid 3fab1292c1 Bug 38100: (QA follow-up) Tidy changes in C4/XSLT.pm
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8ee8453118)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 15e3529648)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:04:40 +01:00
Janusz Kaczmarek 21bf7a728d Bug 38100: Unit tests
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit af270fc239)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1fbd8ebf83)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:04:40 +01:00
Janusz Kaczmarek dca8dc8e8b Bug 38100: Items with damaged status are shown in OPAC results as "Not available" even with AllowHoldsOnDamagedItems
Items with damaged status are shown on the OPAC results page as "Not
available" even with AllowHoldsOnDamagedItems set to 'Allow', which is
misleading for the users.  'other/Damaged' status should be assigned
only if AllowHoldsOnDamagedItems is set to 'Don't allow'.

Test plan:
==========

1. Check that AllowHoldsOnDamagedItems system preference is set to
   'Allow'.
2. In librarian interface, change the damaged status of an item by
   setting it to 'Damaged'.
3. In OPAC, make a search for the record with this item attached.  Use
   common words from title to get a list and not a single record.
4. Note that the item in question is labelled as 'Not available'
   (Damaged).
5. Apply the patch; restart_all.
6. Repeat p. 3.  Note that the item is now labelled as 'available for
   loan'.
7. Set AllowHoldsOnDamagedItems system preference is set to 'Don't
   allow'.
8. Repeat p. 3.  Note that the item is now labelled as 'Not available'.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c3dc86286c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de82706184)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 14:04:40 +01:00
Paul Derscheid b191d95d44 Bug 37998: (QA follow-up) Remove excess whitespace in catalogue/itemsearch_item.json.inc
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 48e7aad1f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93e9d8dd16)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 13:31:15 +01:00
Janusz Kaczmarek e0a12877f1 Bug 37998: Tabs and backslashes in the data break item search display
If the item data (e.g. callnumber) contains a tab or backslash OR the
title part contains a backslash, the DataTable displaying the item
search results stops throwing an error modal "Something went wrong when
loading the table. 200: OK." and a JS console log: "DataTables warning:
table id=results - Invalid JSON response. For more information about
this error, please see http://datatables.net/tn/1".

Test plan:
==========

1. Make an item search w/o any parameters.
2. From the first result page choose a record and modify the title (245 $a)
   to contain " \ " string. Repeat the item search. You should see a modal
   "Something went wrong when loading the table. 200: OK.".
3. Remove the " \ " from the title.  Verify that the problem no longer occurs.
4. In the same record, insert the string " \ " or a tab (copied from a text
   editor) into item data (itemcallnumber, enumchron, barcode etc.).
5. Repeat the item search. You should see again a modal "Something went wrong
   when loading the table. 200: OK.".
6. Apply the patch; restart_all.
7. Repeat p. 2, 3, 4, and 5.  Verify, that the problem is solved.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d289ebf0b3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 76f82167f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 13:31:15 +01:00
Phil Ringnalda 9258685b42 Bug 38329: Remove orphan confirm_deletion() in supplier.tt
The JavaScript function confirm_deletion() in supplier.tt has either
been an unused orphan since bug 28082 two years ago, or since the switch
from YUI to Bootstrap 12 years ago. Doesn't matter which, nothing calls
it, and if it was called, it would fail by trying to GET with
op="delete" rather than POST with op="cud-delete".

Test plan:
 1. Acquisitions - New vendor, enter a name and Save
 2. Click the name of your new vendor, so your URL is at supplier.pl
 3. Click Delete vendor to verify that deleting still works without this
    unused code which would fail

Sponsored-by: Chetco Community Public Library
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c70946a0be)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b8b8cb782)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 13:21:21 +01:00
Adolfo Rodríguez 9263691612 Bug 37863: Fix checking if a patron is already in the list adding users to a patron card batch
If the patron is already in the card batch it won't add it and it will show an error message

Test plan:
1 Create or edit an patron card batch
2 Try adding twice or more the same patron. It will show a success message everytime and you will end up with the same patron several times in the card batch
3 Apply patch, restart services
4 Repeat step 2. The first time you click on add user, it will do it and show the success message (Patron 'Patron name' added.), but after that it won't add the user and it will display an error message (Patron 'Patron name' is already in the list.)

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 293afd3de6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0e2778159d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 13:19:39 +01:00
Lari Taskula 11005fd44c Bug 35126: Remove onload from opac-addbybiblionumber.pl
To test:

Case a) Adding to a new list

1. Enable virtualshelves system preference
2. Search for any record and click it
3. On the right hand side of record view, click "Save to your lists"
4. A new pop up opens.
5. Under "Add to a new list", give any name to the list
6. Under "Add to a new list", click "Save"
7. Observe popup closing
8. Observe record view page reloading

Case b) Adding to an existing list

1. Enable virtualshelves system preference
2. Search for any record and click it
3. On the right hand side of record view, click "Save to your lists"
4. A new pop up opens.
5. Under "Add to a list", select an existing list
(it can be the same as the one you created in case a, it does not matter here)
6. Under "Add to a list", click "Save"
7. Observe popup closing
8. Unlike case a, observe record view page NOT reloading

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8cfce49d14)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c2606618c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 12:39:34 +01:00
Baptiste Wojtkowski 8ac18f49c2 Bug 37684: Direct link to expired news are broken
When using a direct link to a news (koha.url/cgi-bin/koha/opac-main.pl?news_id=XXX), the link is broken if the news is expired.

Formerly, a using AdditionalContent->get( id => "my_news_id") on an
expired news was returning a news, and calling get without id was
returning all news but the expired ones.

This patch adds tests to check this behaviour by adding one expired news and performing following new tests:
1 - It may not be returned by AdditionalContent.get()
2 - It must be returned by AdditionalContent.get() using its id

This patch fixes the behaviour by addind the new behaviour or
AdditionalContent.get:
1 - Any news must be returned by AdditionalContent.get() using its id;

TEST PLAN:
1 - Apply patch
2 - Remove the changes made to Koha/AdditionalContents.pm
3 - Run tests -> one test must fail
4 - Create a news with a expired expiration date, notice the id of the
  news in the url of the modification panel
5 - Go to "opac.url/cgi-bin/koha/opac-main.pl?news_id=MY_ID" -> notice
  it does not work
6 - Reapply the whole patch
7 - Run test -> all test must pass
8 - Go to "opac.url/cgi-bin/koha/opac-main.pl?news_id=MY_ID" -> notice
  it does work now

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4ad5cbdb97)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1be8a9eedd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:52:58 +01:00
Marcel de Rooy 78c719ea95 Bug 37365: (QA follow-up) Add error checking around AddFile call
Test plan:
Add a return; in AddFile to simulate a failing db insert.
Verify that an alert pops up.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 35d90969f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c8cab29919)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:22:36 +01:00
Marcel de Rooy 8768a3f701 Bug 37365: (QA follow-up) Add borrowernumber to referrer url
Since we post to add_message, we need to ensure that the
borrowernumber is added to the referrer url. This 'tric' is
already done there for another form.

Test plan:
See original plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fbc2e2e933)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dd45949443)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:22:36 +01:00
Jonathan Druart 710ddbd960 Bug 30397: Remove duplicate entry from length menu of patrons search
If you have 20 in PatronsPerPage, there will be two 20 entries in the
length menu of the patrons search.
jQuery.unique is stupid it seems, it requires the array to be sorted (?)

let x = [1, 2, 1, 2]
jQuery.unique(x);
Array(4) [ 1, 2, 1, 2 ]

x = [1, 1, 2, 2]
jQuery.unique(x);
Array [ 1, 2 ]

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 60249a979c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c45839b5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 11:19:01 +01:00
David Cook 31a0a7aec3 Bug 22223: t::lib::QA::TemplateFilters missing built-in TT filter "safe_url" causes false warnings
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fe495d19df)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4023df1789)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:54:10 +01:00
David Cook 0048be7498 Bug 22223: Add filter to make item URLs safe in template output
This change adds a "safe_url" filter which takes a text input and
returns a Perl URL object which stringifies to a safe URL.

This change is only needed in the OPAC as the staff interface
handles the item URL display using Javascript not Template Toolkit.

0. Apply patch and koha-plack --restart kohadev
1. Create an item for a record using the following URL
https://koha-community.org?url=https%3A%2F%2Fkoha-community.org
2. Go to the OPAC for that record and verify that the URL is
not double-escaped
3. Create a malicious payload (talk to QA/security team for this if necessary)
4. Note that the malicious payload is escaped
5. prove t/Koha/Plugins/SafeURL.t
6. Celebrate!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e8e00cfeb3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 629d2a6f6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:54:10 +01:00
Jonathan Druart 4eb0a4baba Bug 38303: Set item's replacement price to defaultreplacecost if 0.00
No idea if this is a real bug. This code is fixing the following test
failure:
t/db_dependent/Circulation/CalcFine.t .. 1/7
    #   Failed test 'Amount is calculated correctly'
    #   at t/db_dependent/Circulation/CalcFine.t line 271.
    #          got: '0'
    #     expected: '6'
    # Looks like you failed 1 test of 2.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5776f28efa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 848d6e07ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:40:42 +01:00
Matt Blenkinsop 42ff59d691 Bug 38297: Add a permissions check to the New vendor button
Test plan:
1) Choose a staff patron and make sure they have permissions to log
   into the staff interface
2) Ensure that the patron does not have the vendors_manage permission
   but give them one other acquisitions permission so that they can see
   the link on the homepage (e.g. budget_manage)
3) In an incognito browser, log in with that patron and go to the
   acquisitions homepage
4) The New vendor button will be visible
5) Click on it and fill in the required fields. Submit the form and it
   will error for lack of permissions
6) Apply patch
7) Return to the acquisitions page and the New vendor button should no
   longer be visible
8) Back in your main browser, give the patron the vendors_manage
   permission and then refresh the incognito window - the button should
   be visible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b11b2b213e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 345d1b943a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:38:12 +01:00
Matt Blenkinsop db54be494f Bug 38132: Add data-isbn to shelfbrowser
This patch adds a data-isbn attribute to the shelfbrowser_cover container for use in plugins

Test plan
1) View the patch diff and confirm that the attribute has been correctly added

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2cca46e611)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bf0420b140)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:37:04 +01:00
Jonathan Druart ed9cdb267d Bug 33188: Remove warning from Koha::Item->hidden_in_opac
"Use of uninitialized value in string eq"

Test plan:
  prove t/db_dependent/Koha/Item.t
should return green

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidied the tests (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f575d4cd73)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b27067e9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:35:48 +01:00
Nick Clemens d4db820adb Bug 38266: (bug 21083 follow-up) Increment after comparison
To test:
 1 - Define a patron attribute as repeatable
 2 - Add multiple values to a patron (I used borrowernumber 5)
 3 - Tools->Batch patron modification
 4 - Modify the patron from step 1, selecting the attribute you created and checking the box to clear
 5 - View the patron, they look correct
 6 - Check the DB:
    SELECT * FROM borrower_attributes WHERE borrowernumber=5;
 7 - There is one blank value
 8 - Apply patch
 9 - Repeat batch modification
10 - Check the DB, no attribute!
11 - Test with multiple attributes in the batch modification and ensure only the correct one is removed
12 - Sign off

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a62953aa9e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5178687b67)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:31:04 +01:00
Caroline Cyr La Rose 078afc5161 Bug 38158: Typo in inventory 'Items has no "not for loan" status'
This patch corrects a typo in the inventory tool when an inventory
is done against not for loan items and an item has no not for loan
status.

To test:
1. Go to Cataloging > Inventory
2. Enter a barcode for an item that has items.notforloan = 0 in the "Or scan items one by one" text box
3. Check all the boxes EXCEPT "For loan" under "Optional filters for inventory list or comparing barcodes" > "items.notforloan"
4. Click "Submit"
   --> In the "Problems" column, it says "Items has no "not for loan" status"
5. Apply patch
6. Reload the page
   --> In the "Problems" column, "Item" should now be singular

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit baf884600d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5b320189f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:29:45 +01:00
Lucas Gass 297789e87e Bug 37856: DBIC Schema updates
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5eed8269b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:27:53 +01:00
Lucas Gass b615e56388 Bug 37856: DBRev 23.11.10.004
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1fb5bc4d83)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:21:28 +01:00
Pedro Amorim 94720a0c4a Bug 37856: Add new test to test platform is correctly added to build_url
prove t/db\_dependent/Koha/ERM/EUsage/UsageDataProvider.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e7dbd2a8b7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aae9a4466c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00
Pedro Amorim 0b14f213d9 Bug 37856: Fix existing test
A service_platform value was being randomly to 'service_platform' as is a new attribute.
Assign undef to that to fix existing test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b3fb2e85fe)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b8e7d7152)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-12-18 10:16:51 +01:00