koha.git
7 weeks agoBug 36113: Adjust default RENEWAL notice template to use TT
Emily Lamancusa [Mon, 15 Apr 2024 21:21:37 +0000 (17:21 -0400)]
Bug 36113: Adjust default RENEWAL notice template to use TT

Test plan:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable the system preference RenewalSendNotice
4. Check an item out to a patron
5. Edit that patron:
    a. Enter a value for Primary email
    b. Set messaging preference to enable email notices for Item
       checkout and renewal
6. Renew the checked-out item
7. Check the patron's Notices tab for the Item renewal notice, and
   confirm that the notice is correct

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36125: (follow-up) Use $KohaDates
Emily Lamancusa [Tue, 30 Apr 2024 12:54:20 +0000 (08:54 -0400)]
Bug 36125: (follow-up) Use $KohaDates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36125: Adjust default HOLD_SLIP to use TT
Emily Lamancusa [Thu, 25 Apr 2024 21:03:20 +0000 (17:03 -0400)]
Bug 36125: Adjust default HOLD_SLIP to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find a patron and make sure their account contains values for
   all of the following fields:
   First name
   Surname
   Card number
   Phone
   Address
   Address 2
   City
   Zipcode
   Email
4. Place a hold for this patron, specifying a hold note
5. Check in an item to fill the hold and click "Confirm and print slip"
6. Confirm that all information on the hold slip is correct

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36608: Adjust TO_PROCESS and AVAILABLE to use TT
Emily Lamancusa [Thu, 25 Apr 2024 20:17:41 +0000 (16:17 -0400)]
Bug 36608: Adjust TO_PROCESS and AVAILABLE to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Go to "my account", and enter a Primary email
4. Under Administration > Libraries, enter an email address for at least
   one library
5. Add the demo user (koha) as the owner of the Main Fund
    a) Go to the Acquisitions module
    b) Click on Main Fund
    c) Click the Actions button at the end of Main Fund row > click Edit
    d) Click "Select owner"
    e) Search for "koha"
    f) Click the Select button
    g) Click Submit
6. Click "Suggestions" on the left side of the page, and click "New
   purchase suggestion"
7. Fill in values for, at minimum:
    Bibliographic information:
        Title
        Author
    Acquisition information:
        Library (set to the library you entered an email for in step 4)
        Fund (set to Main Fund)
9. Submit the suggestion
10. Run the cron job to generate TO_PROCESS notification email:
misc/cronjobs/notice_unprocessed_suggestions.pl -v -c --days=0
11. Set the new suggestion to "Accepted"
    a) Check the checkbox next to the new suggestion
    b) Below the table, set "Mark selected as" drop-down to "Accepted"
    c) Click Submit
12. Create an order from the purchase suggestion
    a) Return to the Acquisitions homepage
    b) Leave the Vendor field blank and click Search
    c) Next to the sample basket (My Basket), click "Add to basket"
    d) Click "From a suggestion"
    e) Click "+ Order" next to the suggestion
    f) Make sure there are values for all required item fields
    g) Click "Add item"
    h) Click Save
13. Close the basket and receive the order
    a) Click "Close basket" and click "Yes, close"
    b) Click "Receive shipments"
    c) Enter a number in "Vendor invoice" and click Next
    d) Check the checkbox next to "My Basket" and click "Receive
       selected" button
    e) Check the checkbox under "Receive?" in the Items table
    f) Click Confirm
14. Return to "my account" and open the Notices tab
--> There should be (among others) notices for "A suggestion is ready to
    be processed" and "Suggested purchase available"
15. Open each of the above two notices, and confirm all the information
    was filled in correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36823: Switch database schema links in Reports from master to main
Phil Ringnalda [Thu, 9 May 2024 22:45:45 +0000 (15:45 -0700)]
Bug 36823: Switch database schema links in Reports from master to main

Test plan:
1. Reports > click Database schema link, verify it gets a 404 not foun
2. Reports > Use saved > click Database schema link, verify 404
3. Apply patch
4. Reports > click Database schema link, verify it loads as main
5. Reports > Use saved > click Database schema link, verify it loads

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36824: Fix conversion of __VERSION__ in system preferences to use main rather...
Phil Ringnalda [Thu, 9 May 2024 23:31:56 +0000 (16:31 -0700)]
Bug 36824: Fix conversion of __VERSION__ in system preferences to use main rather than master

Test plan:
1. Administration > search system preferences for the words database columns
2. Click the links to schema.koha-community.org, note that they 404 with
   /master/ in the URL
3. Apply patch, reset_all
4. Search again, click the links, note that they load successfully with /main/

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36676: SIP2 drops connection on unknown patron id in fee paid message
Jan Kissig [Tue, 23 Apr 2024 18:19:05 +0000 (20:19 +0200)]
Bug 36676: SIP2 drops connection on unknown patron id in fee paid message

When sending a fee paid message to SIP2 with an unknown patron id it will respond with an empty response followed by dropping the connection to a client.

Test plan:
a) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423    124447FT00USDBV0.01|AO|AA2352900100046|ACterm1|
Use of uninitialized value $data in concatenation (.) or string at /usr/share/koha/bin/sip_cli_emulator.pl line 355, <GEN0> chunk 1.
READ:

b) apply patch
c) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423    125602FT00USDBV0.01|AO|AA2352900100046|ACterm1|
READ: 38N20240423    125602AO|AA2352900100046|AFInvalid patron barcode.|

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35812: Fix search URL aliases in Plack Apache config
Michał Kula [Wed, 27 Mar 2024 12:25:49 +0000 (13:25 +0100)]
Bug 35812: Fix search URL aliases in Plack Apache config

Mimic missing stuff from apache-shared-opac.conf into apache-shared-opac-plack.conf, where /search and /opac-search.pl aliases were missing.

Note that while RewriteRule applies before reverse proxy directives and works, ScriptAlias applies purely to standard cgi perl scripts, meaning it didn't apply there.

Now it's mimicked analogously to how /index.html is configured.

This patch fixes an issue where someone might have just a reverse proxy to Plack configured without native Perl scripting, where this URL would then otherwise be failing.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35812: specify canonical URL for the main page
Michał Kula [Wed, 27 Mar 2024 09:20:17 +0000 (10:20 +0100)]
Bug 35812: specify canonical URL for the main page

Currently main page can be accessed by:
- /
- /index.html
- /cgi-bin/koha/opac-main.pl

