Commit Graph

57076 Commits

Author SHA1 Message Date
Jonathan Druart 5baaecc58f
Bug 36081: Force TestBuilder to generate a valid format value
Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:37 +01:00
Jonathan Druart ddc0e07bab
Bug 36081: Use multivalue_preference
C4::Context->multivalue_preference is not used so far and split on |
However the values of "multiple" sysprefs are separated by... comma!

Let support both here.

This patch also removes silly JS code in the template.

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:36 +01:00
Marcel de Rooy 50fb4d5016
Bug 36081: Check SupportedFormats server side
Test plan:
Add article request with format via OPAC.
Run t/db_dependent/Koha/ArticleRequest.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tests in t/db_dependent/Koha/ArticleRequest.t pass. I can add an
article request with a type. If I allow PHOTOCOPY but change the
HTML in the OPAC form so SCAN is submitted I get a nice (but
somewhat generic) error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:36 +01:00
Katrin Fischer 4772ba6218
Bug 28907: (follow-up) Fix file permissions for t/db_dependent/Koha/REST/Plugin/Auth/PublicRoutes.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:35 +01:00
Lari Taskula b75bf9a84a
Bug 28907: REST - Drop support for allow-owner functionality
...and allow-guarantor functionality. Replaced by $c->auth->public($patron_id)
and/or $c->auth->public_guarantor($patron_id), where $patron_id is the patron's
id that owns the requested resource.

Old method, was applicable to both privileged and public routes:

  api/v1/swagger/paths/route.yaml

  x-koha-authorization:
    allow-owner: true
    allow-guarantor: true

