]> git.koha-community.org Git - koha.git/log
koha.git
3 months agoBug 36895: Fix background job link
Matt Blenkinsop [Fri, 17 May 2024 13:48:28 +0000 (13:48 +0000)]
Bug 36895: Fix background job link

This patch fixes the missing job id in the links from the import KBART file page

Test plan:
1) Import a KBART file to get the message at the top of the screen.
2) The message should include a link on the text "see progress"
3) Click the link, it should just take you to the background jobs page
4) Apply patch
5) yarn build
6) Hard refresh the browser
7) Repeat steps 1-3
8) It should correctly take you to the background job

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit dc154e3dd2a4184d23d0cc8a966560bd43cb6038)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36909: Eliminate duplicate ID in cookie consent markup
Owen Leonard [Tue, 21 May 2024 14:47:21 +0000 (14:47 +0000)]
Bug 36909: Eliminate duplicate ID in cookie consent markup

This patch changes markup and CSS in the OPAC and staff client to
eliminate HTML validator warnings about duplicate ids.

To test, apply the patch and rebuild all CSS (Bug 36909: Eliminate
duplicate ID in cookie consent markup).

- If necessary, set the "CookieConsent" system preference to "Require."
- Open the OPAC in a new private window (to prevent previous consents
  from hiding the consent messages).
- You should see a cookie consent bar across the bottom of the page. It
  should look correct, and its contents should reflow well at various
  browser widths.
- Click "Accept all cookies."
- In the header you should now see a "Your cookies" link.
- Click it and confirm that the contents of the modal look correct and
  reflow well at various browser widths.

- Perform the same tests in the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 984960351ec23994d87642ec1b077e7577ca5659)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37198: Improve GetPreparedLetter documentation
Martin Renvoize [Wed, 26 Jun 2024 14:24:01 +0000 (15:24 +0100)]
Bug 37198: Improve GetPreparedLetter documentation

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 149412cb62a074ccdef1e1c2bbbd2bee35c48498)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36141: Add classes to CAS text on OPAC login page
Fridolin Somers [Wed, 21 Feb 2024 09:09:30 +0000 (10:09 +0100)]
Bug 36141: Add classes to CAS text on OPAC login page

This enhancement makes it easier for libraries to change the CAS-related messages on the OPAC login page.

It moved the invalid CAS login message above the CAS loging heading,
like for Shibboleth login.

Test plan :
1) Enable system preference 'casAuthentication'
2) Restart all caches (restart_all in koha-testing-docker)
3) Go to OPAC, logged out
4) Click on 'Log in to your account'
5) In the staff interface, edit the OPACUserJS system preference. Add the following JS and Save:
   $(".cas_invalid").text("Test changing the invalid CAS login message.");
   $(".cas_title").text("Test changing the CAS login heading.");
   $(".cas_url").text("Test changing the CAS account link text.");
   $(".cas_url").after(' <i class="fa fa-globe" aria-hidden="true"></i>');
6) Refresh the OPAC and confirm the text changes to reflect your JS.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0e1289d0149d788d7925c2e01f193da7ef3b469a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36911: (follow-up) Add markup comments
Owen Leonard [Tue, 21 May 2024 17:12:21 +0000 (17:12 +0000)]
Bug 36911: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8d898f1746bfb049950bd3928da1cce9c5c3c14d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36911: Reindent circ-menu.inc
Owen Leonard [Tue, 21 May 2024 16:36:54 +0000 (16:36 +0000)]
Bug 36911: Reindent circ-menu.inc

This patch reindents the circ-menu include file so that it has
consistent indentation. These changes should have no visible effect on
the page.

To test, apply the patch and enable the 'CircSidebar' system
preference if necessary.

- View any circulation page, including the checkout page, to confirm
  that the left-hand sidebar menu is unchanged.
- Test with the 'patronimages' system preference both on and off.

Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 002fbdcc62c83a13ececb1e5e3c53b742f947b8b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36498: Tidy cataloguing/additem.pl
Kyle M Hall [Fri, 17 May 2024 10:29:39 +0000 (10:29 +0000)]
Bug 36498: Tidy cataloguing/additem.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0877dfd16d0891d0b36a906ced6f8f8e83e2d738)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36498: Add ability to set item group display order from additem.tt
Lucas Gass [Tue, 2 Apr 2024 22:27:45 +0000 (22:27 +0000)]
Bug 36498: Add ability to set item group display order from additem.tt

To test:
1. Apply patch, restart_all
2. System preferences -> EnableItemGroups, set to 'Enable'.
3. Find a record and create at least 1 item group.
4. Go to Add item
5. Scroll to the bottom and look for 'Options' underneath 'Add to item group'
6. In the dropdown select 'Create new item group'
7. There should be fields for 'Name' and 'Display order'.
8. Make sure you can add a new item group with and without a display order set. If no display order is set it should default to 0.
9. Try to add a non numerical display order, you should not be able to.

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>
(cherry picked from commit 49c55a03e70d4f4c7362cf45a5103f58c694af01)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36128: (QA follow-up) Add regression test
Martin Renvoize [Thu, 27 Jun 2024 09:01:45 +0000 (10:01 +0100)]
Bug 36128: (QA follow-up) Add regression test

This patch adds a simple regression test to ensure we don't re-introduce
the errant warning.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 18c97c1456b527521624fc9be6f8c3bacaba28f1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36128: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
Denys Konovalov [Sun, 23 Jun 2024 12:13:35 +0000 (14:13 +0200)]
Bug 36128: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm

Fixes the following error message when running the overdues check cronjob on a
Koha system without defined overdue rules:

/etc/cron.daily/koha-common:
Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Overdues.pm
line 686.

by checking if the variable is defined before comparing it.

Test plan:
1. Go to Tools - Overdue notice/status triggers and verify that for every single
   patron type for both Default and every individual library, you have no value
   set for Delay, so that you will never send anyone an overdue notice
2. Run the cron job which creates and sends overdue notices
3. Confirm the above mentioned error no longer appears

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4c8586270af07d4281215d060cef004e33999972)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35240: Add missing IDs to input
Eric Garcia [Tue, 25 Jun 2024 17:18:13 +0000 (17:18 +0000)]
Bug 35240: Add missing IDs to input

1. Tools -> Rotating collections -> Edit collection
2. Use browser dev tools to notice that the inputs don't have matching
   IDs
3. Apply patch
4. Do step 2 again and notice IDs are no longer missing.
5. Sign off :)

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>
(cherry picked from commit 21a66bf17c867734271e57c9f06b0b3e619d9ff0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 30372: Fix value->attribute
Pedro Amorim [Fri, 24 May 2024 16:10:44 +0000 (16:10 +0000)]
Bug 30372: Fix value->attribute

Test plan:
- Activate patron self registration without email verification
- Create several patron attributes as visible and editable in the OPAC, make one mandatory
- Register as a new patron from the OPAC
- Fill in all required fields but the extended attribute
- Fill in at least one of the non-required extended attributes
- Submit
- Verify that the contents of the other extended attribute fields are still present.

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>
(cherry picked from commit 4616ddc8ab4b7b570f9444f999c2b50a463df6d4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36966: Actually fix data-link for local cover images
David Cook [Thu, 30 May 2024 04:16:56 +0000 (04:16 +0000)]
Bug 36966: Actually fix data-link for local cover images

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>
(cherry picked from commit 5b5a50f0cdfed4c960f844dc3dd7db149af2b5d7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36966: Fix data-link for local cover images
David Cook [Wed, 29 May 2024 07:26:18 +0000 (07:26 +0000)]
Bug 36966: Fix data-link for local cover images

This patch fixes the data-link so that the "edit" link at the
bottom of the lightbox viewer correctly takes the user to
the editor interface for the local cover image

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>
(cherry picked from commit e0e179f806452f6713f588572a051e01d3de52b5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36966: Fix local cover image links for items
David Cook [Mon, 27 May 2024 03:33:06 +0000 (03:33 +0000)]
Bug 36966: Fix local cover image links for items

This change fixes the local cover image links for items by removing
unnecessary parameters, an invalid link, and an uninitialised
Template::Toolkit variable.

Test plan:
0. Apply patch
1. Enable syspref 'LocalCoverImages'
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4. Click on the dropdown next to "Edit" at the item level
5. Upload an image for the item
6. Note that the local cover image appears in the holdings table
7. Click on the image and note that it loads in the light box
8. Success!

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>
(cherry picked from commit 4183b073e6c5366d5cd576c1a0efabf0489f9de5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36880: Record overlay rules are not validated
Jan Kissig [Thu, 16 May 2024 08:11:53 +0000 (10:11 +0200)]
Bug 36880: Record overlay rules are not validated

This patch fixes validation of rules, confirmation on deletion of rules and removes some unused source code.

1) Validation of record overlay rules on edit and add action
2) Validation when editing an existing rule
3) Adds confirm when deleting multiple rules

Test plan:
1)
 a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl
 b) just click + Add rule
 c) a new rule with an empty tag is saved

2)
 a) edit an existing rule
 b) empty input value for tag
 c) click Save and check that the rule has now an empty value for tag

3)
 a) delete a rule by checking the checkbox and clicking Delete selected
 b) delete a rule by clicking the Delete button under Actions
 c) notice that b) asks for confirmation

apply patch
1) redo steps and check that form does not get submitted and the input is marked as required