This specifies the canonical link for all of them to be "/", to aid search engines in assessing what's url to put in the index.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35812: Add canonical URL for biblio details page
Michał Kula [Wed, 27 Mar 2024 09:16:06 +0000 (10:16 +0100)]
Bug 35812: Add canonical URL for biblio details page

This adds a nice canonical URL for search engines to use. Will prevent duplicates with different URL query parameters from getting indexed separately, will also prevent search engine confusion when opac-search.pl redirects to opac-detail.pl when there's just one result.

Should result in prettier/simpler URLs in the search engines too, plus removal of constant warnings in Google Search Console and other tools.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35812: add noindex attribute to search result pages in OPAC
Michał Kula [Wed, 27 Mar 2024 08:25:37 +0000 (09:25 +0100)]
Bug 35812: add noindex attribute to search result pages in OPAC

This will prevent search engines from putting the search results pages into their indexes, to prevent cluttering of the search results and give better visibility to the actual bibliographic records' pages.

Note that "noindex" is separate from "nofollow", meaning that the search engine is allowed to get and process the search results page and extract ("follow") further links from it, such as links to biblio records, which is exactly what we want.

This approach is better to the sitemaps, which search engines are free to choose whether to use or not, based on multiple factors such as the size of the page. In practice for small pages Google will just not download them at all, meaning that indexing by following links around is the only way the indexer will extract any links.

Note that for this to work properly, you must NOT block the affected pages in your robots.txt file (they're not blocked by default).

Also, this patch moves "cssinclude" block in opac-results.tt inside of <head>, because in all other templates it's inside, meaning its current positioning is a small mistake I fixed while at it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36503: (follow-up) Fix tests count
Tomas Cohen Arazi [Fri, 10 May 2024 12:03:46 +0000 (09:03 -0300)]
Bug 36503: (follow-up) Fix tests count

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36503: Move and update unit test
Martin Renvoize [Fri, 3 May 2024 11:34:33 +0000 (12:34 +0100)]
Bug 36503: Move and update unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36503: Fix unit tests
Martin Renvoize [Fri, 3 May 2024 10:19:42 +0000 (11:19 +0100)]
Bug 36503: Fix unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36503: (follow-up) Use the call method of Koha::Plugins
Raphael Straub [Thu, 2 May 2024 09:19:32 +0000 (09:19 +0000)]
Bug 36503: (follow-up) Use the call method of Koha::Plugins

This removes the option to call multiple plugins in a prioritized order,
but this is not needed if there is only one plugin that uses this hook.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36503: (follow-up) Move the plugin hook to include the domain
Raphael Straub [Wed, 24 Apr 2024 13:48:37 +0000 (13:48 +0000)]
Bug 36503: (follow-up) Move the plugin hook to include the domain

This allows the plugin to read/change the domain.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36503: Add a plugin hook after user authentication
Raphael Straub [Thu, 28 Mar 2024 12:31:15 +0000 (12:31 +0000)]
Bug 36503: Add a plugin hook after user authentication

This plugin hook allows to change patron data or define the patron
based on the authenticated user.

To test: Run
prove t/db_dependent/Koha/Auth/Client.t

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31627: (follow-up) Update -Id to -ID
Katrin Fischer [Fri, 10 May 2024 12:04:02 +0000 (12:04 +0000)]
Bug 31627: (follow-up) Update -Id to -ID

This also makes it match with the Message-ID.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31627: (QA follow-up) Tidy test block
Martin Renvoize [Wed, 8 May 2024 12:32:14 +0000 (13:32 +0100)]
Bug 31627: (QA follow-up) Tidy test block

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31627: (QA follow-up) Catch more locations
Martin Renvoize [Wed, 8 May 2024 12:22:02 +0000 (13:22 +0100)]
Bug 31627: (QA follow-up) Catch more locations

This patch moves the header set into Koha::Email->create and passes the
template_id in a few additional locations to ensure we catch more cases.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31627: Add ability to embed the letter id in outgoing email notices
Kyle Hall [Mon, 26 Sep 2022 16:23:33 +0000 (12:23 -0400)]
Bug 31627: Add ability to embed the letter id in outgoing email notices

It can be useful to know exactly what template was used to generate a notice. To further this end, it would be useful be able to send the letter id as part of any emails sent out if there is a letter template associated with the message.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Generate an email notice like a checkout notice
4) Inspect the email headers, note the new X-Koha-Template-Id and
   X-Koha-Message-Id headers!

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36388: Mouse operation does not work in draggable fields in authority editor
Janusz Kaczmarek [Thu, 21 Mar 2024 15:20:24 +0000 (16:20 +0100)]
Bug 36388: Mouse operation does not work in draggable fields in authority editor

When using the authority editor in Firefox, it is not possible to set
the cursor or select text from the text field.

This patch mimics the corrections made in bug 35425 for biblio editor.

Test plan:
==========
1. Start editing an existing authority record and try to put the cursor
   with the mouse in the middle of the content of any subfield or to
   select text with the mouse. It should not be possilbe.
2. Apply the patch (reload plack etc.).
3. Repeat p. 1 - everything should work as expected.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36775: (QA follow-up) Remove max_length attribute
Emily Lamancusa [Thu, 9 May 2024 16:32:35 +0000 (12:32 -0400)]
Bug 36775: (QA follow-up) Remove max_length attribute

The existing code for "Holds to place (count)" sets the input field's
maxlength to remaining_holds_for_record, which does not do what we want
and makes the field unusable when the circulation rules allow unlimited
holds. Better to remove it.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36775: Allow multiple holds on record when holds per record is unlimited
Andrew Fuerste Henry [Thu, 9 May 2024 16:00:12 +0000 (16:00 +0000)]
Bug 36775: Allow multiple holds on record when holds per record is unlimited

To test:
1 set Holds Per Record to Unlimited
2 confirm hold placement interface does not include "Holds to place (count)"
3 apply patch, restart all
4 reload hold placement interface, confirm it does include "Holds to place (count)"
5 set Holds Per Record to 2
6 confirm Holds to place shows when placing a first hold for a patron, but not when placing a second
7 set Holds Per Record to 1
8 confirm Holds to Place does not show
9 sign off and eat a nice snack

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36791: (QA follow-up) Simplify conditional
Emily Lamancusa [Thu, 9 May 2024 15:26:52 +0000 (11:26 -0400)]
Bug 36791: (QA follow-up) Simplify conditional

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36791: Koha explodes when trying to edit an authority rec. with an invalid authid
Janusz Kaczmarek [Mon, 6 May 2024 11:44:26 +0000 (11:44 +0000)]
Bug 36791: Koha explodes when trying to edit an authority rec. with an invalid authid

