Commit graph

49790 commits

Author SHA1 Message Date
3214a9f937 Bug 23548: (QA follow-up) tidy up code
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3c6971d50c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9212e7580e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:50:32 +00:00
Per Larsson
42bf3db191 Bug 23548: Set AQ to empty when item not exist
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2256a85323)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43022c8798)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:50:32 +00:00
Matthias Meusburger
3205ac9a38 Bug 23548: Unit test - Set AQ to empty when item not exist
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1cd82e29b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e362982884)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:50:31 +00:00
ca8c5451c4 Bug 34641: Fix Novelist display when NovelistSelectView is set to below
To test:
1. Have Novelist credentials:  NovelistSelectProfile,  NovelistSelectPassword.
2. Enable  NovelistSelectEnabled
3. Set  NovelistSelectView to 'below holdings table'.
4. Find a record on the OPAC that would have Novelist content. It does
   not display.
5. Set  NovelistSelectView to any except 'below holdings table'. Notice it displays the content.
6. APPLY PATCH
7. Try steps 1 -5 again, this time when NovelistSelectView is set to
   'below' the content should properly display.

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 0663e692cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 708cc3bccf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:09 +00:00
Katrin Fischer
e92900dd56 Bug 22135: Display 'shelved out of order' error in inventory CSV export
When using the inventory tool with an uploaded barcode file
and checking the "Compare barcodes list to results",
"Check barcodes list for items shelved out of order" and
"Export to CSV file" checkboxes, the resulting CSV file showed
a blank in the "problem" column for items with out of order
callnumbers. With this patch, you'll see "Shelved out of order".

To test:
* Create 3 items with callnumbers and barcodes a, b, and c
* Go to Cataloguing > Inventory
* Enter a c b (each on its own line) into the barcode field
* Check "Compare barcodes list to results"
* Check "Check barcodes list for items shelved out of order"
* Check "Export to CSV file" (at the bottom)
* Verify the file has empty lines in the problem column
* Apply patch
* Repeat test, the empty lines should now read: "Shelved out of order"

Note: Also fixes "problem" to "Problem" to make capitalization
consistent. All those strings are currently not translatable,
this will be filed separately.

Co-authored-by: Mark Alexander <marka@pobox.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d35c3596d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b185fd3fe3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:08 +00:00
6c72cc1f21 Bug 34620: Do not throw expection if payment type is writeoff
To test:
1. Turn on RequirePaymentType
2. Create a manual invoice and then attempt to write it off.
3. 500 error
4. Turn of RequirePaymentType, no error.
5. Apply patch, restart_all
6. Try step 2 again, you should not get an error
7. prove t/db_dependent/Koha/Account.t
8. Make sure tests pass

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 d77aa887e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5cc97ab746)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:08 +00:00
7d6656678e Bug 34625: Fix search engine configuration tables header problem
This patch corrects the JavaScript which allows DataTables to be created
and destroyed based on which tab is clicked on the search engine
configuration page. When you click from one tab to the other, the
original tab's DataTable should be destroyed and the new tab's DataTable
initialized.

To test, apply the patch and go to Administration -> Search engine
configuration (Elasticsearch)

- The page should load with the "Search fields" tab enabled and the
  DataTable initialized: Sorting and filtering should work. If you
  scroll down the page the floating table header should be correct.
- Switch to the "Bibliographic records" tab. This table should have
  filtering enabled, and the floating table header should work when you
  scroll down the page.
- The same should be true for the "Authorities" tab.
- Return to the "Search fields" tab to confirm that the DataTable is
  still working as expected.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cac122b611)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 702356084a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:07 +00:00
cc0fcf8cbe Bug 34569: (QA follow-up) Tidy block
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a707d10d80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 99ac8d1ecb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:07 +00:00
4c20f8830e Bug 34569: Fix misc/cronjobs/holds/holds_reminder.pl trigger arg
misc/cronjobs/holds/holds_reminder.pl help says one can use arge -t for --triggered
But not implemented in code.
Should be like in misc/cronjobs/overdue_notices.pl :
  't|triggered'    => \$triggered,