2) redo steps and check that clicking on Save will not submit the form and mark input as required

3) redo steps and check that a standard confirm popup appears

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>
(cherry picked from commit 909a72c58f07fbb7f8eb8d858641779239903bdc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37157: Fix Malformed UTF-8 character in JSON string before decode_json
Hammat Wele [Fri, 21 Jun 2024 17:07:47 +0000 (17:07 +0000)]
Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json

When we add a new identity provider and put some special characters in the Config or Mapping field, we got 500 error when we list the identity providers

To test:
1. Apply this patch.
2. Add a new identity provider
    2.1. fill the form
    2.2. click on «Add default Oauth configuration» and on «Add default Oauth mapping»
    2.3. put some special characters in Configuration and Mapping field
3. Save the form
=> Confirm the identity providers list is shown correctly

Also prove t/db_dependent/api/v1/provider.t.

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>
(cherry picked from commit 55b892dca46b1acdda0e962695699e4bf82d5de6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37016: Invalid due date in SIP renew response
Andreas Jonsson [Thu, 13 Jun 2024 15:00:31 +0000 (17:00 +0200)]
Bug 37016: Invalid due date in SIP renew response

Test plan using koha-testing-docker:

1) Make sure SIP is running.  You may need to edit
   /etc/koha/sites/SIPconfig.xml and remove the 8023 connector and
   restart the SIP-server (koha-sip --restart kohadev)
2) Find a patron, say 23529000197047
3) Set a password by selecting "change password", set it to
   "Password1234"
4) Find a book, say 39999000000856
5) Issue book to patron with sip-client:
   sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \
                      --address localhost --port 6001 -t cr \
                      --su term1 --sp term1 --message checkout \
                      --location CPL --item 39999000000856 \
                      --patron 23529000197047 --password Password1234"\
                      kohadev
6) Note the AH-header in the response which for example:
   'AH20240619    235900'
7) Make a renewal with:
   sudo koha-shell -c "/usr/share/koha/bin/sip_cli_emulator.pl \
                      --address localhost --port 6001 -t cr \
                      --su term1 --sp term1 --message renew \
                      --location CPL --item 39999000000856 \
                      --patron 23529000197047 --password Password1234"\
                      kohadev
8) Make sure the AH-header in the response is different from the
   response to the checkout, for example: 'AH20240624 235900'

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3295fd52279728c222ef6504766ab9d573561e0f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37016: Unit tests
Nick Clemens [Wed, 26 Jun 2024 14:44:34 +0000 (14:44 +0000)]
Bug 37016: Unit tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6aa2198965b1f98eda1d877c39af860c86b208a8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37332: Fix unseen and customer renewal date parameters in svc
Emily Lamancusa [Tue, 16 Jul 2024 14:36:23 +0000 (10:36 -0400)]
Bug 37332: Fix unseen and customer renewal date parameters in svc

To test:
0. Enable unseen renewals
    i. Set the system preference UnseenRenewals to Allowed
    ii. Edit the circulation rules to specify the maximum number of
        unseen renewals allowed
1. Check out an item to a patron
2. In the checkouts table on that patron's account, check the "Renew"
   checkbox for that item
3. Select a custom renewal date using the Renewal due date flatpicker
4. Check the checkbox labeled "Renew as unseen if appropriate"
4. Click Renew selected items
--> The item renews, but its new due date follows the renewal period
    specified in the circulation rules, regardless of what date was
    entered in the Renewal due date field
--> The checkout still has all of its unseen renewals remaining,
    indicating that the renewal was not processed as an unseen renewal
5. Enter another custom renewal date and renew checkout with the Renew
   all button
--> Same result
6. Apply patch and restart_all
7. Repeat test plan
--> Custom renewal date is now respected
--> Number of unseen renewals remaining decreases when "Renew as unseen"
    checkbox is checked
8. Renew the item with the "Renew as unseen" checkbox unchecked
--> Confirm that number of unseen renewals is reset (i.e. the checkout
    once again has all of its unseen renewals remaining), indicating
    that the renewal was processed as a "seen" renewal

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit baa68147535f67c2f14aa9a0a73c41a4a1b51252)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled
Lucas Gass [Mon, 15 Jul 2024 16:20:15 +0000 (16:20 +0000)]
Bug 37345: Only toggle_onsite_checkout() if OnSiteCheckoutAutoCheck is enabled

To test:
1. Find an item to checkout and a patron to check out to.
2. Set a due manually: "Specify due date (MM/DD/YYYY):"
3. Before checking out click the "Remember for session:" checkbox.
4. Check the item out.
5. The specific due date is not retained.
6. APPLY PATCH
7. Try 1 -4 again, now the date should be sticking.
8. Turn on the OnSiteCheckouts system pref and make sure it still works
9. Turn on the  OnSiteCheckoutAutoCheck system pref and make sure the on-site checkbox is still checked after doing an on-site checkout.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3276e0fa0c9931bab75c50b59c66c44f89c459b3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36527: Patron category or item type not changing when editing another circulation...
Phan Tung Bui [Thu, 11 Apr 2024 20:02:27 +0000 (16:02 -0400)]
Bug 36527: Patron category or item type not changing when editing another circulation rule

Plan test :
1. Go to Administration > Circulation and fine rules
2. Add a couple of rules with various patron category/item type
   combinations
3. Click on "Edit" next to one of the rules
   --> The line should become highlighted in yellow and the values
       should be copied in the very last row
4. Click on "Edit" next to another rule
5. Click OK in the browser dialog box to confirm you want to edit
   another rule
   --> Depending on the rules, the values for the patron category
       and/or item type might not change in the editing row
6. Repeat steps 4 and 5
   --> The patron category and item type do not always change
7. Apply the batch
8. Redo step from 3 to 6
9. Observe that category and item type change accordingly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7e8502e087abb1adee1900380b1a67885aeb7fa0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36982: Collections facet does not get alphabetized based on collection descriptions
Lari Strand [Wed, 29 May 2024 10:53:22 +0000 (13:53 +0300)]
Bug 36982: Collections facet does not get alphabetized based on collection descriptions

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 83762f6feec027cf6acff2022c9eb528ac1507d8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37182: Make Koha::Statistic->new preserve 'datetime' if passed
Tomas Cohen Arazi [Tue, 25 Jun 2024 18:01:29 +0000 (15:01 -0300)]
Bug 37182: Make Koha::Statistic->new preserve 'datetime' if passed

This patch does what the title says. This behavior is tested on the
previous patch. Tests are also added for the background job (which
relies on Koha::Statistic->new and was the evidence of this
overwrite behavior).

To test:

1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Statistic.t \
           t/db_dependent/Koha/BackgroundJob/PseudonymizeStatistic.t
=> FAIL: Tests don't pass :-/
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 65375bc34dd7e082331cbccc0299c6a99fea28ce)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37182: Regression tests
Tomas Cohen Arazi [Tue, 25 Jun 2024 13:16:56 +0000 (10:16 -0300)]
Bug 37182: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 386cedeb73a8d5d2b154e70378547893c7a837a4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37163: Fix the redirect after deleting a tag from an authority framework to load...
Phil Ringnalda [Sat, 22 Jun 2024 00:43:22 +0000 (17:43 -0700)]
Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page

When you delete a tag from an authority framework, we intend to redirect you
right back to where you were, on the same page of tags, but because we pick
the wrong variable to set searchfield in the URL, we send you to the first
page instead.

Test plan:
1. Without the patch, Administration - Authority types - in the row for
   CHRON_TERM Actions menu, MARC Structure
2. In the Search for tag: input, type 092 and hit Enter
3. In the row for 092, Actions menu, Delete, in the page that loads click
   Yes, delete
4. In the page you are redirected to, note that you are at Tag 000, and the
   URL is ?searchfield=&authtypecode=CHRON_TERM
5. Apply patch, restart_all
6. Type 092 and hit Enter, Actions menu for the 093 row, Delete, Yes, delete
7. Note that now you have gone to the page where 093 used to be, because
   the URL is ?searchfield=092&authtypecode=CHRON_TERM and you can just
   keep deleting 09x tags one after another

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d3401535b5c2e66537abe6e0f997e34c91d8e273)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37162: Remove the [% IF ( delete_confirmed ) %] stuff in auth_tag_structure.tt
Phil Ringnalda [Sat, 22 Jun 2024 22:57:01 +0000 (15:57 -0700)]
Bug 37162: Remove the [% IF ( delete_confirmed ) %] stuff in auth_tag_structure.tt

Since auth_tag_structure.pl redirects after deleting when the op is
delete_confirmed (which is actually cud-delete_confirmed) rather than loading
the template, there's no reason to have dead code for IF ( delete_confirmed )
which is both never set, and is never called when anything like it is set.

Test plan:
1. With the patch applied, Administration - Authority types - Chronological
   Term row - Actions menu - MARC Structure
2. You've already verified that auth_tag_structure.tt isn't malformed, but for
   extra fun choose a tag, Actions menu - Delete - Yes, delete and verify that
   it was deleted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9e602ce984fe92378604d596ce579226f6f5dc1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37161: After deleting a tag in a MARC framework, redirect back to the tag list...
Phil Ringnalda [Sat, 22 Jun 2024 22:35:31 +0000 (15:35 -0700)]
Bug 37161: After deleting a tag in a MARC framework, redirect back to the tag list rather than showing a 'Tag deleted' page first