When trying to open the authority editor with authid=<invalid_authid>
(e.g. a deleted authid) Koha explodes with a message:
Can't call method "authtypecode" on an undefined value at
/kohadevbox/koha/authorities/authorities.pl line 556

This this because authtypecode method is called on the result of
->find without verifying that it was succesful.

Test plan:
==========
1. Try to edit an auth rec. giving as a authid (in URL) a non-existing
   authid, e.g. in ktd, with standard ktd test data:
   http://your_ktd:8081/cgi-bin/koha/authorities/authorities.pl?authid=100000
   Koha should explode with the message:
   Can't call method "authtypecode" on an undefined value at
   /kohadevbox/koha/authorities/authorities.pl line 556
2. Apply the patch; restart_all.
3. Repeat p. 1.  You should get the 404 error page.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches
Phil Ringnalda [Thu, 2 May 2024 23:19:17 +0000 (16:19 -0700)]
Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches

The advanced editor currently saves which Z39.50 servers are selected
in local storage using the index in the sorted array of servers, and
then misreads them back as though they were server_ids. We want them to
be server_ids, since that's immutable and the index can change with
changes in rank or server name.

We use the data-server-id property in the HTML more often as a server_id
than as the index that's currently stored there, so this patches
switches it back to be the server_id, and in the one place we would use
the index, instead uses Array.find to just get the server object instead
of referencing it by index.

Test plan:
 1. Set the preference EnableAdvancedCatalogingEditor to enable
 2. Administration - Z39.50 Servers, for NATIONAL LIBRARY OF FRANCE
    uncheck "Preselected"
 3. To be sure you don't have confusing saved preferences, open
    Firefox's Developer Tools, in the Storage tab open Local Storage and
    select your URL
 4. In the row for cateditor_preferences_{your Koha user id}, if there
    are any values for selected_search_targets, delete them so you
    have "selected_search_targets":{}
 5. Open the advanced editor, and click "Advanced »" in the search box
 6. You should have Local catalog unchecked, LIBRARY OF CONGRESS checked
    because it is preselected, and NATIONAL LIBRARY OF FRANCE unchecked
 7. Toggle each checkbox so Local catalog and France are selected, and
    LoC is unselected.
 8. In a new broser tab, open the advanced editor, and click "Advanced »"
 9. You will see Local catalog unchecked, LoC checked, and France
    unchecked.
    That's the bug.
10. Apply patch, open the advanced editor in a new tab, click "Advanced »"
11. Toggle the checkboxes so Local catalog and France are selected, and
    LoC is not selected.
12. Open the advanced editor in another new tab, click "Advanced »"
13. You should see what you just set, Local catalog and France checked,
    and LoC unchecked, That's the correct behavior.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36804: Fix clear filter
Pedro Amorim [Tue, 7 May 2024 15:46:23 +0000 (15:46 +0000)]
Bug 36804: Fix clear filter

1) Visit serials and click "New subscription":
http://localhost:8081/cgi-bin/koha/serials/serials-home.pl
2) Enter '112' on the record input and '1' on the vendor input. Click "Next"
3) 'First issue publication date' -> Enter some date in the past
4) 'Frequency' -> Enter '2/day'
5) 'Subscription start date' Same as step 3)
6) 'Subscription end date' Some date in the future
7) 'Numbering pattern' -> Enter 'Number'
8) Click 'Test prediction pattern'. Click 'Save subscription'
9) On the left side menu -> Click "Serial collection". Click the yellow button 'Edit serials'
10) On the first serial, edit the status to 'Late'. Save.
11) Visit serials claims:
http://localhost:8081/cgi-bin/koha/serials/claims.pl?supplierid=1
12) Input some dates in "From" and "To"
13) Click 'Clear filter'. Notice it doesn't work.
14) Apply patch. Repeat.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 34263: (QA follow-up): Use flatpickr .clear instead
Pedro Amorim [Fri, 3 May 2024 14:22:13 +0000 (14:22 +0000)]
Bug 34263: (QA follow-up): Use flatpickr .clear instead

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 34263: Suspending holds consecutively populates previously used date falsely
Katariina Pohto [Thu, 2 May 2024 13:09:39 +0000 (16:09 +0300)]
Bug 34263: Suspending holds consecutively populates previously used date falsely

Suspending a hold doesn't clear the date from the date picker. When another hold is suspended
the previously used date will show on the date picker but the value is not set on the hold.
Suspending the hold will suspend it indefinitely. Also the link "Clear date to suspend indefinitely"
will not clear the date picker. This patch will make both the Suspend button and the Clear date link
clear the dates from both the date picker and the variable passed on, making the suspending consistent
with what is seen on the date picker.

Test plan:
1) Place 3 holds on a patron.
2) Suspend a hold and set a date for it.
3) Suspend a second hold and notice the previously used date is shown on the date picker.
   Note that the hold will be suspended indefinitely.
4) Open the suspending window for the third hold and pick a date. Click "Clear date to suspend indefinitely"
   and note the date picker doesn't get cleared. The hold will be suspended indefinitely.
5) Apply patch.
6) Suspend a hold and set a date for it.
7) Suspend a second hold and notice the date picker does not have a preset date.
8) Pick a date and clear it with the "Clear date to suspend indefinitely link".
   See that the date picker also gets cleared.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36774: Add cypress tests
Pedro Amorim [Wed, 8 May 2024 15:26:52 +0000 (15:26 +0000)]
Bug 36774: Add cypress tests

Inside k-t-d, run:
cypress run --spec t/cypress/integration/flatpickr_spec.ts

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36774: Remove wrapper if already exists
Pedro Amorim [Fri, 3 May 2024 14:07:25 +0000 (14:07 +0000)]
Bug 36774: Remove wrapper if already exists

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 34360: Get distinct biblionumber
Nick Clemens [Thu, 11 Jan 2024 11:53:42 +0000 (11:53 +0000)]
Bug 34360: Get distinct biblionumber

This fixes the problem noted in the bug:
[WARN] DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results. at /usr/share/koha/Koha/Objects.pm line 421