Test plan :
Play with misc/cronjobs/holds/holds_reminder.pl with arg -t and
--trigger

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 f4f4feb50b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d019a68079)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:06 +00:00
1acf3d9891 Bug 34634: Show expirationdate of expired holds on reserve/request.pl
To test:
1. Place some holds and go to /reserve/request.pl for that bib.
2. If the reserves.expirationdate is set to today or some date in the past the date does not display in the Flatpickr instance.
3. Change the reserves.expirationdate to sometime in the future, the date displays.
4. Aply patch, restart_all
5. Try steps 2-3 again.
6. This time if the expiration date is in the past you should see it displayed. However it will be uneditable.
7. Make sure holds with a expiration date in the future can still be properly edited.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Christine <chlee@pascolibraries.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0710ccb606)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0594b63bae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:06 +00:00
Petr Svoboda
755e4ee5f5 Bug 34583: Overdue notice - wrong coding in outlook in czech e-mail in “print” mode
Koha overdue notice “print” email in Outlook is incorrectly encoded in czech language.
Tested in KohaTestingDocker - https://gitlab.com/koha-community/koha-testing-docker
This patch fixes that error.

Test plan:
Overdue notice, set print in UI, https://snipboard.io/FLkIxf.jpg.

Message body:
<table style="padding:0; margin: 0; border-collapse: collapse; font-family: 'Trebuchet MS', Helvetica, sans-serif; width: 100%; "><tr><td style="vertical-align: top; padding: 0"> </td><td style="width: 75mm; vertical-align: top;"><table style="margin-top: 2.5cm; font-size: 11pt;"><tr><td><<borrowers.cardnumber>></td></tr><tr><td><<borrowers.firstname>> <<borrowers.surname>></td></tr><tr><td><<borrowers.address>> <<borrowers.streetnumber>></td></tr><tr><td><<borrowers.city>></td></tr><tr><td><<borrowers.zipcode>></td></tr></table></td></tr><tr><td colspan="2" style="padding: 0;"><table style="width: 100%; margin: 3cm 0 0 0;"><tr><td style="width: 5mm; height: 5mm; border-bottom: 1px dotted #000;"> </td><td style="height: 1mm;"></td><td style="width: 5mm; height: 1mm; border-bottom: 1px dotted #000;"> </td></tr></table></td></tr><tr><td colspan="2"><table><tr><td style="padding: 0.5cm 0.3cm">V Chrudimi dne <<today>></td></tr><tr><td style="padding: 0 0.3cm">Upozorňujeme Vás, že byla již o 30 dnů překročena doba, na kterou jsme Vám půjčili dokumenty (celkem<<count>>). Žádáme Vás o brzké vrácení těchto výpůjček:</td></tr><tr><td style="padding: 0.5cm 0.3cm;"><table><tr><th>Od</th><th>Do</th><th>Název</th><th>Autor</th><th>Částka</th></tr><item><tr><td><<issues.issuedate>></td><td><strong><<issues.date_due>></strong></td><td><<biblio.title>></td><td><<biblio.author>></td><td><<items.fine>> Kč</td></tr></item></table></td></tr><tr><td style="padding: 0 0.3cm">Zpozdné je účtováno dle ceníku knihovny.</td></tr><tr><td style="padding: 0 0.3cm">Dokumenty můžete vrátit na jakémkoli oddělení knihovny a pobočce v jejich provozní době.</td></tr><tr><td style="padding: 0 0.3cm">Nesplní-li čtenář svou povinnost vyrovnat závazky s knihovou, má knihovna právo postupovat podle příslušných ustanovení občanského zákoníku.</td></tr></table></td></tr></table>

Set delay 1 day, https://snipboard.io/boAd3F.jpg.

Checkout any book.

Set in database issues->date_due = today() - 1
for checkouted book, https://snipboard.io/PrylGB.jpg.

Run this scripts:

koha-shell kohadev -c "/kohadevbox/koha/misc/cronjobs/overdue_notices.pl -v -t"

You must have KOHA set up for sending e-mails (SMTP server). Replace xxx@email.cz to your e-mail and run this script:

koha-shell kohadev -c "/kohadevbox/koha/misc/cronjobs/gather_print_notices.pl /var/spool/koha/kohadev/ --email xxx@email.cz"

Signed-off-by: Michal Denar <black23@gmail.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 7c3a0b9131)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 77a5baf94f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:05 +00:00
Julian Maurice
1fb00fede2 Bug 34266: Add unit tests
Signed-off-by: joubu <xxx@example.org>
Signed-off-by: tuxayo <victor@tuxayo.net>

Took the opportunity to perltidy this file as I was signing off

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added a rollback. Shouldnt harm :)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3d0e443ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d3f6681c5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:05 +00:00
Julian Maurice
c3fce7850a Bug 34266: Default to biblioitems.itemtype only if it's a valid itemtype
biblioitems.itemtype can contain values that are not itemtypes (for
instance if the MARC field mapped to it uses another authorised value
category)
This patch checks that before using it as a default value for the
'itemtypes' item subfield.

Test plan:
0. Do not apply the patch yet
1. Change your MARC framework so that the field linked to
   biblioitems.itemtype uses an authorised value category different from
   'itemtypes'
2. Make sure that you have an item subfield linked to the authorised
   value 'itemtypes' in your MARC framework
3. Create a biblio with an itemtype (using a value that is NOT an item
   type, but a value from the authorised value category you selected in
   step 1)
4. Create a new item for this biblio. Notice that the biblio itemtype is
   automatically selected for the 'itemtypes' subfield
5. Apply the patch
6. Create a new item for the same biblio. Now the 'itemtypes' subfield
   should be empty.
7. Revert the change at step 1 so that your biblioitems.itemtype MARC
   field uses the 'itemtypes' AV category
8. Modify your biblio to use a valid item type.
9. Create a new item. The biblio itemtype should be used as a default
   value

Signed-off-by: joubu <xxx@example.org>
Signed-off-by: tuxayo <victor@tuxayo.net>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 807c58d28d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 27fa85423e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:04 +00:00
31e0e7a024 Bug 34617: Preserve calculated expiration dates if set to update on import whether column included or not
To test:
1 - Setup a csv with column headers:
    surname	firstname	branchcode	categorycode	cardnumber	dateenrolled
2 - add values
    Acosta	Edna	CPL	PT	23529001000463	02/01/2013
3 - Set PT catgeory enrollement period to a specific date in the future
4 - Import the file and overwrite patrons and update dateexpiration
5 - Check Edna, note her date is not correct
6 - Apply patch
7 - Repeat
8 - Expiration date is now set as expected

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 ed2b395a10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0cdabc65f0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:04 +00:00
609a553932 Bug 34617: Unit tests
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 b38780f6cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6a9c3eeeb4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:03 +00:00
9c32767cdf Bug 34646: Fix two attributes class in OPAC masthead-langmenu.inc
In OPAC template masthead-langmenu.inc a link as two class attributes :
  <a class="dropdown-item" href="#" tabindex="-1" class="menu-inactive" role="menuitem">

Test plan :
1) Go to OPAC with at least one translation
2) Look at HTML source code
=> Without patch you see a link with 2 class attributes
=> With patch you see the 2 classes in same class attribute

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 8c63a4bb04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e61fd088d3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-15 09:33:02 +00:00
Katrin Fischer
2e2bc3cd81 Bug 33316: (QA follow-up) Add link to record, fix typo and heading
* h2 h2 directly following each other make no sense. Changed to h2 h3
* ids changed to IDs
* Linked the record ID to the catalog entry
  Note: We also have this link in the batch record mod job details

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a80de2dc83)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:53:46 +00:00
211eeca37a Bug 33316: Improve display of ES indexer jobs
We don't do a lot of processing to the data, but we can still
make the display a bit nicer, to show how many records were
done, and show the record ids.