New method, use public routes with no x-koha-authorization:

  GET /public/route/{patron_id}
  Koha/REST/V1/Controller#public_action:

  sub public_action {
      my $c = shift->openapi->valid_input or return;
      my $patron_id = $c->param( 'patron_id' );
      try {
          # Throws an exception that will render a response of 401 if not
          # authenticated and 403 if trying to access another user's resources
          $c->auth->public($patron_id); #or $c->auth->public_guarantor($patron_id)
          ...
          # other code
          ...
      }
      catch {
          $c->unhandled_exception($_);
      }
  }

  Another example of retrieving $patron_id when patron_id is not a request
  parameter:
  GET /public/another/object/{another_object_id}

  my $patron_id = Another::Object->find($another_object_id)->borrowernumber;
  try {
      # 403 if $another_object_id does not belong to API user
      $c->auth->public($patron_id);
      ...

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:34 +01:00
Lari Taskula 423588a060
Bug 28907: REST - Remove allow-owner from public article requests cancel route
To test:
1. prove t/db_dependent/api/v1/article_requests.t
2. Apply patch
3. prove t/db_dependent/api/v1/article_requests.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:33 +01:00
Lari Taskula 41cac0d9fc
Bug 28907: REST - Remove allow-owner from public checkout availability route
To test:
1. prove t/db_dependent/api/v1/checkouts.t
2. Apply patch
3. prove t/db_dependent/api/v1/checkouts.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:33 +01:00
Lari Taskula 53d4a37b2b
Bug 28907: REST - Remove allow-owner from public patron hold cancellation
To test:
1. prove t/db_dependent/api/v1/patrons_holds.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons_holds.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:32 +01:00
Lari Taskula 3a1e5d74f7
Bug 28907: REST - Remove allow-owner from public guarantors can see charges and checkouts
To test:
1. prove t/db_dependent/api/v1/patrons.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:31 +01:00
Lari Taskula b2e1ac1299
Bug 28907: REST - Remove allow-owner from public checkouts route
To test:
1. prove t/db_dependent/api/v1/checkouts.t
2. Apply patch
3. prove t/db_dependent/api/v1/checkouts.t

Observe success in both cases.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:31 +01:00
Lari Taskula 3ccf9d4ee1
Bug 28907: REST - Remove allow-owner from public password route
To test:
1. prove t/db_dependent/api/v1/patrons_password.t
2. Apply patch
3. prove t/db_dependent/api/v1/patrons_password.t

Observe success in both cases.

https://bugs.koha-community.org/show_bug.cgi?id=28907
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:30 +01:00
Lari Taskula f648aa453f
Bug 28907: Add Koha::REST::Plugin::Auth::PublicRoutes
To test:
1. prove t/db_dependent/Koha/REST/Plugin/Auth/PublicRoutes.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:29 +01:00
Lari Taskula c18964a48f
Bug 28907: Add REST exceptions for public routes auth
To test:
1. perl -c Koha/REST/Plugin/Exceptions.pm
2. perl -c Koha/Exceptions/REST.pm

More tests coming in following patches.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:29 +01:00
Tomas Cohen Arazi e360959752
Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed()
This patch makes the following scripts use the new method for checking
suppression:

* opac/opac-ISBDdetail.pl
* opac/opac-MARCdetail.pl
* opac/opac-detail.pl

In the `opac-detail.pl` case, it is a simple change by removing MARC
data traversal in favor of the new method. The code checking
suppression gets moved up so we don't process or make any other
calculations if the record is suppressed.

The other two scripts where completely missing the check and thus
leaking suppressed records.

To test:
1. Pick two records, one marked as suppressed, and the other not
   suppressed.
2. Try acessing them in the OPAC detail page.
=> SUCCESS: Suppressed records are suppressed, and not suppressed ones
are not.
3. Try the same records on the ISBD and MARC view
=> FAIL: They are not suppressed!
4. Apply this patch
5. Repeat 2
=> SUCCESS: Suppression is still respected
6. Repeat 3
=> SUCCESS: Suppression is respected on the ISBD and MARC views
7. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Remember to activate OPAC suppression with
OpacSuppression.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:28 +01:00
Tomas Cohen Arazi 1b4bb57092
Bug 28478: Add Koha::Biblio->opac_suppressed()
This patch adds a convenient method at the Koha::Biblio level, as a
wrapper for the extrator added on this bug. Following the established
pattern we adopted a while back.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass! All use cases covered!
3. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:27 +01:00
Tomas Cohen Arazi c50b8dc50e
Bug 28478: Add get_opac_suppression extractor
This patch adds an extractor method for the historically hardcoded field
942$n. This way we have a single place in which we code the extraction
and sanitization of its value.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
=> SUCCESS: Tests pass! All use cases are covered!
3. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-06 13:54:26 +01:00
Owen Leonard 8abf287e6d
Bug 37094: Improve layout of serial claims page
This patch updates the serial claims interface to hopefully make it more
usable:

- Vendor selection and filter issues forms are in the sidebar
- The "Download selected" and "Send notification" forms are now in their
  own columns at the bottom of the table of issues.
- NEW: The "Download selected" and "Send notification" forms are
  disabled unless one or more issues are selected.

To test you'll need more than one vendor with subscriptions that have
late issues.

- Go to Serials -> Claims.
- You should see a "Choose vendor" form in the main part of the page.
  - Choose a vendor.
  - After selecting a vendor you should see the vendor selection form in
    the sidebar along with a "Filter missing issues" form.
  - Confirm that both forms work correctly.
- In the main body of the page you should see the table of missing
  issues.
  ** Previously this table was sorted by default on the checkbox column.
     Since that doesn't make sense I moved the default sort to the
     "Since" column.
- Below the table of issues should should see the "Download selected"
  form. If you have a claim notice defined, you'll also see a "Send
  notification" form, each in their own column.
  - These forms should initially be disabled.
  - When you check a checkbox or click the "Select all" control at the
    top of the checkbox column the forms should become active.
  - Confirm that both forms work correctly.

Sponsored-by: Athens County Public Libraries
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>
2025-02-28 16:05:57 +01:00
Kyle M Hall b66ccc1258
Bug 39214: Mock preferences in t/db_dependent/Koha/Session.t for subtest 'test session driver'
The "test session driver" unit test assume SessionStorage is set to MySQL and will fail if it is set to anything else. We should mock the values, and test the other supported values.

Test Plan:
1) Set SessionStorage to File
2) prove t/db_dependent/Koha/Session.t
3) Note test failure
4) prove t/db_dependent/Koha/Session.t
5) Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-28 16:05:57 +01:00
Katrin Fischer 4278abd185
Bug 39075: DBRev 24.12.00.015
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:37 +01:00
Marcel de Rooy 0334dd9093
Bug 39075: (QA follow-up) Use new bug number. refer to old
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:36 +01:00
Matt Blenkinsop 50ef9576d2
Bug 39075: Fix DB inconsistencies
This patch fixes DB inconsistencies introduced in bug 34587