We are taking a list of items, assuming the scenario is that these are from a single biblio and possibly some host_items, then searching and ordering conditionally on whether the biblio is a serial.

Current code gets the first biblio from the list - this patch adds a 'DISTINCT' to the results ebfore fetching the column

To test:
1 - Find a biblio in the staff interface
2 - Transfer one of the items a few times
3 - Recreate the issue on the command line:
    export DBIC_TRACE=1
    perl -e 'use Koha::Items; my $items = Koha::Items->search({biblionumber=>9})->search_ordered(undef,{ prefetch => ['issue','current_branchtransfers'] }); $items->next'
4 - Note warning:
    DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results. at /kohadevbox/koha/Koha/Objects.pm line 426
5 - Apply patch
6 - Repeat 3
7 - Error is gone

Signed-off-by: baptiste <baptiste.bayche@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36582: Fix regressions.t
Jonathan Druart [Fri, 10 May 2024 08:04:40 +0000 (10:04 +0200)]
Bug 36582: Fix regressions.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only
Jonathan Druart [Wed, 8 May 2024 12:35:11 +0000 (14:35 +0200)]
Bug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only

The tests are no longer relevant

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
7 weeks agoBug 36687: (RM follow-up) Fix more unit tests
Martin Renvoize [Thu, 9 May 2024 07:58:46 +0000 (08:58 +0100)]
Bug 36687: (RM follow-up) Fix more unit tests

Use currency.active to test `int(1) DEFAULT NULL` now that itemtypes.notforloan
is `NOT NULL DEFAULT '0'`

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
7 weeks agoBug 36687: (RM follow-up) Fix unit tests
Martin Renvoize [Thu, 9 May 2024 07:40:18 +0000 (08:40 +0100)]
Bug 36687: (RM follow-up) Fix unit tests

Set notforloan to '0' as apposed to 'undef' for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
7 weeks agoBug 19768: DBRev 23.12.00.054
Katrin Fischer [Wed, 8 May 2024 17:53:44 +0000 (17:53 +0000)]
Bug 19768: DBRev 23.12.00.054

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 19768: (follow-up) Database update
Owen Leonard [Wed, 8 May 2024 17:37:59 +0000 (17:37 +0000)]
Bug 19768: (follow-up) Database update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 19768: Add "Title notes" tab to OpacSerialDefaultTab preference
Owen Leonard [Tue, 30 Apr 2024 12:08:09 +0000 (12:08 +0000)]
Bug 19768: Add "Title notes" tab to OpacSerialDefaultTab preference

This patch adds a "title notes tab" option to the opacSerialDefaultTab
preference.

To test, apply the patch and restart services.

- Go to Administration -> System preferences -> opacSerialDefaultTab.
- There should now be a new options, "title notes tab."
- Set the preference to the new value.

- Go to the OPAC and locate a bibliographic record which is associated
  with a subscription and which has data in a 5XX notes field.
- On the bibliographic detail page the "Title notes" tab should be
  selected by default.
- Test that the other system preference values still work correctly too.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36618: (QA follow-up) Hide option for titles with no linked record
Matt Blenkinsop [Wed, 8 May 2024 10:30:10 +0000 (10:30 +0000)]
Bug 36618: (QA follow-up) Hide option for titles with no linked record

This patch hides the "Update linked biblio" option for titles that have been created with no linked biblio record

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36618: Add unit tests
Matt Blenkinsop [Wed, 17 Apr 2024 10:34:49 +0000 (10:34 +0000)]
Bug 36618: Add unit tests

prove t/db_dependent/api/v1/erm_eholdings_titles.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36618: Make biblio creation optional for ERM local titles
Matt Blenkinsop [Wed, 17 Apr 2024 10:31:27 +0000 (10:31 +0000)]
Bug 36618: Make biblio creation optional for ERM local titles

This patch makes biblio creation on local title creation optional.

Test plan:
1) Navigate to the local title creation form
2) Create a title and leave the "Create record" box unchecked
3) Submit the form
4) Search the catalogue for the title you have just created - no biblio result will be available
5) Repeat steps 2 - 3 but this time check the box to create a record
6) You should now be able to find a record in the catalogue for the title you just imported

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoRevert "Bug 34263: Suspending holds consecutively populates previously used date...
Katrin Fischer [Wed, 8 May 2024 17:43:22 +0000 (19:43 +0200)]
Revert "Bug 34263: Suspending holds consecutively populates previously used date falsely"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36582: Add option to set library, desk, and register from user menu
Owen Leonard [Fri, 26 Jan 2024 18:14:04 +0000 (18:14 +0000)]
Bug 36582: Add option to set library, desk, and register from user menu

This patch adds an expandable "panel" in the user dropdown menu in the
staff client. Expanding the panel will load the form from
set-library.pl, including library, desk and register options if present.

The patch moves the contents of desk_selection.js and
register_selection.js into staff-global.js so that the functionality is
available on every page.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Test plan stolen from Bug 36572:

1. Have 3 staff accounts to test:
  -STAFF A: superlibrarian
  -STAFF B: loggedinlibrary permission
  -STAFF C: no loggedinlibrary or superlibrarian permission
2. Enable 'UseCirculationDesks' and create some desks. (Admin >
   Circulation desks)
3. Enable 'UseCashRegisters' and create some registers ( Admin > Cash
   registers)
4. Use STAFF A ( superlibrarian ) and make sure you can change branch,
   desk and register.
5. Use STAFF B ( loggedinlibrary permission ) and make sure you can
   change branch, desk and register.
6. Use STAFF C ( no loggedinlibrary or superlibrarian permission ) and
   make sure you can change branch, desk and register.
7. Each time you change you should be redirected to the page you were
   previously on.
8. Turn off UseCirculationDesks, make sure everything still works.
9. Turn off UseCashRegisters, make sure everthing still works.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35648: (follow-up) Remove sorting from transport columns
Owen Leonard [Fri, 3 May 2024 17:12:26 +0000 (17:12 +0000)]
Bug 35648: (follow-up) Remove sorting from transport columns

There's not a simple way to handle sorting of a column containing only
checkboxes, so I think it makes sense to remove the sorting unless
someone feels strongly about it being necessary.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35648: (follow-up) Clear table filter before submitting
Owen Leonard [Fri, 22 Mar 2024 12:47:22 +0000 (12:47 +0000)]
Bug 35648: (follow-up) Clear table filter before submitting