Currently after you delete a tag from a MARC framework, Koha intends to show
you a page with the text "Tag deleted" and an OK button to click to go back to
where you were in the list of tags. But because that depends on the template
variable being set for the name of the op in the script, and the name of the
op is "cud-delete_confirmed" which isn't a legal TT variable name, nothing is
set to tell the template what to display, so it displays a mostly-blank page.

Far better to show, don't tell, and just redirect to the list of tags like
deleting a tag from an authority framework does.

Test plan:
1. Without the patch, Administration - MARC bibliographic frameworks -
   Binders row - Actions menu - MARC structure
2. Type 092 and press Enter in the Search for tag: input
3. 092 row - Actions menu - Delete - Yes, delete this tag
4. Stare blankly at the blank page with only a header
5. Apply patch, restart_all
6. Administration - MARC bibliographic frameworks - Kits row - Actions menu -
   MARC structure
7. Type 092 and press Enter in the Search for tag: input
8. 092 row - Actions menu - Delete - Yes, delete this tag
9. Enjoy the sight of the Kits framework showing a search for 092 that
   doesn't show one, because you just deleted it, and now you can delete
   the 096 tag next

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 825c6c5edf953161acf124a4fcecd6d32f719431)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist
Phil Ringnalda [Fri, 17 May 2024 00:01:54 +0000 (17:01 -0700)]
Bug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist

Changing from GetMarcBiblio to Biblios->find plus metadata->record lost the
way that svc/bib used to return 404 when the bib number wasn't found. This
patch restores that by checking for undef after the Biblios->find step.

Test plan:
1. Load e.g. http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 which returns an
   XML bib record
2. Load http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 500 error
2. Appply patch, restart_all
4. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 and get the bib again
5. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 404

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>
(cherry picked from commit 3d1b38b0ade54dae8d565e2195e2e97f4826a0b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 25387: (follow-up) Slightly change wording of alert
Katrin Fischer [Thu, 27 Jun 2024 07:03:20 +0000 (07:03 +0000)]
Bug 25387: (follow-up) Slightly change wording of alert

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1004d47d0093bd5a7547fb7d943837df895ae3eb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 25387: (QA follow-up) Tidy
Nick Clemens [Tue, 25 Jun 2024 21:12:39 +0000 (21:12 +0000)]
Bug 25387: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4c677600f2a3f8b019d54676dcd95faac1784532)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 25387: Warn when merging different authority types
Marion Durand [Wed, 6 Oct 2021 12:49:58 +0000 (14:49 +0200)]
Bug 25387: Warn when merging different authority types

Merging two different authorities types can result in the loss of some
field. This patch adds a warning when merging different type of
authorities and add more display of authorities types during merge.

To test:
1- Find two authorities you what to merge. Be sure that these
authorities have different type
2- Search for these authorities (be sure to have both results on the
results page)
3- For the first authority click on "Actions" then on "Merge", same for
the second one
4- Check that koha is asking you to choose a framework and that
authority types are not displayed
5- Choose a framework, then click on next
6- Check that the authority type is not displayed in the tabs and that
no warning appear
7- Apply the patch
8- Repeat step 1 to 3 again
9- Check that authority type is now displayed next to their ID
10- Repeate setp 5 again
11- Check that the authority types is now displayed in the tabs next to
their ID and that a warning appear

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>
(cherry picked from commit b2ae5380b0741e1d2277a58f264df88f243ecadb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 33563: Add comments for Elasticsearch security config
David Cook [Wed, 22 May 2024 23:49:35 +0000 (23:49 +0000)]
Bug 33563: Add comments for Elasticsearch security config

This patch adds some commented Elasticsearch security configuration,
which shows how to use username/password with HTTPS.

Test plan:
0. Apply patch
1. cp debian/templates/koha-conf-site.xml.in /etc/koha/koha-conf-site.xml.in
2. koha-create --create-db test
3. vi /etc/koha/sites/test/koha-conf.xml
4. Note that the comments for userinfo and use_https are in the koha-conf.xml

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ce90d65603dbffd2c6b8a18468f09f2e66df34c4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37165: Can't edit frequencies due to stray cud- in modify op
Phil Ringnalda [Sat, 22 Jun 2024 23:40:19 +0000 (16:40 -0700)]
Bug 37165: Can't edit frequencies due to stray cud- in modify op

The op modify in subscription-frequencies.pl isn't a cud- operation, it's
a GET of the editing form, so it shouldn't have been changed to cud-modify.

Test plan:
1. Don't apply the patch yet
2. Serials - Manage frequencies - for any frequency click Edit
2. Note that the editing form is empty
3. Apply patch, restart_all
4. Repeat step 2, note that now the editing form has the existing data
5. Change anything, Display order is nice, and save to verify that
   cud-savemod still works

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 96d1ad65b486f3e1962ec13fd2db09afbead82b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud...
Phil Ringnalda [Fri, 21 Jun 2024 19:20:05 +0000 (12:20 -0700)]
Bug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud-delete

Both deleting a basket in Aquisitions and deleting a suggestion in the OPAC
take care of the confirmation in a javascript modal, rather than having a
whole separate page for confirmation, so they should be using the op
cud-delete rather than either cud-delete_confirm (which shouldn't ever be
used) or delete_confirm (which they aren't doing, they already confirmed).

Test plan:
1. There's no wrong behavior to see, so apply patch and restart_all
2. Aquisitions - Vendor search for My Vendor - Click My Basket
3. Click Delete basket, in the popup again Delete basket
4. Click Show baskets for vendor My Vendor and verify the basket is gone
5. OPAC - Your account - Purchase suggestions
6. Create a suggestion, then click the checkbox for it, Delete selected,
   confirm
7. Verify the suggestion was deleted

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fb9edbcf5c3edb937878a02c14e10d5d4cdc98e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37152: Deleting patron categories doesn't warn about categories in use
Phil Ringnalda [Fri, 21 Jun 2024 19:05:11 +0000 (12:05 -0700)]
Bug 37152: Deleting patron categories doesn't warn about categories in use

You can't delete a patron category when it is in use, but because the
script which handles delete confirmation is expecting the wrong op,
cud-delete_confirm rather than delete_confirm, you don't get any warning,
just a failure to delete error message.

Test plan:
 1. Without the patch, Administration - Patron categories
 2. On the row for Staff, click Delete, Delete this category
 3. Note an error message telling you to check the logs for details
 4. Apply patch, restart_all
 5. With the patch, repeat steps 1-2, note that instead of a button for
    Delete this category you get a warning that it is in use
 6. In the list of categories, row for Board, click Delete, Delete this category
 7. Note that the (unused) Board category was deleted

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d913d5ab79c51c262ca16fdb5b938969921eb168)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37152: Deleting framework tags expects a cud-delete-confirm op instead of delete...
Phil Ringnalda [Fri, 21 Jun 2024 18:53:25 +0000 (11:53 -0700)]
Bug 37152: Deleting framework tags expects a cud-delete-confirm op instead of delete-confirm

The scripts for managing biblio and authority framework tag editing are
expecting an op of cud-delete-confirm, but the op that is passed is the
correct thing, delete-confirm, because it's a GET of a page where the
confirmation will happen, not the later cud- operation. You can only see
that the expected op is wrong because the confirmation page doesn't get
the description of the tag.

Test plan:
 1. Without the patch, Administration - MARC bibliographic framework
 2. Default framework Actions menu, MARC structure
 3. In the row for 025, Actions menu, Delete
 4. Note that the page which loads shows "Tag: 025" and "Description:"
    without actually having a description
 5. Administration - Authority types
 6. Default authority type Actions menu, MARC structure
 7. In the row for 046, Actions menu, Delete
 8. Note that the page that loads shows "Tag: 046" without the tag description
 9. Apply patch, restart_all
10. With the patch, repeat steps 1-8, but this time note that you see the
    description of the tag, not just the number. For both, click Yes, delete,
    and verify that the tag is deleted.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 11f5db2641ef87fab981bfa273827b8309125440)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37152: Can't delete an Acquisitions contract
Phil Ringnalda [Fri, 21 Jun 2024 18:38:10 +0000 (11:38 -0700)]
Bug 37152: Can't delete an Acquisitions contract

admin/aqcontract.pl expects the op cud-delete-confirm, but what's sent is
the op delete-confirm because it's just a GET of the page that will actually
do a cud op once it is confirmed.

Test plan:
1. Without the patch, Acquisitions - Vendor search for My Vendor
2. Left Sidebar menu - Contracts - Add a contract
3. Fill in Name, Start date, End date, Save
4. On the line for the contract, click Delete
5. Note that the page that loads has no button for "Yes, delete contract"
   (or for anything else)
6. Apply patch, restart_all
7. Acquisitions - Vendor search for My Vendor
8. Left Sidebar menu, Contracts, click Delete, then Yes, delete contract
9. Vendor search for My Vendor, Left Sidebar Contracts, verify the contract
   is gone

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2fe6305bd7e6886d4003947bdebad2544de15f59)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 32313: Update guided reports column descriptions for items and biblioitems tables
David Nind [Sun, 19 May 2024 02:56:56 +0000 (02:56 +0000)]
Bug 32313: Update guided reports column descriptions for items and biblioitems tables

This adds missing column descriptions to the items and biblioitems
tables (used in guided reports for the Circulation, Catalog,
Acquisitions, and Serials modules).