To test:
1 - Do some batch modifications on a system running ES
2 - Check background jobs to see ES jobs
3 - Note display
4 - Apply patch
5 - Confirm display is improved

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dad9430b7b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:53:45 +00:00
331f188a4e Bug 34276: (bug 21983 follow-up) Fix db rev 23.06.00.002
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>
(cherry picked from commit 352a2afd0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 10324fd587)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:50:03 +00:00
938433b3e9 Bug 33744: Fix cloning (sub)fields with framework plugins
This patch is meant as a temporary measure for fixing the problem.
Bug 30975 may resolve it further, but this is good for now.

Note: The original commit message referred to removing a deprecated internal
structure. But this patch actually still uses the structure which has been
moved to _data in jQuery now.

Test plan:
1) Apply patch
2) Repeat steps in the original bug description
3) This time clicking on the Upload button for a cloned field should launch the uploads pop up.

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 2fa6105779)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e486548409)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:28 +00:00
d0a3ae57c0 Bug 34650: Convert list toolbar delete into form POST
This patch adds a HTML form with a CSRF token to POST the list delete,
which is triggered by a click handler on the A element. The A element
is still needed for existing style reasons.

Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. In the staff interface, add a list
3. Go into that list (e.g. virtualshelves/shelves.pl?op=view&shelfnumber=X)
4. From the toolbar click the "Edit" dropdown
5. From the dropdown try either "Edit list" or "Delete list"
6. Note no CSRF error and operation completes as expected

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 5d3b7cf089)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c4fe03c23)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:28 +00:00
17dcab057f Bug 34650: Remove unnecessary CSRF check on edit_form
The op "edit_form" doesn't change state. It just renders the edit
form. Therefore, it doesn't need a CSRF token/check.

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 caf962fbaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e81e765d7d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:28 +00:00
cd7aece422 Bug 34609: Add missing test for Koha::Hold->biblio
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7cab415f0b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d23e46f8c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:27 +00:00
54ebba70b4 Bug 34609: Add biblio method to Old::Hold
Test plan, clean k-t-d:

1) Add a reserve to koha/koha user, mysql run:
insert into reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, biblionumber)
VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 76);

2) Add an old_reserve to koha/koha user, mysql run:
insert into old_reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, reserve_id)
VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 1);

3) Visit holdshistory on either OPAC (requires OPACHoldsHistory sys pref) or STAFF
STAFF/cgi-bin/koha/members/holdshistory.pl?borrowernumber=1
OPAC//cgi-bin/koha/opac-holdshistory.pl

4) Notice it blows up with a 500 error
5) Repeat step 3

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b57163ef3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ea252ffa0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:27 +00:00
1ffc2d4501 Bug 34609: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eaa1a1d7e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 315927af8b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:26 +00:00
19e908b483 Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue
Test plan:
Apply only the cypress test patch
Run KohaTable_spec.ts
Notice it fails

Apply this patch, repeat

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5316b4c9cc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0645519faf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:26 +00:00
17a013b72a Bug 34466: Cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68baf8a7c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e4ddce3f98)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:47:26 +00:00
Andreas Roussos
19d8928430 Bug 31964: add a man page for koha-z3950-responder
The koha-z3950-responder command does not have a man page.

This patch fixes that.

Test plan:

1) Apply this patch.

2) Run the following command to generate the new man page:

   xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl debian/docs/koha-z3950-responder.xml

3) View the generated man page with `man -l koha-z3950-responder.8`

   (KTD users may need to `apt-get install man-db` first as
   that package provides tools for reading manual pages)

4) Make sure this unit test passes:

   prove -v xt/verify-debian-docbook.t

Signed-off-by: Pedro Amorim <pedro.amorim@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 eb902d7a92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 306ec5c3e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-09-08 09:22:47 +00:00
2b2f2aa8a3 Bug 30362: (Rmaint fix) Fix failing test
A change was introduced in bug 31375 which is not in 22.11.x. This patch rebases the test to remove that change and fix the failing test
2023-09-01 10:35:19 +00:00
a101c7da1a Bug 30362: Fix unit test
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 95aa1c3da5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b0fa0150b8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 13:34:29 +00:00
8bd50acd17 Bug 30362: Unit test
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 145788398a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a419589998)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 13:34:29 +00:00
f9c1bc1f34 Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date
This change fixes GetSoonestRenewDate so that it returns the soonest
renew date as calculated using "No Renewal Before" and "NoRenewalBeforePrecision".
In the past, it would only return the soonest renew date if "$now" was
lesser than it, which would typically only happen when using an "exact"
precision rather than a "date" precision.