This patch takes advise from elasticsearch-mappings.js and adds an
onsubmit event to clear any DataTables filter before submitting. This
should prevent hidden fields from being overwritten.

To test, filter the table and make a change to one of the visible rows.
After submitting, confirm that the previously-hidden rows retain the
same settings as before.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 35648: Allow sorting of patron categories in Overdue notice/status triggers
Owen Leonard [Tue, 2 Jan 2024 20:11:28 +0000 (20:11 +0000)]
Bug 35648: Allow sorting of patron categories in Overdue notice/status triggers

This patch adds a basic DataTables configuration to the table of patron
categories on the Overdue notice/status triggers page. The table can be
sorted by patron category and can be filtered.

To test, apply the patch and go to Tools -> Overdue notice/status
triggers.

- Confirm that the table of patron categories is sorted by default by
   patron category
- Other columns should not be sortable
- You should see a search field above the table which works to filter by
  patron category.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36755: DBRev 23.12.00.053
Katrin Fischer [Wed, 8 May 2024 16:13:44 +0000 (16:13 +0000)]
Bug 36755: DBRev 23.12.00.053

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36755: Update kohastructure.sql
Kyle M Hall [Tue, 7 May 2024 16:36:31 +0000 (12:36 -0400)]
Bug 36755: Update kohastructure.sql

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
PA amended: Squashed borrower_attribute_types table update

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36755: Atomicupdate file
Pedro Amorim [Thu, 2 May 2024 13:19:05 +0000 (13:19 +0000)]
Bug 36755: Atomicupdate file

Test plan, k-t-d:
1) Apply patches.
2) Run the following SQL and save the output of each:
  SHOW CREATE TABLE pseudonymized_borrower_attributes;
  SHOW CREATE TABLE borrower_attribute_types_branches;
  SHOW CREATE TABLE borrower_attributes;
  SHOW CREATE TABLE borrower_attribute_types;
3) Run updatedatabase
4) Run the SQL queries again, compare the output of each with the previous output before updatedatabase.
5) Make sure the only diff between the two is VARCHAR(10) -> VARCHAR(64)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36755: Update UI input element
Pedro Amorim [Thu, 2 May 2024 13:19:27 +0000 (13:19 +0000)]
Bug 36755: Update UI input element

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32693: Fix history.t
Jonathan Druart [Wed, 8 May 2024 14:51:32 +0000 (16:51 +0200)]
Bug 32693: Fix history.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: DBRev 23.12.00.052
Katrin Fischer [Wed, 8 May 2024 15:27:47 +0000 (15:27 +0000)]
Bug 32256: DBRev 23.12.00.052

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: Use a new SCOBatchCheckoutsValidCategories syspref
Aleisha Amohia [Mon, 6 May 2024 03:42:57 +0000 (03:42 +0000)]
Bug 32256: Use a new SCOBatchCheckoutsValidCategories syspref

So that this functionality can be controlled separately from staff-side batch checkouts

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: (QA follow-up) Tidy sco-main.pl
Martin Renvoize [Wed, 1 May 2024 14:19:09 +0000 (15:19 +0100)]
Bug 32256: (QA follow-up) Tidy sco-main.pl

This tidies the whole file as the patchset touched so much that we
basically needed to tidy all to make the QA scripts clean.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: Handle batch error messages better
Aleisha Amohia [Mon, 29 Apr 2024 04:37:50 +0000 (04:37 +0000)]
Bug 32256: Handle batch error messages better

This enhancement modifies the self-checkout script to better handle 'impossible' and 'needs confirmation' checkout messages.

Test with a combination of barcodes that would invoke these messages, for example:
- impossible: barcode doesn't exist
- impossible: barcode is for a 'notforloan' item type
- impossible: debt
- needs confirmation: barcode already checked out, i.e. confirm renewal

Include barcodes that should have successful checkouts too.

Also, test with the following sysprefs:
- BatchCheckouts: enabled
- BatchCheckoutsValidCategories: none selected

Confirm SCO does not have a multi-line text area for more than one barcode, and doesn't accept more than one barcode.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: Display barcodes not checked out in batch
Aleisha Amohia [Mon, 15 Apr 2024 00:52:58 +0000 (00:52 +0000)]
Bug 32256: Display barcodes not checked out in batch

This patch encourages the user to check out certain items individually if they fail to be checked out in a batch.

This way they will be presented with more useful error messages.

To test:

1 - Enable BatchCheckouts, select nothing in BatchCheckoutsValidCategories
2 - Find three barcodes
3 - log into SCO with a user in category Patron, paste the barcodes separated by newlines and submit. confirm one item is succcessfully checked out and the other two barcodes are listed in the pop-up, encouraged to try checking out individually.
4 - select Patron in BatchCheckoutsValidCategories
5 - log into SCO with your Patron user again, confirm you can check out multiple items at a time

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: (follow-up) Use correct patron category
Aleisha Amohia [Wed, 10 Apr 2024 00:58:30 +0000 (00:58 +0000)]
Bug 32256: (follow-up) Use correct patron category

This patch ensures we check the categorycode of the patron trying to issue the items is valid (based on BatchCheckoutsValidCategories), rather than the categorycode of the AutoSelfCheckAllowed patron.

To test:

1 - Enable BatchCheckouts, select nothing in BatchCheckoutsValidCategories
2 - confirm AutoSelfCheckAllowed is allowed and contains the username and password for the self_check user. Confirm self_check user is in category Staff
3 - log into SCO with a user in category Patron, confirm you can only check out 1 item at a time
4 - select Patron in BatchCheckoutsValidCategories
5 - log into SCO with your Patron user again, confirm you can check out multiple items at a time

Sponsored-by: Koha-US
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: Add message to SCO that batch checkouts works for checkouts only
Aleisha Amohia [Tue, 7 Nov 2023 03:18:02 +0000 (03:18 +0000)]
Bug 32256: Add message to SCO that batch checkouts works for checkouts only

Not yet handling renewals, returns, or items that are impossible to check out.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 32256: Enable batch checkout using self-checkout
Aleisha Amohia [Mon, 28 Aug 2023 04:58:26 +0000 (04:58 +0000)]
Bug 32256: Enable batch checkout using self-checkout