Test plan:
1) Run 'updatedatabase'
2) There should be no errors
3) Check the database and observe the correct assignment of the following columns
- erm_counter_logs.importdate
- erm_counter_files.date_uploaded

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] chmod 755 on new dbrev
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:36 +01:00
Marcel de Rooy 59bab75070
Bug 30975: (QA follow-up) Improve copyright and author line
This fundamental improvement may well be reflected in those
lines.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:35 +01:00
Marcel de Rooy 4837aa9a1c
Bug 30975: (QA follow-up) Fix for authorities and upload plugin
Authorities still needed a few tweaks for text2 (obscure name for
plugins).
Upload plugin does not have buttonDot 'mark'. Cloning was still
an issue. Not the most elegant solution but it works. We should
not have this exception for just another icon or so.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:35 +01:00
Julian Maurice 05946c473b
Bug 30975: Fix upload plugin
The upload plugin button has no 'buttonDot' class (unlike other plugins
buttons) so its click event were not listened to.
This patch fix the CSS selector in order to listen on click events for
all plugins buttons

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:34 +01:00
Julian Maurice 1a91b01977
Bug 30975: Fix framework plugins on acqui/neworderempty.pl
Test plan:
- Activate UseACQFrameworkForBiblioRecords
- Make sure you have an ACQ cataloguing framework that uses at least one
  plugin
- Create a new basket, create an order from 'new'
- Verify that framework plugins work

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:34 +01:00
Julian Maurice f000278b32
Bug 30975: Use event delegation for framework plugins
This is to avoid using private jQuery method _data.
Here's what jQuery 1.8.0 release notes says about it:
"this is not a supported public interface; the actual data structures
may change incompatibly from version to version."
So we should not rely on it.

What this patch does is use event delegation [1].
Events are bound to a parent container, so when elements are added
dynamically inside that container, we don't need to re-attach event
handlers manually

This patch also comes with a bit of cleanup, and introduce "breaking
changes" (they are breaking changes only if you happen to have custom
framework plugins):
1) 'mouseover', 'mousemove', 'keypress' events are no longer listened to
   'mouseover' and 'mousemove' are not used and would trigger too much
   events.
   'keypress' is also not used, and is deprecated
2) Event handlers now takes a single parameter that is an Event object
   It just makes the code a lot less complicated.
3) Event handlers do not pollute the global scope anymore

[1] https://learn.jquery.com/events/event-delegation/

Test plan:
- Go to every page that has a MARC editor and verify that plugins still
  work. This includes addbiblio.pl, additem.pl, authorities.pl,
  neworderempty.pl, orderreceive.pl
- Test plugins that use 'focus' event (for instance barcode.pl), 'blur'
  event (callnumber.pl) and 'click' event (almost all the others)