Test plan:
0. Apply the patch
1. prove t/db_dependent/Circulation.t

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 f8c474019d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8fc3531e07)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 13:34:28 +00:00
0723661c87 Revert "Bug 30362: Unit test"
This reverts commit 038e88a4bd.
2023-08-31 12:36:58 +01:00
62246c041b Revert "Bug 30362: Fix unit test"
This reverts commit 4e90014d79.
2023-08-31 12:36:44 +01:00
91af482f49 Revert "Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date"
This reverts commit c31d976174.
2023-08-31 12:36:25 +01:00
9d8648eb4e Bug 34313: Unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eeef7839fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit edda7a23cb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:49:58 +00:00
f51aac39e0 Bug 34313: Add patron information in pass validation response
This patch makes the password validation response return the following
patron attributes to the API consumer:

* cardnumber
* userid

This will give hints on what was used to validate in the fallback
bahvior the endpoint has.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/password_validation.t
=> FAIL: The endpoint doesn't return this valuable data
3. Apply this patch
4. Repeat 2
=> SUCESS: Tests pass! We got the cardnumber and the userid!
5. Sign off :-D

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 749783debf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 06f09de19e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:49:57 +00:00
af392e36d6 Bug 34066: Datatable options don't fully translate on list of saved reports
This patch corrects the DataTable option for defining an alternate
language string when no records are returned by a table filter. An
obsolete version of the option name was breaking the existing custom
option supplied by our datatables.js

To test, apply the patch and go to Reports -> Use saved..

 - In the DataTable of existing reports, all the DataTable controls
   should look correct.
 - In the filter field at the top of the table, enter a string which
   will not be found. You should see a message, "No matching reports
   found."
 - Install another language if necessary, and switch to that language.
 - The labels on all the DataTable controls should show the terms which
   have been translated for that language.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e26d7c783e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 12969850e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:36 +00:00
adcd629169 Bug 34465: Make KohaTable.vue actions column not sortable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 60cf53cf79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3fa6983a53)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:36 +00:00
4a794ad0ea Bug 34522: Pass the suggestion branchcode, not the suggester branchcode
To test:
1. Turn on OPACViewOthersSuggestions
2. Log into OPAC as patron of Branch A
3. Make purchase suggestion for Branch B
4. Refresh /cgi-bin/koha/opac-suggestions.pl and see that suggestion appears to have been made for Branch A
5. View suggestion from staff client - See that it accurately reflects suggestion having been made for Branch B
6. Apply patch and try steps 2 - 5 again, this time you should see the proper branch.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cb4db13612)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9feb62a703)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:35 +00:00
ca1efafa62 Bug 34571: Remove use of "onclick" for ExpandField in cataloguing editors
This change replaces the onclick HTML attribute with a Javascript binding
to make it more in line with Koha conventions and make it CSP compatible.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Try hiding/unhiding fields
3. Try cloning fields and hiding/unhiding those too
4. Note that everything works as expected
5. Do the same thing for authorities by going to
http://localhost:8081/cgi-bin/koha/authorities/authorities.pl?authtypecode=#

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 8341ffe13d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8237fdd32a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:35 +00:00
3c84023b84 Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc()
This change removes the "onclick" attribute for the MARC doc
link in the cataloguing editor.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Click on the question mark (?) next to any of the MARC fields
3. Press the "Repeat this tag" button
4. Click on the question mark (?) on the cloned MARC field
5. Note that both times it worked

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 0b992dd12e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19c940c287)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:34 +00:00
Michael Hafen
3d07cffeb4 Bug 34592: Patron Search filter fields needs to be at least an empty array
If buildPatronSearchQuery() doesn't return an empty array when it exits
early, then the code that adds the sort fields to the filters will fail.

Test plan:

- If there is not all ready a patron with a sort1 or sort2 value from
  the bSort1 or bSort2 authorized values, add an authorized value if
  necessary.