This patch allows more than one item to be scanned and processed at once in Koha's self-checkout module. The items in the batch will still be handled one-by-one, so if any item in the batch requires confirmation (i.e. to be renewed or returned) or is impossible to check out, the process will stop at that item. Any items earlier in the list will be processed, but any items coming after in the list will be ignored. This feature uses the existing BatchCheckouts and BatchCheckoutsValidCategories system preferences to determine if batch checkouts should be allowed.

To test:
1) Open the staff interface. Go to Koha Administration -> Global system preferences. Search for "BatchCheckouts". Confirm BatchCheckouts syspref is disabled, and no categories are selected for the BatchCheckoutsValidCategories syspref.
2) In another tab, open the OPAC self checkout (found out OPACBaseURL/cgi-bin/koha/sco/sco-main.pl) and log in
3) Confirm the self-checkout works as normal for checking out, returning or renewing one item at a time
4) Go back to the staff interface tab (you may need to log back in). Enable the BatchCheckouts syspref but leave the BatchCheckoutsValidCategories syspref empty.
5) Refresh the OPAC self checkout tab. The barcode input field will now be bigger to support a list of barcodes. Enter a list of barcodes separated by newlines and Submit.
6) Only the first barcode should be processed. This is because no categories are valid for BatchCheckouts.
7) Go back to the staff interface tab (you may need to log back in). Select at least your patron category for the BatchCheckoutsValidCategories syspref and Save.
8) Refresh the OPAC self checkout tab. Enter a list of barcodes separated by newlines and Submit. Confirm all valid items are checked out as expected.
9) Test with a few items that are notforloan or would not be valid checkouts. Confirm they are not checked out, but other valid items in the batch are checked out successfully.
10) Test with a batch where one of the items is already checked out to the patron. The batch should get blocked at this item as the self-checkout asks for confirmation.
11) Test with both renewing and returning of items that are already checked out to the patron. This will only work with one item at a time and later items in the list will be ignored.

Sponsored-by: Koha-US
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: DBRev 23.12.00.051
Katrin Fischer [Wed, 8 May 2024 15:07:28 +0000 (15:07 +0000)]
Bug 31097: DBRev 23.12.00.051

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: (follow-up) Rename link from 'account' to 'charges'
Katrin Fischer [Wed, 8 May 2024 15:24:59 +0000 (15:24 +0000)]
Bug 31097: (follow-up) Rename link from 'account' to 'charges'

The tab has been renamed at some point and I think the link should
be adapted to be clear where it leads to.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: (follow-up) Standardize appearance of colon between restriction type and...
Owen Leonard [Wed, 8 May 2024 15:31:55 +0000 (15:31 +0000)]
Bug 31097: (follow-up) Standardize appearance of colon between restriction type and comments

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: (follow-up) Restructure messages a bit
Owen Leonard [Tue, 7 May 2024 14:55:34 +0000 (14:55 +0000)]
Bug 31097: (follow-up) Restructure messages a bit

This patch updates the patron restrictions markup and splits up some
strings to (hopefully) improve the translation process. The patch also
fixes a bug in a previous patch which prevented manual restrictions from
being displayed if there was also a restriction added by
overdue_notices.pl.

Test that all three kinds of restrictions display correctly:

 - Restrictions added by overdue process
 - Manual restriction without an expiration date
 - Manual restriction with an expiration date

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: Update restriction type display text
Martin Renvoize [Tue, 7 May 2024 10:45:40 +0000 (11:45 +0100)]
Bug 31097: Update restriction type display text

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: Add classes, drop an ELSE, drop <br />
Martin Renvoize [Thu, 2 May 2024 10:41:36 +0000 (11:41 +0100)]
Bug 31097: Add classes, drop an ELSE, drop <br />

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: Added more restrictions info
Philip Orr [Thu, 18 Apr 2024 15:41:33 +0000 (15:41 +0000)]
Bug 31097: Added more restrictions info

Added more info to the restrictions message
in circulation as well as to the OPAC display
in "Your account" and to the display of
restriction messages when trying to place a
hold in the OPAC.

To Test:
1. Before applying patch, set system preference
"PatronRestrictionTypes" to "Allow"
2. Go to Administration -> Patron restriction types
3. Add some restriction types, make sure you
fill out both "Code" and "Label"
4. Go to any patron and add one or more of each
restriction type
4a. Make sure that you add some with an
expiration date and some without
4b. Make sure you add some with a comment and
some without
5. Go to that patron's checkout page
6. Notice that only the comments of the
restrictions are displayed and not all info
is displayed
7. Apply the patch
8. Reload the page
9. Notice the restriction types are now
displayed correctly
10. Notice the colon is only displayed
if there is a comment
11. Notice the expiration date is also displayed
12. Open the OPAC and log in with that user
(or if you want to log in with your own user:
 make sure they have all the restrictions
 mentioned above as well)
13. Go to "Your account" in the OPAC
14. Notice the display of restrictions
15. Try to place a hold on any record
16. Notice the display of restrictions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 31097: Display restriction types
Philip Orr [Thu, 18 Apr 2024 09:37:59 +0000 (09:37 +0000)]
Bug 31097: Display restriction types

This patch changes the display of patron
restrictions in checkout and patron details
pages to show the restriction type for each
restriction. It also changes the display so
each restriction is shown on a newline.

To test:
1. Before applying patch, set system preference
"PatronRestrictionTypes" to "Allow"
2. Go to Administration -> Patron restriction types
3. Add some restriction types, make sure you
fill out both "Code" and "Label"
4. Go to any patron and add one or more of each
restriction type
5. Go to that patron's checkout page
6. Notice that only the comments of the
restrictions are displayed
7. Apply the patch
8. Reload the page
9. Notice the restriction types are now
displayed correctly

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36701: Adjust confirmation to hide empty div
Emily Lamancusa [Thu, 25 Apr 2024 18:58:31 +0000 (14:58 -0400)]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36534: Batch operations when using limit in report
Katariina Pohto [Thu, 2 May 2024 11:27:06 +0000 (14:27 +0300)]
Bug 36534: Batch operations when using limit in report

When report results number exceeds the result per page limit, batch
operations link reads "Batch operations with (page limit) records" even
if there are more or less shown records (more when using limit in SQL or
less in the last page of result). This patch fixes the link text to
actual shown records.

To test:
1) Create a report of items with a limit of e.g., 26.
2) Run report.
3) See that number of results shown exceeds 20 but the link says "Batch
   operations with 20 visible records".