- Test that plugins work on cloned fields/subfields

Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:33 +01:00
Caroline Cyr La Rose 3bf4121b13
Bug 38180: Don't show label if 520 ind1=8 (MARC21)
This patch amends the display constant for field 520 if the first
indicator is set to 8. According to MARC21 documentation
(https://www.loc.gov/marc/bibliographic/bd520.html), the field's
labels depend on the value of indicator 1.

First Indicator	Second Indicator
Display constant controller
empty - Summary
0 - Subject
1 - Review
2 - Scope and content
3 - Abstract
4 - Content advice
8 - No display constant generated

Prior to this patch, a 520 field with ind1 = 8 is displayed as
'Summary'. After this patch, there is no label.

To test:
1. Create or edit a record, and add 7 x 520 tags:
   - Add one 520 tag with no value in ind1, enter 'Summary' in 520$a
   - Add one 520 tag with 0 in ind1, enter 'Subject' in 520$a
   - Add one 520 tag with 1 in ind1, enter 'Review' in 520$a
   - Add one 520 tag with 2 in ind1, enter 'Scope and content' in 520$a
   - Add one 520 tag with 3 in ind1, enter 'Abstract' in 520$a
   - Add one 520 tag with 4 in ind1, enter 'Content advice' in 520$a
   - Add one 520 tag with 8 in ind1, enter 'No display constant
     generated' in 520$a

2. View the record in the staff interface
   --> The labels should be
       - 'Summary' for the field that contains 'Summary' (OK)
       - 'Subject' for the field that contains 'Subject' (OK)
       - 'Review' for the field that contains 'Review' (OK)
       - 'Scope and content' for the field that contains 'Scope and
         content' (OK)
       - 'Abstract' for the field that contains 'Abstract' (OK)
       - 'Content advice' for the field that contains 'Content advice'
         (OK)
       - 'Summary' for the field that contains 'Subject' **(NOT OK)**

3. View the record in the OPAC
   --> The labels should be
       - 'Summary' for the field that contains 'Summary' (OK)
       - 'Subject' for the field that contains 'Subject' (OK)
       - 'Review' for the field that contains 'Review' (OK)
       - 'Scope and content' for the field that contains 'Scope and
         content' (OK)
       - 'Abstract' for the field that contains 'Abstract' (OK)
       - 'Content advice' for the field that contains 'Content advice'
         (OK)
       - 'Summary' for the field that contains 'Subject' **(NOT OK)**

4. Apply patch

5. Repeat step 2 (view the record in the staff interface; make sure to
   refresh the page)
   --> The labels should be
       - 'Summary' for the field that contains 'Summary' (OK)
       - 'Subject' for the field that contains 'Subject' (OK)
       - 'Review' for the field that contains 'Review' (OK)
       - 'Scope and content' for the field that contains 'Scope and
         content' (OK)
       - 'Abstract' for the field that contains 'Abstract' (OK)
       - 'Content advice' for the field that contains 'Content advice'
         (OK)
       - Nothing for the field that contains 'Subject' (OK!!)

6. Repeat step 3 (view the record in the OPAC; make sure to refresh the
   page)
   --> The labels should be
       - 'Summary' for the field that contains 'Summary' (OK)
       - 'Subject' for the field that contains 'Subject' (OK)
       - 'Review' for the field that contains 'Review' (OK)
       - 'Scope and content' for the field that contains 'Scope and
         content' (OK)
       - 'Abstract' for the field that contains 'Abstract' (OK)
       - 'Content advice' for the field that contains 'Content advice'
         (OK)
       - Nothing for the field that contains 'Subject' (OK!!)

https://bugs.koha-community.org/show_bug.cgi?id=38081
Signed-off-by: esther <esther@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:33 +01:00
PerplexedTheta 3040f46d5e
Bug 32216: Add print notices to membership_expiry.pl
This patch adds print notice functionality to the membership_expiry.pl script,
by adding both conditional and and forced modes. When passing only --confirm,
the script will check the patron's record for an email address. If one is
found, an email notice is generated. If one is not, a print notice is used
instead. By adding a -p flag, print notices will be generated, even if an
email address is present.

To test:
a)  set the MembershipExpiryDaysNotice syspref to 7 days
b)  choose or set up half a dozen patrons with expiry dates
    1)  take heed: these expiry dates will need to be T+7 days