It also updates some existing descriptions for consistency, removes
biblioitems columns that no longer exist, and sorts items and statistics
descriptions in the source file in alphabetical order.

Test plan:
1. Go to Reports > Guided reports > Create guided report.
2. Choose 'Catalog' for the module to report on, and then select
   'Next'.
3. Choose 'Tabular' for the type of report and select 'Next'.
4. Note that there are no descriptions for these column names
   (proposed column names shown in brackets):
   - items.itemnumber (Koha item number (autogenerated))
   - items.biblionumber (Biblio number (internal))
   - items.bookable (Bookable)
   - items.localuse (Total local uses)
   - biblioitems.ean (EAN)
   - biblioitems.collectiontitle (Series statement)
   - biblioitems.collectionissn (Series ISSN)
   - biblioitems.collectionvolume (Series volume)
   - biblioitems.editionstatement (Edition statement)
   - biblioitems.editionresponsibility (Edition responsibility)
   - biblioitems.cn_source (Source of classification or shelving scheme)
   - biblioitems.cn_class (Classification part)
   - biblioitems.cn_item (Item part)
   - biblioitems.cn_suffix (Call number suffix)
   - biblioitems.cn_sort (Koha normalized classification for sorting)
   - biblioitems.totalissues (Koha issues (borrowed), all copies)
5. Apply the patch.
6. Restart all the things (restart_all).
7. Reload the page.
8. Note that there are now descriptions for the columns in step 4.
9. Note that the descriptions for these columns are changed (for
   consistency with other tables, or clarification):
   - items.itype => Koha item type (previously Koha itemtype)
   - items.timestamp => Modification date (previously Timestamp)
   - biblioitems.timestamp => Modification date (previously Timestamp)
   - biblioitems.illus => Other physical details (previously
     Illustrations)
   - biblioitems.biblioitemnumber => Biblio item number (internal)
     (previously Biblioitem number)
   - biblioitems.biblionumber (and also acqorders.biblionumber and
     biblio.biblionumber) => Biblio number (internal)
     (previously Biblio number)
10. Sign off :D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 50035288b02ff3884d7645092d340e6fbaa772e4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37003: (follow-up) Amend 22.11 RMaint
Martin Renvoize [Tue, 25 Jun 2024 13:14:46 +0000 (14:14 +0100)]
Bug 37003: (follow-up) Amend 22.11 RMaint

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 16e35d5f107031e9573f5f565dedfb428b9c5696)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37003: Add the 24.11 release team
Martin Renvoize [Thu, 6 Jun 2024 10:27:33 +0000 (11:27 +0100)]
Bug 37003: Add the 24.11 release team

This patch updates the teams.yaml to include the voted in 24.11
release team.

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a2ebd5ad2833a84c67ecf8dbbd8820065013f2e9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37091: Correct op parameter in systempreferences.pl
Emily Lamancusa [Fri, 14 Jun 2024 14:29:34 +0000 (10:29 -0400)]
Bug 37091: Correct op parameter in systempreferences.pl

To test:
1. Go to Administration > System Preferences > Local Use
2. Attempt to delete a local system preference
--> The confirmation page displays a blank name and value
3. Click "Yes, delete"
--> The system preference is still there
4. Apply patch, restart_all, and reload page
5. Attempt to delete the system preference again
--> The confirmation page displays correct information
6. Click "Yes, delete"
--> The system preference is deleted successfully

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b0b168b6f84ef00babf566097933de7a338726a7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37047: (QA follow-up) Fix translations
Martin Renvoize [Fri, 21 Jun 2024 13:07:07 +0000 (14:07 +0100)]
Bug 37047: (QA follow-up) Fix translations

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cfc47e746f1b7d116a0cde086bde5d52afcc411a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37047: (QA follow-up) Remove nesting of document ready function
Martin Renvoize [Wed, 19 Jun 2024 12:39:06 +0000 (13:39 +0100)]
Bug 37047: (QA follow-up) Remove nesting of document ready function

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e9f3a7959ae3febdf6527720cae1b7c449d3f614)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37047: (QA follow-up) Move non-bookings code back
Martin Renvoize [Fri, 14 Jun 2024 15:13:26 +0000 (16:13 +0100)]
Bug 37047: (QA follow-up) Move non-bookings code back

We inadvertantly adding a little more than just the bookings table js
into it's own asset. This patch moves that code back and also renames
the asset file to /tables/bookings.js from /bookings-table.js as is the
scheme we're attempting to follow now (see '/modals/').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 876aff189afe27d536c82241b7ae895c13c8656d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37047: Make use of DRY bookings-table.js in moremember.tt
Pedro Amorim [Wed, 12 Jun 2024 11:42:24 +0000 (11:42 +0000)]
Bug 37047: Make use of DRY bookings-table.js in moremember.tt

