Commit graph

49878 commits

Author SHA1 Message Date
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
eae39cc26f Bug 34567: Correct colors for advanced cataloging editor status bar
This patch updates the advanced cataloging editor CSS so that the
"status bar" footer below the editor has colors consistent with the
staff interface redesign.

To test, apply the patch and clear your browser cache if necessary.

- Enable the EnableAdvancedCatalogingEditor preference if necessary.
- Go to Cataloging -> Advanced editor.
- At the bottom of the screen below the editor the "status bar" should
  have a green border that matches color in the header search bar.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3ed9168315)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e473cb69a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:50 +00:00
e75c29a01c Bug 34601: [22.11.x]Fix edit/delete links on suggestion.tt
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:50 +00:00
46bc558c8e Bug 34627: CMS pages do not correctly display the opaccredits footer
This patch corrects the page structure of CMS pages in the OPAC so that
the contents of the footer, including opaccredits, OpacKohaUrl, and the
language selection bar, are displayed correctly.

This patch contains indentation changes, so ignore whitespace when
viewing the diff.

To test you should have these settings:

- OpacKohaUrl enabled in system preferences
- Some content in the opaccredits HTML customization region
- Some content in the OpacNav HTML customization region
- At least one translation installed and enabled
- The opaclanguagesdisplay preference enabled
- The OpacLangSelectorMode set to "only footer" or "both top and footer"

- Apply the patch and go to Tools -> Pages and create a page with the
  display location "OPAC."
- Open the OPAC link for your newly-created page and confirm that the
  page looks correct:
  - The "main" region with the white background should contain the
    breadcrumb navigation, the sidebar OpacNav content, and the contents
    of your CMS page.
  - The opaccredits and OpacKohaUrl content should appear below that
    region.
  - The language selection footer should be at the bottom of the page.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d5dc65867)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0b12a5fa84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:36:49 +00:00
ff6cb81dbe Bug 34505: Patron invalid age in search_for_data_inconsistencies.pl skip expired patrons
Bug 26311 added patron invalid age in search_for_data_inconsistencies.pl
But this is not relevant for expired patrons, especially in child categories.
Check should skip expired patrons

1) Set a non-expired patron with invalid age
2) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you see the patron
3) Edit patron to be expired
4) Run misc/maintenance/search_for_data_inconsistencies.pl
=> Check you do not see the patron

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] If we do not want to test valid age for expired patrons, you should
obviously test expired first. Reversing the order in the test.
Putting it in the search criteria would be nicer but leads to more
complicated code.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c26dff61e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 22674a7ddf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:54 +00:00
722ce8a403 Bug 34356: Make sort order always default to correct column
To test:
1- Check out an item to a patron
2- View checkout history, default sort is on 'Date due'
3- Enable RecordStaffUserOnCheckout
4- View checkout history, default sort is on 'Checked out by'
5- Apply patch
6- Table should sort to 'Date due' no matter what the sys pref is set to

Signed-off-by: Jason <jrobb@sekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edad82662c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80cc0c03aa)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:53 +00:00
63337f2c52 Bug 34386: Fix inconsistencies in Cities and tows page titles, breadcrumbs, and header
This patch updates the cities administration page so that page title,
breadcrumb navigation, and headings are consistent with each other and
with other parts of Koha.

To test, apply the patch and go to Administration -> Cities and towns.
Check each variation of the page to confirm that page title, breadcrumb
navigation, and heading are correct.

- Main page (listing cities)
- New city
- Edit city
- Delete city

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8460158f6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2fb195eedf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:53 +00:00
c6559d89cf Bug 34379: Fix label of new library group button
This patch corrects the label on the button for creating a new library
group, changing it from "Add group" to "New group" for consistency.

To test, apply the patch and go to Administration -> Library groups.
Confirm that the button is now labeled "New group" and that it
still works to trigger the library group creation modal.

Signed-off-by: Andrew <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 879f7db9e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e67e3bdf73)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:53 +00:00
fe5aed4597 Bug 34385: Correct page heading of transport cost matrix page
This patch corrects the main heading on the transport cost matrix page
so that it matches the page title and breadcrumb navigation.

To test, apply the patch and go to Administration -> Transport cost
matrix. Confirm that the page heading reads "Transport cost matrix."

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c7daaa901b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c54bee813)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:52 +00:00
0b6456b8f8 Bug 25023: Claims returned dates not formatted according to dateformat preference
This patch updates the code for rendering the claims returned table on
the checkout and patron detail pages. Now the dates are formatted using
the global js-date-format.inc code.

To test, apply the patch and make sure the claims returned feature is
enabled by setting a value in the ClaimReturnedLostValue system
preference.

- Check out some items to a patron.
- Under the checkouts tab, mark several checkouts as "Claim returned."
- Open the claims tab.
- The dates in the "Created on" column should be formatted according to
  your dateformat system preference.
  - Change the dateformat preference and return to the checkouts page.
    Confirm that the claims tab shows dates formatted correctly.
- The "created on" and "updated on" columns should sort correctly with
  any dateformat setting. You may have to directly modify the dates in
  the database in order to have the right data for testing this.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1156b3683b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b72c5e9465)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:51 +00:00
519de43634 Bug 34219: Allow getAll to receive additional URL parameters
It's not possible to pass additional URL parameters. We need it at least for bug 32474.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1078daf8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f9dd5e449)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:51 +00:00
6ae9e92b89 Bug 34331: Use register from userenv if parameter not passed
To recreate:
1. Enable the "EnablePointofSale" syspref.
2. Set the "UseCashRegisters" syspref to use.
3. Create 3 new registers (Register A, B and C) with a float amount of $25.
4. Under POS, configure 3 new debit types (i.e. Copies, Earbuds, Friends Donation)
-- You can leave the default amounts blank, or add an amount if desired.
-- Set "Can be manually invoiced?" and "Can be sold?"
5. Under point of sale make a $5 sale of copies under Register A.
6. Under point of sale make a $10 sale of earbuds under Register B.
7. Under point of sale make a $100 sale of Friends Donation under Register C.
8. At circ/set-library.pl set your register to Register A.
9. Go back to POS and view the "Transaction history for Register A" - it shows the correct amount of $5 sold in copies.
10. Go back to circ/set-library.pl and change your register to Register B.
11. Go back to POS and view the "Transaction history for Register B" - it shows the incorrect transaction history. It is showing the transaction history for Register A.
12. Go back to circ/set-library.pl and change your register to Register C.
13. Go back to POS and view the "Transaction history for Register C" - it shows the incorrect transaction history. It is showing the transaction history for Register A.
14. Apply patch, repeat. The correct transactions should now show.

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 bd28eae578)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8103059faf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:23:50 +00:00
285e2a73d6 Bug 34341: Revert Bug 34072: Holds queue search interface hidden on small screens
This patch undoes the changes made by 34072 because they have had a more
far-reaching effect than was expected. I have never been able to
reproduce Bug 34072 before the patch.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Circulation -> Holds queue
- Try adjusting the width of the browser window to confirm that it is
  responsive at various widths.
- When the viewport width is below 768 the page layout will adjust, and
  the contents of the sidebar will drop below the table of holds. This
  is consistent with other pages in the staff interface.
- Check that the corrected CSS has resulted in a correction to the
  layout of submit buttons in forms:
  - For example, in Administration -> Cities and towns -> New city.
  - Before the patch there was no padding between the submit button and
    the white fieldset containing the form fields.
  - After the patch the correct padding has been restored.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8d78ba7ff2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a6e5504aff)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-08-31 10:11:32 +00:00