c)  add fake email addresses to two of the patrons
    1)  take heed: the other patrons should have no primary or secondary
        email
d)  set up the MEMBERSHIP_EXPIRY notice
    a)  set content & subject in the email notice to contain the word
        email
    b)  set content & subject in the print notice to contain the word
        print
e)  run ./misc/cronjobs/membership_expiry.pl -n -c
    1)  notice how the printed notices contain the word email
f)  run ./misc/cronjobs/membership_expiry.pl -c
g)  check the notices for the patrons from step b
    1)  notice how only email notices are generated
h)  APPLY PATCH
i)  repeat step e
    1)  notice how a mix of email and print notices are now generated
j)  run ./misc/cronjobs/membership_expiry.pl -n -p -c
    1)  notice how the output is the same as in step i - this is by
        design
k)  repeat steps f-g
    1)  notice how some patrons will only get an email notice, whilst
        others will only get a print notice
    2)  this should occur based on which patrons do, or do not have a
        valid primary or secondary email
l)  run ./misc/cronjobs/membership_expiry.pl -p -c
m)  repeat step g
    1)  notice that all patrons now get a print notice, whilst some get
        both a print notice, and an email notice. Again, this should
        occur based on whether the patron has a valid primary or
        secondary email
n)  SIGN OFF

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:32 +01:00
Emily Lamancusa 6dee4899d6
Bug 39185: Don't add select option if priority is 0
To test:
1. Place several holds on a biblio record
2. Check in items from that record and confirm some (but not all) of the
    holds
3. View the current holds on that record
4. Click on the drop-down to change the priority of a hold
--> Note that the drop-down contains one or more "0" options - one for
    each in-transit or waiting hold
5. Apply patch and refresh the page
6. Click on the drop-down again
--> The drop-down now contains the correct options
7. Use the drop-down and the "Update holds" button to change hold
    hold priorities a few times
--> Confirm that the priority is updated correctly

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:32 +01:00
Marcel de Rooy 56fd9a7c7d
Bug 30888: (QA follow-up) Correct dbrev 24.12.00.012
Also adds empty string as default value for deletedauth_header.marcxml
in TestBuilder.

Test plan:
Run dbrev.
Run t/db_dependent/TestBuilder.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:31 +01:00
Tomas Cohen Arazi a07368e5ce
Bug 36433: (follow-up) Include required library
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 13:55:16 +01:00
Lisette Scheer a524d94abb
Bug 37989: Add template toolkit to problem_report notice
This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice

Test plan:
1. Turn on OPACReportProblem in the system preferences.
2. In the staff interface, create the following report:
  SELECT * FROM message_queue WHERE letter_id='PROBLEM_REPORT'
3. Log into the OPAC
4. Edit the PROBLEM_REPORT notice to include [% problemreport.username %] after the bespoke syntax for the username.
5. Report a problem
6. Run the report you created.
7. Observe the data. (Bug 37991, the title doesn't store properly)
8. Apply the patch
9. Restart all services (restart_all on command line Restart Services in sandbox options)
10. File a new OPAC problem report
11. Run your report. 2 usernames should now show.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:45:47 +01:00
Lucas Gass 75f3abd342
Bug 38670: Add 773$d to MARC21 record detail display for OPAC
Signed-off-by: esther <esther@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:45:47 +01:00
Lucas Gass dd21ba5d5d
Bug 38670: Add 773$d to MARC21 record detail display
To recreate:
1. Pick a framework and expose the 773$t ( title ), 773$g ( parts ), and 773$d ( Place, publisher, and date of publication )
2. Find a record and add some data to each of the fields in step 1.
3. Notice that the 773$d won't display.
4. APPLY PATCH and restart_all
5. Now the 773$d displays.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:45:46 +01:00
Johanna Räisä ec43f339d3
Bug 38253: (follow-up) add missing swagger definition
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:31 +01:00
Johanna Räisä 2071aae29f
Bug 38253: Add lowest priority REST API endpoint for holds
This patch adds a new endpoint to toggle the lowest priority of a hold via the REST API.

To test:
1) Apply the patch
2) perl build-resources.PL
3) prove t/db_dependent/api/v1/holds.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:31 +01:00
Katrin Fischer 94fdb27695
Bug 39200: (follow-up) Move intranet_includes in sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:30 +01:00
Emily Lamancusa 00fb10aaea
Bug 39200: Fix syspref order
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:30 +01:00
William Lavoie 20587212a3
Bug 39035: Adding print media query to hide cookie permissions
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>
2025-02-26 13:16:29 +01:00
Nick Clemens 70cb30ee6e
Bug 39186: Update styling of Cancel marked holds button
This patch adds btn and btn-primary classes