Test plan:
No functionality change, follow the original test plan and make sure the
table is displayed correctly on both screens:
<intra>/cgi-bin/koha/circ/circulation.pl?borrowernumber=
<intra>/cgi-bin/koha/members/moremember.pl?borrowernumber=1

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>
(cherry picked from commit 5f8c575345aa0ab44922f83142838e7adcf68f6d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37047: Move bookings table JS table to its own file
Pedro Amorim [Wed, 12 Jun 2024 11:39:56 +0000 (11:39 +0000)]
Bug 37047: Move bookings table JS table to its own file

For reusability

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>
(cherry picked from commit 47e9754ec0000f5dd15246c369898d6523d3f5da)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37047: Make Patron Bookings table visible from Patrons Checkout page
Sam Lau [Tue, 11 Jun 2024 16:39:05 +0000 (16:39 +0000)]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.

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>
(cherry picked from commit abb6fdf21711ad704ef3ce4f536cb4899288ffeb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34706: Fix capitalization - Cas to CAS
David Nind [Sat, 15 Jun 2024 10:10:36 +0000 (10:10 +0000)]
Bug 34706: Fix capitalization - Cas to CAS

CAS is an abbreviation and should use capital letters.

Test plan:
1. Enable the casAuthentication system preference.
2. Logout and view the login form.
3. Note that it says "Cas login".
4. Apply the patch.
5. Refresh the login page.
6. Note that it now says "CAS login".
7. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 18e8f95bc5c533e27558bb004c7c131f5aef9fb3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37036: Pass along the branches table for auto renewals
Lucas Gass [Wed, 5 Jun 2024 15:48:43 +0000 (15:48 +0000)]
Bug 37036: Pass along the branches table for auto renewals

To test:
1. Set up autorenewals bu adjusting circulation rules:
'Automatic renewal' -> 'Yes'
'No automatic renewal before' -> 5

2. Set 'AutoRenewalNotices' to 'according to patron messaging preferences'.
3. Set an  AUTO_RENEWALS and  AUTO_RENEWALS_DGST notice to include branch info. I am using this to test:

Branchcode: [% branch.branchcode %]
Branch name: [% branch.branchname %]
Branch address: [% branch.branchaddress1 %]
Branch address2: [% IF branch.branchaddress2 %][% branch.branchaddress2 %][% END %]
Branch city: [% branch.branchcity %], [% branch.branchstate %] [% branch.branchzip %]

4. Make sure your branch has the proper infro. filled out in Libraries administration.
5. Find a patron and adjust the messaging preferences so they receive automatic renewal notices. Also make sure the patron has an email.
5. Check out some items and make them due with the next 5 days.
6. Run the automatic_renewal cron job:

perl /kohadevbox/koha/misc/cronjobs/automatic_renewals.pl -c -v

7. Notice no branch information displays.
8. APPLY PATCH
9. Checkout items from multiple issuing branches to a single patron.
10. Make sure the patron's messaging prefs are set to revieve NON-digestable notices.
11. Run the automatic renewal job, each notice should include the branch information from the issuing library.
12. Change the patron's messageing preferences to receieve digestable notices.
13. Run the job without the --digest-per-branch flag. You should get a single notice with the branch info. coming from the patron's home branch.
14. Run the job with the --digest-per-branch flag. You should get seperate digested notices with the branch info. coming from the issueing library branch.

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>
(cherry picked from commit b793b24f98112a740e8a373752e1a8cae61dec7d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 30493: (QA follow-up) Fix for the only_my_library case as well
Emily Lamancusa [Fri, 14 Jun 2024 19:10:24 +0000 (15:10 -0400)]
Bug 30493: (QA follow-up) Fix for the only_my_library case as well

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 94e1d8ed0c4742f48d23dc0241c0d04f058ee316)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 30493: Pending archived suggestions appear on intranet home page
Baptiste Wojtkowski [Thu, 13 Jun 2024 13:36:18 +0000 (15:36 +0200)]
Bug 30493: Pending archived suggestions appear on intranet home page

If suggestions are archived before their status is changed to something other than "Pending", they still appear on the intranet home page and the acquisitions home page as suggestions to be managed.

WITHOUT PATCH:
1. Go to Acquisitions > Suggestions
2. Click on New purchase suggestion
3. Fill in the form (title only is fine)
4. Click on Submit your suggestion
5. Go to the home page (click the Koha logo)
   --> Notice it says that there is 1 pending suggestion
6. Go to Acquisitions
   --> Notice it says that there is 1 pending suggestion
7. Go to Suggestions
8. Click on the up arrow to the right of the Edit button and choose Archive
   --> There are no more pending suggestions
9. Go to the home page (click the Koha logo)
   --> Notice it says that there is 1 pending suggestion
10. Go to Acquisitions
   --> Notice it says that there is 1 pending suggestion

The search function was fetching suggestions without considering the
"archived" field. I now pick only suggestion that are pending AND not
archived.

WITH PATCH:
9. Go to the home page (click the Koha logo)
   --> Notice it says that there is no pending suggestion
10. Go to Acquisitions
   --> Notice it says that there is no pending suggestion

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e87f4cd550e60d7955551abf44f4dd9c1fd332d5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36428: (QA follow-up) Add bookings_count class to patron details
Martin Renvoize [Thu, 20 Jun 2024 10:13:10 +0000 (11:13 +0100)]
Bug 36428: (QA follow-up) Add bookings_count class to patron details

Somewhere along the line we lost the 'bookings_count' class in the
bookings tab display on the patron details and circulation page.

This patch restores is and as such also restores the correct count
numbers on 'place booking' and 'cancel booking' actions on those pages.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ecd1b3fc023438bdf9fe3c4cce7eb4c7fcdb68c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36428: (QA follow-up) Remove filter_by_future
Martin Renvoize [Thu, 20 Jun 2024 10:05:07 +0000 (11:05 +0100)]
Bug 36428: (QA follow-up) Remove filter_by_future

I actually already started to remove this in another bug, but it makes
sense to do it here where we're introducing the 'active' filter.  I'm in
agreement that this should probably always have been an 'active' rather
than 'future' filtering.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 39920e03f1b7975cfea71345279235b9e9f5ecbb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36428: Add Bookings->filter_by_active and use it for display
Nick Clemens [Fri, 31 May 2024 11:13:23 +0000 (11:13 +0000)]
Bug 36428: Add Bookings->filter_by_active and use it for display

Currently the bookings tab on a biblio details and patron details use 'filter_by_future'
which lists upcoming bookings.

Libraries would like to see upcoming, and active bookings in these cases, and we should add a filter
for bookings that have not ended.

NOTE: This removes the only uses of filter_by_future, but I preserve this for Martin's decision as the creator
of the bookings module

To test:
 1 - Make an item bookable from the items tab on a record details
 2 - Return to details view and place a booking
 3 - Note sidebar says "Bookings (1)"
 4 - Make the booking current from the DB:
     UPDATE bookings SET start_date=NOW() WHERE biblio_id={biblionumber};
 5 - Reload the page
 6 - Note the count is now "Bookings (0)"
 7 - View the patron's details page - note "Bookings (0)" and none listed
 8 - Apply patch
 9 - Reload biblio details, note Bookings(1)
10 - Reload patron details, note Bookings(1) and booking is listed
11 - End the booking:
     UPDATE bookings SET end_date=NOW() WHERE biblio_id={biblionumber};
12 - Confirm booking no longer listed on biblio or patron details

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>
(cherry picked from commit 859e84417eb57e9b505972b85a9b1d94992b946b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36984: Fix "Transit pending from..." message in bibliographic record detail page
Adolfo Rodríguez [Thu, 30 May 2024 10:07:21 +0000 (12:07 +0200)]
Bug 36984: Fix "Transit pending from..." message in bibliographic record detail page

Transfering a rotating collection will mark the items contained in the collection as "Transit pending..." and it will trigger a javascript error in the bibliographic record detail page that breaks the holdings table, leaving it caught in the "Processing..." message. This patch fixes that.

The javascript messages gives this error in the console tab:
Uncaught TypeError: Cannot read properties of undefined (reading 'str')

The error comes from using from_library_ insted of from_library in the file koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc

Test plan:
1 Create a rotating collection
2 Add at least an item to the collection
3 Transfer the rotating collection
4 Check the detail page of the bibliography record of any of the items that belong to that collection in the Intranet. Notice that the holdings table gets stuck "Processing..." and that there is a Javascript error
5 Apply patch, restart services
6 Repeat step 4. Now the holdings tab works as intended and the item from the collection shows up with the text "Transit pending from..." in the Status column
7 Sign off

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>
(cherry picked from commit 0dd1f43547d59ed0c11cde01c59a68baf6829480)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37069: OPAC authorities search is stateless
Nick Clemens [Tue, 11 Jun 2024 12:36:15 +0000 (12:36 +0000)]
Bug 37069: OPAC authorities search is stateless

This patch removes cud- from the search op and chanegs the form
submission to GET

To test:
1 - Search authorities on OPAC for 'a'
2 - Click page 2
3 - You get the search form
4 - Apply patch, restart all
5 - Repeat search, confirm it works
6 - Click page 2
7 - Confirm you get next results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1a2b7405695e8fff5175b5f04d39e956a272bc16)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37127: Authorized value select not working on authority forms
Phil Ringnalda [Wed, 19 Jun 2024 16:58:18 +0000 (09:58 -0700)]
Bug 37127: Authorized value select not working on authority forms

Linking an authority subfield to an authorized value just leaves a blank
in the form rather than creating a <select>, because there's a stray cud-
in the type returned from build_authorized_values_list.

Test plan:
 1. Without the patch, Administration - Authority types - Actions menu for
    Default - MARC Structure
 2. Actions menu for 040 - Subfields
 3. Edit subfields - Tab b - Authorized value - set to LANG - Save changes
 4. Authorities - New authority - Default
 5. In 040 tag, click CATALOGING SOURCE to expand the tag
 6. Note that subfield b has a blank space rather than a dropdown menu
 7. Apply patch, restart_all
 8. Authorities - New authority - Default
 9. In 040 tag, click CATALOGING SOURCE to expand the tag
10. Note that subfield b has a dropdown menu listing language names

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>
(cherry picked from commit b0f53c5affda60ddfe3284d4b272320c02575037)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37129: Patron attributes linked to an authorized value don't show a select menu...
Phil Ringnalda [Wed, 19 Jun 2024 17:45:18 +0000 (10:45 -0700)]
Bug 37129: Patron attributes linked to an authorized value don't show a select menu in batch modification

Test plan:
1. In Administration - Patron attribute types verify you have the default
   SHOW_BCODE using the YES_NO authorized value
2. Tools - Batch patron modification, add a patron card number or
   borrowernumber and continue
3. For Patron attribute select Show barcode on the summary screen item
   listings, and note that you get a blank text input rather than a select
   menu with Yes and No choices
4. Apply patch, restart_all
5. Repeat step 2 and 3, but note that you now get a Yes/No select menu

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>
(cherry picked from commit b8614bd579f9e0369b84b5ad9cd1e6a2059d6fc6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37089: cud-delete_confirm should not be cud
Emily Lamancusa [Fri, 14 Jun 2024 14:03:22 +0000 (10:03 -0400)]
Bug 37089: cud-delete_confirm should not be cud

Adjust aqbudgets.pl and currency.pl to check for the correct op value

To test:
Part 1 - Delete a fund
1. Go to Acquisitions > Funds
2. Try to delete a fund
   --> Confirmation page shows fund name as '' and fund amount as 0.00
3. Click "Yes, delete this fund"
   --> The fund is still there

Part 2 - Delete a currency
3. Go to Acquisitions > Currencies
4. Try to delete a currency
   --> Confirmation shows empty values for currency and rate
5. Click, "Yes, delete this currency"
   --> An error message appears and the currency is not deleted

6. Apply patch and restart_all
7. Repeat steps 1-5
   --> Confirmation pages display correct information, and deletions
       occur successfully

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5083d5752c2413cc265c6e9682539e6495c7c906)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37080: Cannot delete MARC bibliographic frameworks or authority types
Phil Ringnalda [Thu, 13 Jun 2024 02:25:14 +0000 (19:25 -0700)]
Bug 37080: Cannot delete MARC bibliographic frameworks or authority types

The scripts for managing both bib and authority frameworks are now expecting
an op 'cud-delete_confirm' but delete_confirm isn't cud, it's just a GET of a
page asking if you are sure. The scripts just need to expect the op they are
actually getting, delete_confirm.

Test plan:
 1. Administration - MARC bibliographic framework - New framework
 2. Give the framework any code and description and Submit
 3. Actions menu for your new framework - Delete
 4. Note the message says 'Confirm deletion of framework '' ()?" rather than
    having the code and description included.
 5. Click Yes, note that deleting failed
 6. Administration - Authority types - New authority type
 7. Give the authority type any type and description and Submit
 8. Actions menu for your authority type - Delete
 9. Note the message again says '' () rather than 'desc' (FOO)
10. Click yes, note that deleting failed
11. Finally! Apply patch, reset_all
12. Repeat steps 1-10, this time noting that you get 'desc' (FOO) rather than
    '' (), and that deleting works.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c81b201dc92eadafbc2349afeec800562d9aa501)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37090: Correct op parameter in edi_accounts.pl
Emily Lamancusa [Fri, 14 Jun 2024 14:16:47 +0000 (10:16 -0400)]
Bug 37090: Correct op parameter in edi_accounts.pl

To test:
1. Go to Acquisitions > EDI Accounts
2. Create an EDI account if one is not already there
3. Try to delete the EDI account
--> Page refreshes and nothing happens
4. Apply patch, restart_all, and refresh the page
5. Try to delete the EDI account again
--> A confirmation page displays with correct information
6. Click "Yes, delete"
--> The EDI account is deleted

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 199b21bfc34460a5434ee0db41d98fb03b3e4b68)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 30623: (RM follow-up) Terminology: settings -> permissions
Martin Renvoize [Fri, 14 Jun 2024 10:13:08 +0000 (11:13 +0100)]
Bug 30623: (RM follow-up) Terminology: settings -> permissions