4) See that the second page shows 6 results but the link is still for 20
   records.
5) Apply patch.
6) Run report again.
7) See that the link texts will show correctly 26 records on the first
   page and 6 records on the second.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36757: Sync concerns tables
Martin Renvoize [Tue, 7 May 2024 08:45:56 +0000 (09:45 +0100)]
Bug 36757: Sync concerns tables

This patch re-syncs the two catalog concerns display tables markup. We
add the 'Title' field into the catalog/detail version of the table and
split the columns settings so you can control the table distinctly from
the cataloguing module version so we can hide 'title' by default in the
details display tab.

This results in the table matching the display from the cataloguing
module page, i.e. the assignee and status detail displays.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36687: DBIC schema update
Katrin Fischer [Wed, 8 May 2024 14:39:03 +0000 (14:39 +0000)]
Bug 36687: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36687: DBRev 23.12.00.050
Katrin Fischer [Wed, 8 May 2024 14:36:52 +0000 (14:36 +0000)]
Bug 36687: DBRev 23.12.00.050

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36687: Update itemtypes.notforloan to not allow NULL values and change to tinyint(1)
Lucas Gass [Wed, 24 Apr 2024 17:05:18 +0000 (17:05 +0000)]
Bug 36687: Update itemtypes.notforloan to not allow NULL values and change to tinyint(1)

To test:
1. Have some itemtypes.notforloan values set to NULL.
2. APPLY PACTH, updatedatabase, restart_all
3. When you updatedatabase those values should be set to 0.
4. Try updating an itemtypes.notforloan value to NULL. You cannot.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 34263: (QA follow-up): Use flatpickr .clear instead
Pedro Amorim [Fri, 3 May 2024 14:22:13 +0000 (14:22 +0000)]
Bug 34263: (QA follow-up): Use flatpickr .clear instead

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 34263: Suspending holds consecutively populates previously used date falsely
Katariina Pohto [Thu, 2 May 2024 13:09:39 +0000 (16:09 +0300)]
Bug 34263: Suspending holds consecutively populates previously used date falsely

Suspending a hold doesn't clear the date from the date picker. When another hold is suspended
the previously used date will show on the date picker but the value is not set on the hold.
Suspending the hold will suspend it indefinitely. Also the link "Clear date to suspend indefinitely"
will not clear the date picker. This patch will make both the Suspend button and the Clear date link
clear the dates from both the date picker and the variable passed on, making the suspending consistent
with what is seen on the date picker.

Test plan:
1) Place 3 holds on a patron.
2) Suspend a hold and set a date for it.
3) Suspend a second hold and notice the previously used date is shown on the date picker.
   Note that the hold will be suspended indefinitely.
4) Open the suspending window for the third hold and pick a date. Click "Clear date to suspend indefinitely"
   and note the date picker doesn't get cleared. The hold will be suspended indefinitely.
5) Apply patch.
6) Suspend a hold and set a date for it.
7) Suspend a second hold and notice the date picker does not have a preset date.
8) Pick a date and clear it with the "Clear date to suspend indefinitely link".
   See that the date picker also gets cleared.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36786: (Bug 31791 follow-up) Koha explodes when trying to edit a biblio with...
Janusz Kaczmarek [Mon, 6 May 2024 09:08:50 +0000 (09:08 +0000)]
Bug 36786: (Bug 31791 follow-up) Koha explodes when trying to edit a biblio with invalid biblionumber

After changes made to addbiblio with the bug 31791, when trying to open the
editor with biblionumber=<invalid_number> (e.g. a deleted biblionumber)
Koha explodes with a message << Can't call method "can_be_edited" on
an undefined value at /kohadevbox/koha/cataloguing/addbiblio.pl line 555 >>

Test plan:
==========
1. Try to edit a biblio giving as a biblionumber (in URL) a non-existing
   biblionumber, e.g. in ktd, with standard ktd test data:
   http://your_ktd:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=1234567
   Koha should explode with the message:
   Can't call method "can_be_edited" on an undefined value at
   /kohadevbox/koha/cataloguing/addbiblio.pl line 555
2. Apply the patch; restart_all.
3. Repeat p.1.  You should get a page with the info: "The record you are trying
   to edit doesn't exist...".

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36787: staticfines.pl add use Koha::DateUtils::output_pref
Fridolin Somers [Mon, 6 May 2024 10:08:02 +0000 (12:08 +0200)]
Bug 36787: staticfines.pl add use Koha::DateUtils::output_pref

misc/cronjobs/staticfines.pl is calling output_pref() but it is missing from module import :
use Koha::DateUtils qw( dt_from_string );

Test but running staticfines.pl

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36750: Fix Languages vs Language
Jonathan Druart [Tue, 7 May 2024 13:46:54 +0000 (15:46 +0200)]
Bug 36750: Fix Languages vs Language

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36750: Fix aria-label for show more/less links
Jonathan Druart [Mon, 6 May 2024 09:55:28 +0000 (11:55 +0200)]
Bug 36750: Fix aria-label for show more/less links

Didn't manage to keep the more_less_labels because of the space in the
key names

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36750: Use the same label for Zebra
Jonathan Druart [Mon, 6 May 2024 09:38:44 +0000 (11:38 +0200)]
Bug 36750: Use the same label for Zebra

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36750: Fix some labels
Jonathan Druart [Mon, 6 May 2024 09:07:13 +0000 (11:07 +0200)]
Bug 36750: Fix some labels

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36750: (35138 follow-up) Use same display code for OPAC
Nick Clemens [Thu, 2 May 2024 16:44:36 +0000 (16:44 +0000)]
Bug 36750: (35138 follow-up) Use same display code for OPAC

To test:
1 - In OPAC with ES enabled do a search
2 - Note missing facet labels
3 - Apply patch
4 - They are back!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36796: (follow-up) Fix column descriptions for the statistics table
David Nind [Tue, 7 May 2024 05:41:54 +0000 (05:41 +0000)]
Bug 36796: (follow-up) Fix column descriptions for the statistics table

This follow-up to bug 32312 fixes the descriptions for the statistics
database columns, used in guided reports.

It removes the duplicate statistics section in Koha/Database/Columns.pm
so that descriptions are displayed for all columns, as originally
intended.

It also adds a description for the interface column (a new column added
after the original patch was pushed).