To test:
1 - Place a hold for a patron
2 - View the patron's record in staff interface
3 - CLick the holds tab
4 - Note 'Cancel marked holds' is gray, other buttons are yellow
5 - Apply patch
6 - Reload, button is yellow

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:28 +01:00
Katrin Fischer 707d3b3563
Bug 38108: (follow-up) Amend system preference description with "staff interface"
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:28 +01:00
Katrin Fischer 6b756e25cd
Bug 39200: DBRev 24.12.00.014
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:27 +01:00
Emily Lamancusa 606cd8d63e
Bug 38108: (QA follow-up) Use say_success in dbrev
Use say_success instead of say when outputting a line that the
system preference was added successfully

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:27 +01:00
Lucas Gass 04f398890e
Bug 38108: Add ability to show/hide table filters via system preference
To test:
1. APPLY PATCH, updatedatabase, restart_all
2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'.
3. Without changing the system preference, go to a record detail page.
4. The filters should not show by default.
5. Make sure that toggling the Hide filters/Show filters button still work as expected.
6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'.
7. Now the filters should show by default when you load the table.
8. Make sure that toggling the Hide filters/Show filters button still work as expected.

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:26 +01:00
Lucas Gass 9a55785c8b
Bug 38108: Add system preference AlwaysShowHoldingsTableFilters
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:26 +01:00
Nick Clemens 177d648ded
Bug 39108: Prevent 'Ignore' on found hold from triggering a new modal
When ignoring a waiting hold, we don't need to take any further action, we
shoudlsimply close the modal

This patch adds JS to prevent form submission

To test:
1 - place a hold
2 - check in an item that can fill the hold
3 - in the hold found modal, click Ignore
4 - the modal dismisses and nothing changes on the hold (this is the desired behavior)
5 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
6 - check in the item again, confirm the modal says "Item is already waiting"
7 - click Ignore, confirm modal reloads
8 - click Ignore, confirm modal reloads
9 - click Ignore, confirm modal reloads
10 - Apply patch
11 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
12 - check in the item again, confirm the modal says "Item is already waiting"
13 - click Ignore, nothign happens! Orange you glad I didn't say banana?

Signed-off-by: Amanda Campbell <acampbell@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:25 +01:00
Martin Renvoize 9fdc303af4
Bug 38689: (follow-up) Add koha_object(s)_class defintions
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:25 +01:00
Frédéric Demians 8a8b41c344
Bug 36433: fix test failing on Jenkins
Transaction rollback not called.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:24 +01:00
Caroline Cyr La Rose 49c881c54a
Bug 36109: Typo corrections
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-24 18:30:17 +01:00
Martin Renvoize e1931dc168
Bug 36109: Convert sample ODUE notice to TT
This is an initial submission to convert the existing <<>> sample notice
to TT.

We could do more here, like including the due date and making the fines
display more clearly optional.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-24 18:30:16 +01:00