We're copying permissions not settings here, so it makes sense to make
that clear in the wording.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee560652eca82da4f8e9c516be352180866bb7aa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35294: Fix typos in catalogue code comments
Brendan Lawlor [Thu, 6 Jun 2024 13:14:43 +0000 (13:14 +0000)]
Bug 35294: Fix typos in catalogue code comments

Test plan:
1. git grep -n -E 'barocode|preproccess' to find the files and line # of typos
2. Apply the patch
3. git grep -E 'barocode|proccess'
4. See no results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e8ef0f9417588345d6c9f7e2e5986e4e53986f52)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 25520: Fix the SMS number input hint on the OPAC messaging page
David Nind [Tue, 4 Jun 2024 01:57:37 +0000 (01:57 +0000)]
Bug 25520: Fix the SMS number input hint on the OPAC messaging page

This makes the hint when entering an SMS number on the OPAC messaging
settings page the same as the staff interface hint: "Please enter
numbers only. Prefix the number with + or 00 if including the country
code." For some countries using either +XX or 00XX are accepted,
for example: +49 or 0049.

Test plan:
1. Set the SMSSendDriver system preference to Email
2. View the current hint for entering an SMS number in the staff
   interface:
   2.1 Go to Patrons > + New patron > Patron.
   2.2 Scroll down to the 'Patron messaging preferences' section at the
       end of the page.
   2.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + or 00 if including the country code.".
3. View the current hint for entering an SMS number in the OPAC:
   3.1 Go to the OPAC > Your account (log in if required).
   3.2 Select the 'Messaging' tab/section.
   3.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + if including the country code.".
   3.4 The difference: "..or 00.." is missing.
4. Apply the patch.
5. Refresh the OPAC messaging page.
6. The hint text for the OPAC is now the same as the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 313cf37a53b8ff97387a4bd630635d4784bb7a36)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36922: Patron attributes - update hint text for "Is a date"
David Nind [Fri, 31 May 2024 21:19:57 +0000 (21:19 +0000)]
Bug 36922: Patron attributes - update hint text for "Is a date"

The date field for patron attributes is now repeatable (enhancement made
in Koha 24.05 with bug 32610). This updates the hint text to reflect
the change.

Test plan:
1. Go to add a patron attribute (Administration > Patrons and
   circulation > Patron attribute types > + New patron attribute type )
2. Note that the hint for the "Is a date" field says "...Date attributes
   cannot be repeatable or linked to an authorised value category.".
3. Apply the patch.
4. Reload the page.
5. Note that the hint now says "...Date attributes are repeatable,
   but cannot be linked to an authorised value category."
6. Sign off D:

PA amended: 'are repeatable' -> 'can be repeatable'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a8e1d8dc90df1dcd55949a986c09fb9256d8dad9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36338: Update onboarding error message when creating the Koha administrator patron
David Nind [Thu, 16 May 2024 03:59:42 +0000 (03:59 +0000)]
Bug 36338: Update onboarding error message when creating the Koha administrator patron

Update the error message for the web installer onboarding
section when creating the Koha administrator patron (where
the card number or username already exists):
- Fix capitalization
- Use the same label in the error message as used in
  the form

Error message before: The patron has not been created!
Card number or Userid may already exist.

Error message after: The patron was not created! The
card number or username already exists.

Test plan:
1. Option 1:
   1.1 Review the diff for the patch and make sure that
       the updated text makes sense.
       . Previous text: The patron has not been created!
         Card number or Userid may already exist.
       . Updated text: The patron was not created! The
         card number or username already exists.
OR
2. Option 2:
   2.1 Access the database server:
       mysql -uroot -ppassword -hkoha-db-1
   2.2 Drop the koha_kohadev database:
       drop database koha_kohadev;
   2.3 Create the database: create database koha_kohadev;
   2.4 Add privileges (for a real installation this would
       be limited):
       grant all on koha_kohadev.* to koha_kohadev;
   2.5 Restart everything (there may be some errors listed):
       flush_memcached and then restart_all
   2.6 Access the web installer: go to 127.0.0.1:8081
   2.7 Use the database user name and password: get from
       /etc/koha/sites/kohadev/koha-conf.xml
       (default: koha_kohadev, password)
   2.8 Continue through the installation process until you
       reach 'Selecting default settings':
      . Make appropriate selections to use all the sample
        data options and settings
   2.9 For the 'Onboarding' step - Create Koha
       administrator patron:
       . Surname: Acevedo
       . First name: Henry
       . Card number: make up a number that doesn't exist in
         the sample date, for example: 741852963
       . Library: Centerville
       . Patron category: Staff
       . Username: 23529000035676 (this is an existing
         value already in the sample data)
       . Password: a valid password, for example:
         KohaCon2024
       . Confirm password: repeat password used
       . Submit
         ==> Error message before patch: The patron has not
             been created! Card number or Userid may
             already exist.
   2.10 Apply the patch.
   2.11 Repeat step 2.9
   2.12 The error message is now: The patron was not created!
        The card number or username already exists.

3. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bd195784a0a2d039e825d4dd86ff8b4734b4dd13)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36930: Item search gives irrelevant results when using 2+ added filter criteria
Janusz Kaczmarek [Wed, 22 May 2024 21:08:35 +0000 (21:08 +0000)]
Bug 36930: Item search gives irrelevant results when using 2+ added filter criteria

In the Item search the librarian is allowed, in the first step, to define
additional filters like Title, Author, Publisher, Publication date etc.
(in the third fieldset).  This works fine but only for one criterion.
If one adds two or more criteria, the filter does not apply at all.

Test plan
=========
1. Make an Item search with the Pulblisher filter. Put
   %University of California% as the value.
   You should get 5 rows (with standard ktd test data set), three
   from 1982, and two from 1988.
2. Edit search -> add the second criterion: AND Publication date is 1982.
   You would expect three rows but you get 900+ rows.
3. Apply the patch; restart_all.
4. Repeat p. 2. You should get the expected three rows.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bdc7ac2c93f9af9ac196c77da47758a1078c47d7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36961: Fix typo in opacreadinghistory system preference description
David Nind [Tue, 28 May 2024 01:34:41 +0000 (01:34 +0000)]
Bug 36961: Fix typo in opacreadinghistory system preference description

Fix a spelling error in the opacreadinghistory system preference
description - 'itms' to 'items'.

Test plan:
1. In the staff interface view the description for the
   opacreadinghistory system preferences (Koha administration >
   System preferences > search for opacreadinghistory).
2. Note that it reads "Allow patrons to see what itms they have
   checked out in the past."
3. Apply the patch.
4. Refresh the page.
5. Note that 'itms' is now spelt correctly as 'items'.
6. Sign off.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cd95ea29c09c31760666469811d07dfc79e0723b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36940: Resolve two warnings on undefined branchip
Marcel de Rooy [Thu, 23 May 2024 08:47:50 +0000 (08:47 +0000)]
Bug 36940: Resolve two warnings on undefined branchip

If you enabled AutoLocation and have a branch without ip, this
triggers warnings.

Test plan:
Check logs in this situation with/without this patch by logging out
and in again on staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2f1ffbc6ec088c6c18bad967086db1e51084403f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34573: (follow-up) Add better logic for add/update title and headers
Owen Leonard [Thu, 6 Jun 2024 12:54:18 +0000 (12:54 +0000)]
Bug 34573: (follow-up) Add better logic for add/update title and headers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 865ca8b1fca9f4c8b929050e5472dde1a55d72ff)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34573: (follow-up) Additional updates for modify vendor page
David Nind [Tue, 21 Nov 2023 23:11:02 +0000 (23:11 +0000)]
Bug 34573: (follow-up) Additional updates for modify vendor page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 58c1f64f773880838894db6c6a67da20e1c8e8b2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34573: Fix inconsistencies in acquisitions modify vendor title tag
Owen Leonard [Tue, 21 Nov 2023 13:48:42 +0000 (13:48 +0000)]
Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag

This patch updates the vendor details template so that the title tag
correctly reflects whether the user is viewing the vendor or modifying
it.

To test, apply the patch and go to Acquisitions.

- Locate a vendor and view the details (supplier.pl?booksellerid=X)
  - The title should read "Vendor X > Acquisitions > Koha"
- Edit the vendor.
  - The title should read "Modify vendor X > Acquisitions > Koha"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3baaf5a3241bc78fb46c8b4844dcd21dd6516eef)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34077: Allow to use --category-code as the only filter option
Julian Maurice [Fri, 16 Feb 2024 08:31:27 +0000 (09:31 +0100)]
Bug 34077: Allow to use --category-code as the only filter option

--category-code was not checked in the "at least one filter option"
check but it is clearly a filter option.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5cb77532ebbe01632f7f27046a2e86a03eac36b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34077: Improve documentation and error messages of writeoff_debts.pl
Julian Maurice [Fri, 16 Feb 2024 08:23:13 +0000 (09:23 +0100)]
Bug 34077: Improve documentation and error messages of writeoff_debts.pl

* Change the SYNOPSIS to better describe the different ways to use the
  script
* Only show the SYNOPSIS when options used are wrong (unknown option,
  no filter options, or neither -c nor -v)