Test plan:
1. Go to Reports > Guided reports > Create guided report.
2. Choose 'Circulation' for the module to report on and select
   'Next'.
3. Choose 'Tabular' for the type of report and select 'Next'.
4. Scroll down to the statistics table section and note that some
   columns have descriptions and some don't:
     Statistics date and time / statistics.datetime
     Library / statistics.branch
     Value / statistics.value
     Type / statistics.type
     Item number / statistics.itemnumber
     Item type / statistics.itemtype
     statistics.other
     statistics.location
     Borrower number / statistics.borrowernumber
     statistics.ccode
     statistics.categorycode
     statistics.interface
5. Apply the patch.
6. Restart all the things (restart_all).
7. Repeat steps 1 to 4.
8. Scroll down to the statistics table section again and note that all
   columns now have descriptions:
     Statistics date and time / statistics.datetime
     Library / statistics.branch
     Value / statistics.value
     Transaction type / statistics.type
     SIP mode / statistics.other
     Item number / statistics.itemnumber
     Koha item type / statistics.itemtype
     Shelving location / statistics.location
     Borrower number / statistics.borrowernumber
     Collection / statistics.ccode
     Patron category / statistics.categorycode
     Interface / statistics.interface
9. Sign off :D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36612: (QA follow-up) Add 'source' to public_read_list
Martin Renvoize [Tue, 7 May 2024 12:07:53 +0000 (13:07 +0100)]
Bug 36612: (QA follow-up) Add 'source' to public_read_list

This patch adds the required 'source' field to the public_read_list for
tickets.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Style selections as buttons
Nick Clemens [Tue, 7 May 2024 12:35:04 +0000 (12:35 +0000)]
Bug 30579: (follow-up) Style selections as buttons

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Standardize labels:
Nick Clemens [Tue, 7 May 2024 12:24:24 +0000 (12:24 +0000)]
Bug 30579: (follow-up) Standardize labels:

This patch changes the heading for specific item holds, so the three options are now:

 Hold next available item
 Hold next available item from an item group
 Hold a specific item

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Fix rebase of multi holds form and add CSRF
Nick Clemens [Tue, 7 May 2024 12:01:33 +0000 (12:01 +0000)]
Bug 30579: (follow-up) Fix rebase of multi holds form and add CSRF

This patch restores missing elemtns to multi-hold form and adds CSRF variables

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: Fix rebase issue
Nick Clemens [Thu, 2 May 2024 16:05:35 +0000 (16:05 +0000)]
Bug 30579: Fix rebase issue

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Remove unnecessary nested form elements
Nick Clemens [Fri, 15 Mar 2024 18:03:10 +0000 (18:03 +0000)]
Bug 30579: (follow-up) Remove unnecessary nested form elements

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) fix button id
Emily Lamancusa [Thu, 26 Oct 2023 17:00:10 +0000 (13:00 -0400)]
Bug 30579: (follow-up) fix button id

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Add required label and warning when hold levels required
Nick Clemens [Wed, 25 Oct 2023 12:13:49 +0000 (12:13 +0000)]
Bug 30579: (follow-up) Add required label and warning when hold levels required

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Use same conditions on item groups place hold button as on...
Nick Clemens [Wed, 25 Oct 2023 11:40:04 +0000 (11:40 +0000)]
Bug 30579: (follow-up) Use same conditions on item groups place hold button as on other options

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: (follow-up) Add fieldsets and style disabled elements
Nick Clemens [Mon, 28 Aug 2023 14:42:49 +0000 (14:42 +0000)]
Bug 30579: (follow-up) Add fieldsets and style disabled elements

This patch surrounds each section with a fieldset which allow enabling/disabling
all the elements in one go. CSS is added to make it clear which fields are disabled.

Button for item specific is moved form the multi-hold section

Javascript is simplified to use the new fieldsets

To test:
1 - Repeate test plan on earlier commit
2 - Additionally, search and select multiple records and place hold
3 - Confirm multi-hold placing works :-)

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: Remove doubled notes field
Nick Clemens [Mon, 28 Aug 2023 12:26:44 +0000 (12:26 +0000)]
Bug 30579: Remove doubled notes field

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: Add missing for attribute on label
Jonathan Druart [Tue, 23 May 2023 09:36:43 +0000 (11:36 +0200)]
Bug 30579: Add missing for attribute on label

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 30579: Disentangle multi-hold and single bib forms
Nick Clemens [Fri, 23 Sep 2022 15:06:05 +0000 (15:06 +0000)]
Bug 30579: Disentangle multi-hold and single bib forms

This patch alters the structure of the hold request page to make it clear
that "Hold next available", "Hold item group", and "Hold specific item" are
mutually-exclusive options.

While there is some duplication from this, it makes the sections easier to read
and allows for more variation in the two forms

To test:
 1 - Find a bib with multiple items
 2 - Enable item groups and item group holds in system preferences
 3 - Load the records detail page
 4 - Add an item group on the item groups tab
 5 - Select two items and add to the group
 6 - Click the 'Holds' tab and search for/select a patron
 7 - Confirm the three levels of holds are clear
 8 - Confirm checking the radio next to one disables the others
 9 - Check 'Hold next available item from an item group'
10 - Do not select an item group
11 - Click 'Place hold' and confirm you are notified of need to select an item group
     NOTE: if you are overrirding you may also have an alert that the items cannot normally be put on hold
12 - Click 'Place hold on a specific item' - but do not select an item
13 - Click place hold and confirm there is an alert and you cannot continue
14 - Click 'Hold next available item' and place hold
15 - Hold is successfully placed
16 - Place another hold for the same patron
17 - Only the 'Hold next available item' form is enabled
18 - Confirm you cannot switch hold type
19 - Place hold
20 - Select a new patron and place an item group hold
21 - Select the same patron and place another hold - you are forced to place an item group hold
22 - Select a new patron and place a hold on a specific item
23 - Place a second hold, confirm you can only place it on a specific item

Signed-off-by: hinemoea <hinemoea@inlibro.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36396: DBRev 23.12.00.049
Katrin Fischer [Tue, 7 May 2024 13:16:07 +0000 (13:16 +0000)]
Bug 36396: DBRev 23.12.00.049

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 weeks agoBug 36396: Add tests
Jonathan Druart [Tue, 7 May 2024 10:41:39 +0000 (12:41 +0200)]
Bug 36396: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>