- Add a patron if necessary, and set the patrons sort field to the added
  value.
- In Tools -> Patron card creator start a new card batch.
- Click on Add Patron(s) to open the patron search window.
- Pick the value in either the sort1 or sort2 drop down.
- Submit the page.  The page will reload and there won't be results.
- Apply the patch, close the patron search window, clear the browser
  cache, reload the "New patron card batch" page, and open the patron
  search window again.
- Repeat the search. There will be results.

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 275197f405)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e24304ccd5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:34 +00:00
2fa6c105b1 Bug 34115: Use a global tab select function for activating Bootstrap tabs based on location hash
This patch fixes automatic tab selection by location.hash in the MARC
subfield editor. This allows links which target a specific subfield to
open the page with the subfield tab selected.

I've put this into a global function since it can be reused in multiple
places: The about page and the checkout page have variations of this
functionality which can be replaced with this function.

The patch also corrects two links in Koha pointing to the About
page which included the wrong location hash (changed in the switch to
Bootstrap tab wrappers).

To test, apply the patch and go to Adminstration -> Bibliographic
frameworks.

- View the MARC structure for any framework.
  - In the "Search for tag" input field, submit a tag and subfield which
    will be found in that framework, e.g. "245$a"
  - When you submit the form you should be sent to the MARC subfield
   structure page for that tag with the subfield tab automatically
   selected.
- View the MARC subfield structure for any framework.
  - In the table of subfields, click the subfield link in the first
    column. You should be taken to the edit form with the corresponding
    tab selected.
- Go to Circulation and check out to a patron. Append a tab anchor to
  the URL, e.g. "#holds_panel" and submit. You may have to shift-reload
  the page to see the change. (As far as I know no links in Koha take
  advantage of this)
- Perform the same test on the patron detail page
- Go to the About page and perform the same test with a tab anchor like
  "#team_panel" or "#sysinfo_panel"

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 cb6dd4e82b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 72364bb34c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:34 +00:00
Laura Escamilla
fdf505abb0 Bug 34095: Adjust logic so that shipment cost is empty if the receiving shipment cost is blank.
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a5cadff482)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f5e151c1f8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:33 +00:00
64077f45fc Bug 34445: Set default budget in addorderiso2709.pl
This patch allows the default budget to be used as a fallback if no budget is selected. Currently the default budget is set using lines 129-133 but then is never used.

QA follow-up:
- perl tidied
- budget_codes changed to budget_ids for consistency

Test plan:
1) Apply patch
2) restart_all
3) Follow the steps from the bug description
4) Order lines should be added properly

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Rearranged comments
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3427f71ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 216542e4a6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:46:33 +00:00
Laura Escamilla
cc105e01ac Bug 34340: Changed "Tendered" to the correct input id which is "Collected"
Must also apply bug 34332 - fixed a syntax error for the pos email template

To test:
1. Configure your Koha to enable the point of sale system (i.e. enable syspref,
   set up a register, set up an item to sell).
2. Complete a transaction in the POS system.
3. Click on the “Email receipt” button next to the “Print receipt” option and
   enter an email address and confirm that the email is sent.
4. Check the “Tendered” field. It is showing up as 0.00 and not reflecting the
   actual amount that was tendered.
5. Apply patch
6. Repeat steps 2 & 3
7. The emailed receipt is now showing the correct tendered amount.
8. Sign off!

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 f2ecb1e9be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3dea2272e5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:52 +00:00
c31d976174 Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date
This change fixes GetSoonestRenewDate so that it returns the soonest
renew date as calculated using "No Renewal Before" and "NoRenewalBeforePrecision".
In the past, it would only return the soonest renew date if "$now" was
lesser than it, which would typically only happen when using an "exact"
precision rather than a "date" precision.

Test plan:
0. Apply the patch
1. prove t/db_dependent/Circulation.t

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 f8c474019d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8fc3531e07)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:51 +00:00
4e90014d79 Bug 30362: Fix unit test
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 95aa1c3da5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b0fa0150b8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:51 +00:00
038e88a4bd Bug 30362: Unit test
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 145788398a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a419589998)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:50 +00:00