* Show the options details only with --help
* Clarify the fact that -v is required when -c is not supplied in the
  description of both options
* Print a specific error message for the following cases:
  * no filters options
  * neither -c nor -v was supplied

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 215b29a737eff191477306581b8b3a1579adc9e3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36937: Remove warning from unit tests
Matt Blenkinsop [Thu, 23 May 2024 09:23:10 +0000 (09:23 +0000)]
Bug 36937: Remove warning from unit tests

This patch fixes a warning in the unit tests

Test plan:
1) prove t/db_dependent/api/v1/password_validation.t
2) There will be a warning in the output - 'Use of uninitialized value $status in numeric eq (==)'
3) Apply patch
4) Re-run the test
5) The warning will disappear

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5e7572ad7a86cb39d901088367f76b212d64989e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 30715: Terminology for the log viewer - use 'Staff interface' instead of 'Intranet'
David Nind [Mon, 3 Jun 2024 02:01:30 +0000 (02:01 +0000)]
Bug 30715: Terminology for the log viewer - use 'Staff interface' instead of 'Intranet'

The log viewer (Tools > Additional tools > Log viewer) uses
'Intranet' as:
- an option for filtering what log entries to display.
- a value in the log entries interface column, for log entries.

Koha's terminology guideline is to use 'Staff interface' instead of
'Interface' (https://wiki.koha-community.org/wiki/Terminology#I).

Test plan:
1. Perform some actions that will create log entries when using the
   staff interface. For example:
   1.1 Enable the UseRecalls system preference.
   1.2 Edit the title for a record.
   1.3 Add an item for a record.
2. Use the log viewer to view the logged changes:
   2.1 Go to Tools > Additional tools > Log viewer.
   2.2 Select Submit.
   2.3 Log entries are displayed for the changes made.
3. Note that:
   3.1 For the log viewer 'Interface' filter options, "All" is
       selected by default, and other options are Intranet, OPAC,
       SIP, Command-line, REST API, and Cron job.
   3.2 For the changes viewed in step 2, the value displayed in
       the 'Interface' column is 'Intranet'.
4. Apply the patch.
5. Refresh the page.
6. Note that:
   5.1 For the interface filter options, 'Intranet' is now changed
       to 'Staff interface'.
   5.2 In the list of log entries, the value in the interface column
       is now 'Staff interface'.
7. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 540ec4f6dc1816f835ca0e3cdb3cbc169d370f5c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36999: Fix 00-strict.t fails to find koha_perl_deps.pl
Fridolin Somers [Fri, 31 May 2024 07:45:27 +0000 (09:45 +0200)]
Bug 36999: Fix 00-strict.t fails to find koha_perl_deps.pl

Since Bug 36323 moved koha_perl_deps.pl it is not needed anymore in 00-strict.t
It fails with :
koha_1       | Can't stat koha_perl_deps.pl: No such file or directory
koha_1       |  at /usr/share/perl5/Test/Strict.pm line 151.

Patch remove koha_perl_deps.pl from @dirs.
It contains misc.

Test plan :
prove t/db_dependent/00-strict.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 325a96a4069759b1f66bd4eaaadcc098abfdd968)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37031: Club enrollment from staff interface fails due to Entrollment typo
Phil Ringnalda [Sat, 6 Jul 2024 22:34:06 +0000 (15:34 -0700)]
Bug 37031: Club enrollment from staff interface fails due to Entrollment typo

There is a typo in svc/club/enroll - it tries to call
Koha::Club::Entrollments->search when it should be
Koha::Club::Enrollments. This causes and error when
enrolling patrons in clubs.

Test plan:
1. Without the patch, Tools - Patron clubs - New club template - name it
   and save
2. New club - (your template) - name it and save
3. Circulation - check out to a patron - Clubs tab - Enroll - Finish
   enrollment, get alert() about failure to enroll
4. Apply patch, restart_all
5. Enroll - Finish enrollment, success

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>
(cherry picked from commit f02d90938dbe0ff8efd43cad23abb066d5642d51)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37316: Adjust tests
Lucas Gass [Thu, 11 Jul 2024 17:37:58 +0000 (17:37 +0000)]
Bug 37316: Adjust tests

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e071ba329deae6a801b6f920a1540570724be509)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37316: Treat empty string barcodes as undef
Lucas Gass [Thu, 11 Jul 2024 17:17:29 +0000 (17:17 +0000)]
Bug 37316: Treat empty string barcodes as undef

To test:
1.Add the following to MarcItemFieldsToOrder:

homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g|949$j
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l
coded_location_qualifier: 949$f
enumchron: 949$h

2. Add the following to MarcFieldsToOrder:

price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

3. Acquisitions > Find a vendor
4. Create a new basket -> Add to basket -> From new file
5. Use the file uplodaded in this bug report.
6. Set format to MARCXML and stage for import.
7. Add staged files to basket
8. Select all, make sure you add an item type, and choose 'Do not look for matching records'
9. Save and kaboom.
10. APPLY PATCH and restart_all
11. Follow the steps again, this time no kaboom.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b68373ae429408fb5291c6dbe5e7bebe27e40e5f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37316: Add tests
Lucas Gass [Thu, 11 Jul 2024 17:16:32 +0000 (17:16 +0000)]
Bug 37316: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b4bdf286cea61501bd3bd1936a42960444186ee)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37059: Fix insert button in notices and slips
Brendan Lawlor [Mon, 24 Jun 2024 14:54:05 +0000 (14:54 +0000)]
Bug 37059: Fix insert button in notices and slips

This patch fixes the insert button in notices and slips. The container id needed to be appened with '_panel'

To Test:
1. Edit any notice or slip and try to use the insert button
2. Nothing happens
3. Apply patch and refresh the browser
4. Edit any notice or slip and use the insert button
5. Confirm the parameters are inserted into the tempalte as expected.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5c5a7d42e6b0731d77dc215ae54b67ae3ec46768)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35942: OPAC user can enroll several times to the same club
Kyle M Hall [Tue, 30 Jan 2024 15:58:02 +0000 (10:58 -0500)]
Bug 35942: OPAC user can enroll several times to the same club

Test Plan:

1) Create 3 clubs, 1 limited to library A, 1 limited to library B and one not limited
2) Use a patron with home library A.
3) Go to the opac-user page, "Clubs" tab show 0/2 (the one from library B is not listed)
4) Browse to /cgi-bin/koha/svc/club/enroll?id=1
5) Reload that page a couple times
6) Note the patron is now enrolled in the same club multiple times
7) Delete those enrollments
8) Apply this patch
9) Restart all the things!
10) Repeat steps 2-7, note the lack of duplicate enrollments!
11) Repeat steps 2-10 for the staff interface

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>
(cherry picked from commit c735c027fabbd91fad2a3208fb0a80c8e2f1eaf3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37014: Fix after-modal-POST to transmit "not_returned" message
Andrii Nugged [Mon, 3 Jun 2024 00:50:24 +0000 (03:50 +0300)]
Bug 37014: Fix after-modal-POST to transmit "not_returned" message

The bug report addresses an issue where the message "Item was not checked in" erroneously appears during the second POST after a manual or modal check-in process.

1. In circ/returns.pl:
   - Introduced a new hash `%rinot_returned` to track items not returned across pages.
   - Updated the logic to capture the "not returned" status from the query parameters.
   - Adjusted the input processing loop to include `not_returned` status.
   - Modified the section handling barcode check-ins to appropriately initialize and update the `not_returned` status.

2. returns.tt:
   - Added hidden input fields in the template to include `not_returned` status in the form submissions.

The changes ensure that the "not_returned" status is correctly tracked and displayed, preventing the erroneous message from appearing on subsequent POST requests.

1. Perform a manual check-in of an item, but make some warning modal appear: for ex., transfer: check-in the item in not home library.
2. Press OK on the modal. There will be a POST transition again to redraw the checked-in items list.
3. Verify that the "Item was not checked in" message appears erroneously near the item's row.
4. Apply the patch.
5. Repeat steps 1-3 and check that there will be no erroneous "Item was not checked in" message.

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f567d41b91092711278a1e00accb1ebdee59f4c2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37005: Fix problem with item_type_description being undefined
Lucas Gass [Fri, 31 May 2024 21:30:43 +0000 (21:30 +0000)]
Bug 37005: Fix problem with item_type_description being undefined

To test:
1. Set noItemTypeImages to 'Don't show'
2. Find a record with items and notice the holdings table never loads.
3. APPLY patch, maybe clear borwser cache too.
4. Try again, the holdings table should load.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 37b66a2d7c4803de8ffee491973baab8b4a3071d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37187: Fix deletion of label batches and label templates
Owen Leonard [Wed, 26 Jun 2024 14:56:58 +0000 (14:56 +0000)]
Bug 37187: Fix deletion of label batches and label templates

This patch uses the new form-submit JS to convert the label management
deletion link from a GET operation to POST.

To test, apply the patch and go to Cataloging -> Label creator.

- Click Manage -> Label batches. Create a batch if necessary.
- Click the "Delete" button in the "Actions" column. You should get a
  confirmation message, "Are you sure you want to delete this?"
  - Test both the confirming and cancelling.
- Perform the same test with Manage -> Label templates.
- From the Manage -> Label batches page, click "edit" on one of the
  batches.
- Right above the "Items in batch number X" is a toolbar which should
  have a button, "Delete batch." Test that it works correctly to delete
  the batch.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5f156ad3dff5db21a3d87eecf3207661ce6961f4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36956: Allow all providers to be displayed in reports
Matt Blenkinsop [Tue, 28 May 2024 10:39:33 +0000 (10:39 +0000)]
Bug 36956: Allow all providers to be displayed in reports

This patch fixes an incorrect usage of the API which was only returning 20 results.

Test plan:
1) Go to ERM module and make sure you have more than 20 data providers stored in your database.
1) (Optional) Run the following command (k-t-d) to create 21 data providers:
  perl -MKoha::Database -e '
      my $schema = Koha::Database->schema;

      $schema->resultset("ErmUsageDataProvider")->create({
          name => "name ".$_
      }) for (1..21)
  '
2) Go to eUsage / reports and create new report (cgi-bin/koha/erm/eusage/reports)
3) Check that only the first 20 data providers are displayed in the drop down
4) Apply patch
5) yarn build or reset_all to rebuild the javascript
6) Repeat steps 1-3, all providers should now be displayed

PA amended patch: Updated commit message test plan

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6afe1e14dc0e42b34ed57e9c29637ef8edbe24ab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37078: Damaged status not showing in detail.pl
Phil Ringnalda [Sat, 22 Jun 2024 18:58:41 +0000 (11:58 -0700)]
Bug 37078: Damaged status not showing in detail.pl

The API returns the fact that an item is damaged in 'damaged_status' but the
code that builds the holdings table is looking for 'damaged' so it doesn't
find that an item is damaged.

Test plan:
1. Administration - Authorized values - DAMAGED row, click Add
2. Give it the Authorized value 2 and the Description Awful
3. On a record with more than one item, like Empress of the blues,
   edit one item to have Damaged status: Damaged and one to have
   Damaged status: Awful
4. On the bib detail view, note that the status column shows both
   as 'Available'
5. Apply patch, refresh
6. Note that now one shows as Damaged and one as Awful (verifying that
   the value is being read from the AV, not the fallback default which
   is also 'Damaged')

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 65e0ffa882ee1c1079723b21bf84c43c303a08e2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36459: Do not duplicate duedatespec IDs
Lucas Gass [Wed, 12 Jun 2024 19:40:03 +0000 (19:40 +0000)]
Bug 36459: Do not duplicate duedatespec IDs

To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date
   (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer
   populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set
   correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts
   still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e33714cd0dae87391f73e1f5db3ed3e2b2b9cda7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36424: Remove trailing comma in DBRev 23.06.00.061
Pedro Amorim [Wed, 3 Jul 2024 12:35:34 +0000 (12:35 +0000)]
Bug 36424: Remove trailing comma in DBRev 23.06.00.061

This fixes a syntax erorr in the database update for
the bookings tables.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7e1559a7944abee1c1619cc1f1bbbd646622a60)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37071: Updated the purchase suggestions link
Laurae [Tue, 11 Jun 2024 14:04:38 +0000 (14:04 +0000)]
Bug 37071: Updated the purchase suggestions link

To test:
1. Go to a patron account and click on “New purchase suggestion” under the “Purchase Suggestions” tab.
    1. Clicking on the button will take you to the suggestions management page.
2. Apply the patch.
3. Go back to the patron account and click on the “New purchase suggestion” link again. This time it will take you to the purchase suggestion form. You are now able to successfully submit a purchase suggestion.
4. Sign off and have an amazing day. :D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
(cherry picked from commit a7484ed7598a6c1263dc5b205e3570f943bbcd60)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37037: (RM follow-up) Add hint at end of script run
Martin Renvoize [Thu, 13 Jun 2024 12:38:57 +0000 (13:38 +0100)]
Bug 37037: (RM follow-up) Add hint at end of script run

This patch adds a hint to the end of the script to notify the end user
that they may need to run the build_holds_queue cronjob if they are
using RealTimeHoldsQueue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8dd9c94c5772c7481632f20af0025a4bf1e2662b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37037: touch_all_biblios.pl triggers rebuilding holds for all affected records...
Kyle M Hall [Wed, 5 Jun 2024 15:04:31 +0000 (11:04 -0400)]
Bug 37037: touch_all_biblios.pl triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

If RealTimeHoldsQueue is on, touch_all_biblios triggers a update_holds_queue_for_biblios background job for each affected record. This will result in a as many background jobs being queued up as records! It makes far more sense for this script to not do that which gives the administrator the option for running the holds queue builder if the changes would affect holdability, or to not run it at all.

Test Plan:
1) Run touch_all_biblios.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this patch
5) Merge touch_all_biblios.pl again
6) Note that no update_holds_queue_for_biblios jobs were queued

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45bfbd0e2d7622eeac913682e95163a3f4489641)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 35869: Removes the dismiss button from messages on OPAC SCO module
Sam Lau [Wed, 5 Jun 2024 17:57:10 +0000 (17:57 +0000)]
Bug 35869: Removes the dismiss button from messages on OPAC SCO module

This removes the "Dismiss" button from the SCO module. Currently, the
"Dismiss" button is present, however it does not function properly and
logs the user out if they press it. As noted on previous chats, keeping
the button would require serious changes, thus it's easier just to remove
the functionallity.

To test:
1) Enable  WebBasedSelfCheck
2) Add an OPAC mesaage to a patron account
3) Login to self check ( http://localhost:8080/cgi-bin/koha/sco/sco-main.pl )
4) See the OPAC message, click dismiss.
5) Notice you are logged out at redirected to:
   ( http://localhost:8080/cgi-bin/koha/opac-dismiss-message.pl )
6) Apply patch
7) Log back into the self checkout module
8) Notice that there is no longer a "Dismiss" button for the message.
9) Log into OPAC into the same user's account
10) On the summary page, note that there is still a dismiss button.
11) Ensure this still works properly
12) sign-off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2313bc310373778338bcbf7ab38a415f10bfbda1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 37021: Change item_id type as integer in holds endpoint
Emmi Takkinen [Tue, 4 Jun 2024 10:00:05 +0000 (13:00 +0300)]
Bug 37021: Change item_id type as integer in holds endpoint

When one makes a GET call to holds endpoint and hold has
item attached to it, item_id is handled as string not integer
as it should.

To reproduce:
1. Make sure you have hold waiting in your database.
2. Call endpoint api/v1/holds/?q=[{"me.status":"W"}].
=> Note that holds item_id is displayed as item_id: "12345".
3. Apply this patch.
4. Call endpoint again.
=> item_id should now be displayed as 12345.

Also prove t/db_dependent/api/v1/holds.t.

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 20e0c056c6faed4252e1718f97f36d15027e93fc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36166: Disable select to add to list if opacuserlogin is disabled
Matthias Le Gac [Tue, 5 Mar 2024 20:37:11 +0000 (15:37 -0500)]
Bug 36166: Disable select to add to list if opacuserlogin is disabled

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8d3c3b35e0e8f77a8f095f5aedda88d19e0ac7ed)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36207: (RM follow-up) CSRF correction
Martin Renvoize [Tue, 11 Jun 2024 15:13:36 +0000 (16:13 +0100)]
Bug 36207: (RM follow-up) CSRF correction

I think there was a rebase issue here where we split the form into two
forms instead of one.  This patch returns us to one form with two
different submit options (one for selected tags and one per tag) that
both trigger the confirmation modal before submitting to the controller.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0ac23a624735c222bf9358d37961e6c49c21c579)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 36207: Use confirmation modal when removing tags from titles in the OPAC
Owen Leonard [Thu, 29 Feb 2024 18:37:54 +0000 (18:37 +0000)]
Bug 36207: Use confirmation modal when removing tags from titles in the OPAC

This patch changes the process of removing a tag from a title on the
user's tag list. It now uses a confirmation modal dialog instead of a
JavaScript alert.

The patch also makes some minor tweaks to CSS to correct style on
"remove" links.

To test, apply the patch and rebuild the OPAC CSS.

 - Log in to the OPAC as a user who has submitted multiple tags or tags
   on multiple items.
  - Open the "Tags" link in the sidebar of the user summary page.
  - Click the "Remove tag" link next to one of the titles in the table
    of the user's tags.
  - You should see a modal confirmation message, "Are you sure you want
    to remove the selected tag from this title?" It should show the
    title and the tag which will be removed.
  - Test both the "Yes, remove tag" and "No, do not remove tag" choices.

  - Check the box next to one of the tagged titles and click the
    "Remove selected tags" button at the bottom of the table.
  - You should see a modal confirmation message, "Are you sure you want
    to remove this item from the list?" It should show the title and
    the tag which will be removed.
  - Test boh the "Yes" and "No" choices.

  - Check the box next to multiple tagged titles and click the
    "Remove selected tags" button at the bottom of the table.
  - You should see a modal confirmation message, "Are you sure you want
    to remove the selected tags from these titles" It should show the
    titles of all the records you selected and the corresponding tags to be
    removed.
  - Test both the "Yes" and "No" choices.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e834a575ae6ac2aacfd135c25c24438d0aa021e1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
3 months agoBug 34718: Input field in fund list (Select2) on receive is inactive
Lari Strand [Mon, 3 Jun 2024 11:34:10 +0000 (14:34 +0300)]
Bug 34718: Input field in fund list (Select2) on receive is inactive

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cbae44105555c3f54e0b83b1795a76ec33256ba6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>