koha.git
4 hours agoBug 37121: MARC21 Addition to relator terms in technical notice 2024-05-14 main
Caroline Cyr La Rose [Tue, 18 Jun 2024 20:31:32 +0000 (16:31 -0400)]
Bug 37121: MARC21 Addition to relator terms in technical notice 2024-05-14

This patch adds relator codes from the May 14, 2024 technical notice
(https://loc.gov/marc/relators/tn240514rel.html) to the list of MARC21 relator
terms in Koha.

To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values > RELTERMS
3. Search for the added relator codes

   - wfs - Writer of film story
   - wft - Writer of intertitles
   - wts - Writer of television story

Note: this is added in the installer files. It will not affect existing
installations. For existing installations, add the new relator codes in
Administration > Authorized values > RELTERMS.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 37120: Add heading subfields for 647 (MARC21)
Caroline Cyr La Rose [Tue, 18 Jun 2024 19:55:50 +0000 (15:55 -0400)]
Bug 37120: Add heading subfields for 647 (MARC21)

This patch updates the default MARC21 bibliographic framework to add missing
subfields to field 647.

To test:
1. Apply patch and reset_all
2. Go to Administration > MARC bibliographic framework
3. Click Actions next to the default framework and choose MARC structure
4. Search for field 647
5. Click Actions > View subfields (or Edit subfields)
6. Check that subfields match the documentation
   https://www.loc.gov/marc/bibliographic/bd647.html
   (note that subfields $4 and $e are added in bug 37114)

Added subfields are:
- a - Named event (NR)
- c - Location of named event (R)
- d - Date of named event (NR)
- g - Miscellaneous information (R)

7. Optional: run the framework test in Administration > MARC bibliographic
   framework test
   --> All should be OK

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 37114: Update MARC21 default framework to Update 38 (June 2024)
Caroline Cyr La Rose [Tue, 18 Jun 2024 19:45:44 +0000 (15:45 -0400)]
Bug 37114: Update MARC21 default framework to Update 38 (June 2024)

This patch updates the MARC21 default bibliographic framework
to reflect the changes brought by Update 38 (June 2024).

To test:
1. Apply patch and reset_all
2. Go to Administration > MARC bibliographic framework
3. Click Actions next to the default framework and choose MARC structure
4. Check for the changes detailed in the update
https://www.loc.gov/marc/bibliographic/bdapndxg.html

- No changes in the framework for 055, changes only affect indicator values and
  field documentation

- There should be two new subfields in 082
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)

- There should be two new subfields in 083
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)

- No changes in the framework for 341, changes only affect field documentation

- Field 383 should now be titled NUMERIC DESIGNATION OF MUSICAL WORK OR
  EXPRESSION

- There should be a new subfield in 580
  - 5 - Institution to which field applies (NR)

- There should be two new subfields in 647
  - 4 - Relationship (R)
  - e - Relator term (R)

- There should be two new subfields in 648
  - 4 - Relationship (R)
  - e - Relator term (R)

- There should be a bew subfield in 773
  - 5 - Institution to which field applies (NR)

- There should be a bew subfield in 774
  - 5 - Institution to which field applies (NR)

- There should be a bew subfield in 787
  - 5 - Institution to which field applies (NR)

5. Optional: run the framework test in Administration > MARC
   bibliographic framework test
   --> All should be OK

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 37135: Update MARC21 authority frameworks to Update 38
Caroline Cyr La Rose [Wed, 19 Jun 2024 20:33:07 +0000 (16:33 -0400)]
Bug 37135: Update MARC21 authority frameworks to Update 38

The patch updates the MARC21 authority frameworks to Update 38

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/authority/adapndxf.html

- There should be two new subfields in 082
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)

- There should be two new subfields in 083
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)

- Field 383 should be named NUMERIC DESIGNATION OF MUSICAL WORK OR EXPRESSION

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 37134: Update MARC21 authority frameworks to Update 37
Caroline Cyr La Rose [Wed, 19 Jun 2024 20:22:26 +0000 (16:22 -0400)]
Bug 37134: Update MARC21 authority frameworks to Update 37

The patch updates the MARC21 authority frameworks to Update 37

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up37authority/adapndxf.html

- Two subfields in 022 should be marked as obsolete
  - l - ISSN-L [OBSOLETE]
  - m - Canceled ISSN-L [OBSOLETE]

- There should be a new field 023 named CLUSTER ISSN with the following
  subfields https://www.loc.gov/marc/authority/ad023.html
  - 0 - Authority record control number or standard number (NR)
  - 1 - Real World Object URI (R)
  - 2 - Source (NR)
  - 6 - Linkage (NR)
  - 8 - Field link and sequence number (R)
  - a - Cluster ISSN (NR)
  - y - Incorrect Cluster ISSN (R)
  - z - Canceled Cluster ISSN (R)

- No changes in field 371, changes only affect field documentation

- No changes in field 372, changes only affect field documentation

- No changes in field 374, changes only affect field documentation

- No changes in subfield 376$2, changes only affect subfield documentation

- There should be a new subfield in 376
  - d - Other designation

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 37133: (follow-up) Fix tagfield - 856$6 should be 857$6
David Nind [Tue, 2 Jul 2024 00:00:15 +0000 (00:00 +0000)]
Bug 37133: (follow-up) Fix tagfield - 856$6 should be 857$6

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 37133: Update MARC21 authority frameworks to Update 36
Caroline Cyr La Rose [Fri, 28 Jun 2024 14:15:23 +0000 (10:15 -0400)]
Bug 37133: Update MARC21 authority frameworks to Update 36

The patch updates the MARC21 authority frameworks to Update 36

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up36authority/adapndxf.html

- There should be a new field 361 named STRUCTURED OWNERSHIP AND CUSTODIAL
  HISTORY with the following subfields
  https://www.loc.gov/marc/authority/ad361.html
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)
  - 3 - Materials specified (NR)
  - 5 - Institution to which field applies (NR)
  - 6 - Linkage (NR)
  - 7 - Data provenance (R)
  - 8 - Field link and sequence number (R)
  - a - Name (NR)
  - f - Ownership and custodial history evidence term (R)
  - k - Formatted date (NR)
  - l - Date (NR)
  - o - Type of ownership and custodial history information (R)
  - s - Shelf mark of copy described (NR)
  - u - Uniform Resource Identifier (R)
  - x - Nonpublic note (R)
  - y - Identifier of the copy described (NR)
  - z - Public note (R)

- No changes to subfield 368$d, changes only affect subfield documentation

- There should be a new field 857 named ELECTRONIC ARCHIVE LOCATION AND ACCESS
  with the following subfields
  https://www.loc.gov/marc/authority/ad857.html
  - 2 - Access method (NR)
  - 3 - Materials specified (NR)
  - 5 - Institution to which field applies (NR)
  - 6 - Linkage (NR)
  - 7 - Access status (NR)
  - 8 - Field link and sequence number (R)
  - b - Name of archiving agency (NR)
  - c - Name of Web archive or digital archive repository (NR)
  - d - Date range of archived material (NR)
  - e - Data provenance (R)
  - f - Archive completeness (NR)
  - g - Persistent identifier (R)
  - h - Non-functioning Uniform Resource Identifier (R)
  - l - Standardized information governing access (R)
  - m - Contact for access assistance (R)
  - n - Terms governing access (R)
  - q - Electronic format type (R)
  - r - Standardized information governing use and reproduction (R)
  - s - File size (R)
  - t - Terms governing use and reproduction (R)
  - u - Uniform Resource Identifier (R)
  - x - Nonpublic note (R)
  - y - Link text (R)
  - z - Public note (R)

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 hours agoBug 36935: Add unit test for error handling
Matt Blenkinsop [Thu, 23 May 2024 11:17:31 +0000 (11:17 +0000)]
Bug 36935: Add unit test for error handling

prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

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>
4 hours agoBug 36935: Add a 'die' message to file parsing
Matt Blenkinsop [Thu, 23 May 2024 09:41:22 +0000 (09:41 +0000)]
Bug 36935: Add a 'die' message to file parsing

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>
4 hours agoBug 36935: Remove warning if file parsing is successful
Matt Blenkinsop [Thu, 23 May 2024 08:32:22 +0000 (08:32 +0000)]
Bug 36935: Remove warning if file parsing is successful

This patch removes the logged warning if a file parse is successful.

Test plan:
1) prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t
2) The output will have a logged message - 'EOF - End of data in parsing input stream'
3) Apply patch
4) Repeat step 1
5) The warning will be gone

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>
4 hours agoBug 37027: Remove unnecessary dataTable controls from SCO tables
Lucas Gass [Tue, 4 Jun 2024 14:35:17 +0000 (14:35 +0000)]
Bug 37027: Remove unnecessary dataTable controls from SCO tables

To test:
1. Have a patron with some checkouts, holds, and charges that can login into the SCO module.
2. Notice the dataTable controls for searching the table, copying the table, exporting as CSV, or printing.
3. APPLY PATCH
4. Try step 2 again, this time the only dataTable control should be the search filter.

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>
20 hours agoBug 30411: Put shelving location into its own column in holds queue
Lucas Gass [Thu, 27 Jun 2024 20:05:34 +0000 (20:05 +0000)]
Bug 30411: Put shelving location into its own column in holds queue

To test:
1. Put some items on hold, make some bib level holds and some item
   level holds. Make sure that some of the holds have different shelving
   locations.
2. Build the holds queue. In KTD: perl
   /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
3. Notice that the shelving location is in the same column as
   itemcallnumber
4. Apply patch and restart_all
5. Reload the holds queue and notice that shelving location now has it's
   own column.
6. Make sure you can sort by shelving location correctly.
7. Re-run the holds queue and apply the filter for shelving location.
   Make sure all your holds of that shelving location are shown.
8. While in the holds queue try usiong the 'Shelving location' filter on
   the left side of the page, make sure it works right.
9. Go to Admin > Table settings. Try hiding the shelving location column
   and reload the holds queue to make sure it is properly hidden.
10. Try hiding some other columns via Table settings to make sure all
    columns are still properly being hid.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 36950: Improve placement of catalog concern banner in the OPAC
Owen Leonard [Thu, 23 May 2024 15:34:15 +0000 (15:34 +0000)]
Bug 36950: Improve placement of catalog concern banner in the OPAC

This patch changes the placement of the catalog concern banner in the
OPAC. Changing the way it is added to the DOM will prevent it from
obscuring content.

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

- In the staff interface, make sure the "OpacCatalogConcerns" system
  preference is enabled.
- Locate a bibliographic record and view the detail page.
- Click the "Report a concern" link in the sidebar.
- Submit your concern.
- When the concern is successfully submitted and the modal closes, the
  success banner ("Your concern was successfully submitted.") should
  appear below the breadcrumbs menu and above the biblio view tabs
  ("Normal view, "MARC view", etc.).

Sponsored-By: Athens County Public Libraries
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>
20 hours agoBug 36901: Add logging for uncaught exceptions in background job classes
Tomas Cohen Arazi [Tue, 21 May 2024 13:04:17 +0000 (10:04 -0300)]
Bug 36901: Add logging for uncaught exceptions in background job classes

This patch adds logging of unhandled exceptions that could occur. This
is happening on busy production sites right now. This is also useful for
plugin jobs that might not be 100% following the guidelines and would
benefit from this.

But as the [DO NOT PUSH] patch highlights, this is something we really
want to have on our current codebase, as a database connection drop
might make us reach that `catch` block we are adding logging to on this
patch.

To test:
1. Apply the [DO NOT PUSH] patch
2. Run:
   $ ktd --shell
  k$ restart_all ; tail -f /var/log/koha/kohadev/worker*.log
3. Pick a valid barcode on the staff UI
4. Use the 'Batch delete items' tool in the cataloguing section
5. Start the job for deleting the item
=> FAIL: The item got deleted, but the job marked as failed and no logs
about the reasons
6. Apply this patch and repeat 2-5
=> SUCCESS: Same scenario but there's a log with the error message
7. Sign off :-D

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>
20 hours agoBug 35823: When uploading a MARC file to a basket it is showing inactive funds withou...
Alexandre Noel [Tue, 18 Jun 2024 18:23:10 +0000 (14:23 -0400)]
Bug 35823: When uploading a MARC file to a basket it is showing inactive funds without the show checkbox button selected

Prerequisites:
    - Have at least 2 budgets with funds
        1. Add several budgets ("Acquisitions" > "Budget") with funds ("Actions" > "Add fund")
        2. Keep one budget active (check the "Make Budget active" box in
           the budget edit page)
    - Have at least one file of records imported into Koha ("Cataloging" >
      "Stage records for import" > "Upload a file")

To test:
    1. Go to Acquisitions page.
    2. Create a vendor and new basket if not already available.
    3. In your vendor, "Add to the basket" > "From a staged MARC file".
    4. Click "Add orders" of one of the MARC file.
    5. Check the checkbox in the "Select for import" tab.
    6. In the dropdown menu of the "Fund" field, verify the budget
       names.
    --> Ensure Koha displays all inactive budgets even if the "Show
    inactive funds" checkbox is not checked.
    7. Apply patch, and refresh the page (crtl + F5)
    8. Verify the budgets in the "Fund" dropdown menu and test it with
       the "Show inactive funds" checked and uncheked"

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37057: Restore filtering of unused authorities
Nick Clemens [Tue, 11 Jun 2024 12:29:13 +0000 (12:29 +0000)]
Bug 37057: Restore filtering of unused authorities

Bug 12478 commented this code out, however, we do return the 'used' parameter in ES authority searches. While
we should implement the feature for both ES and Zebra as an index, we can restore this behaviour here.

To test:
1 - Search authorities on OPAC with SearchEngine syspref set to both Elasticsearch and Zebra
    I just searched for 'a'
2 - Confirm results with no usage are included
3 - Test with both values of OPACShowUnusedAuthorities
4 - Apply patch
5 - Repeat searches with both engines and syspref settings
6 - Confirm unused authorities not shown in either engine when syspref is "Don't show"
7 - Conifrm unused authorities shown in both engines when syspref is "Show"

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>
20 hours agoBug 37104: (Follow up) Restructure checkpw code
Sam Lau [Mon, 17 Jun 2024 19:25:34 +0000 (19:25 +0000)]
Bug 37104: (Follow up) Restructure checkpw code

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>
20 hours agoBug 37104: Block AnonymousPatron from logging into staff interface and OPAC
Sam Lau [Mon, 17 Jun 2024 16:26:40 +0000 (16:26 +0000)]
Bug 37104: Block AnonymousPatron from logging into staff interface and OPAC

This patch blocks the patron set as the anonymous patron from logging into the staff interface and OPAC.

To test:
1) In Administration->sys. pref, make sure AnonymousPatron is pointed to an account.
2) Visit that patron's page and set their permissions to superlibrarian ("Access to all librarian functions")
3) Ensure that you know the username and password for this patron and can log in.
4) Visit the OPAC, attempt to log-in with your anon patron.
5) Note that you can log in and nothing happens.
6) Visit the staff interface, attempt to log-in with anon patron.
7) Once again, note that you are able to log-in with no issue.
8) Apply patch and restart_all
9) Attempt to log into the OPAC and staff interface with the patron again.
10) This time, you should get an error message on both pages saying, "Error: You can't log in as the anonymous patron!"

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>
20 hours agoBug 37104: Unit tests
Sam Lau [Mon, 17 Jun 2024 19:31:52 +0000 (19:31 +0000)]
Bug 37104: Unit tests

prove t/db-dependent/Auth.t

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>
20 hours agoBug 37155: Remove use of unblessed patron
Nick Clemens [Fri, 21 Jun 2024 16:02:57 +0000 (16:02 +0000)]
Bug 37155: Remove use of unblessed patron

This removes the unblessing of the patron object and uses fields form the patron

To test:
Confirm tests still pass:
prove -v t/db_dependent/Holds.t t/db_dependent/Circulation.t t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t t/db_dependent/Reserves.t t/db_dependent/api/v1/holds.t

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37155: Refactor GetAgeRestrictions
Nick Clemens [Fri, 21 Jun 2024 13:39:38 +0000 (13:39 +0000)]
Bug 37155: Refactor GetAgeRestrictions

This routine currently takes the agerestriction value from biblioitems and an unblessed borrower object
and uses the date of birth to calculate whether the ptrons DOB is before or after the minimum value required
against the age restriction

We have a routine in the patron object to get the patron's age - we cna use this against the parsed agerestriction
value in a simple comparison and remove the need to unbless and pass the patron.

FIXME: We should move this to a biblioitems or biblio object method

To test:
0 - In Admin -> Koha to MARC mapping, set biblioitems.agerestriction to 521,a
1 - Set syspref AgeRestrictionMarker to 'Age'
2 - Edit a record and set 521$a to 'Age 14'
3 - Add an item or copy the barcode of the item on that record
4 - Attempt to checkout item to Lisa Charles in sample data, or a 15 year old patron
5 - It should checkout fine
6 - Check in item
7 - Edit patron  Joyce Gaines to set age to 13 DOB:06/20/2011, or create a 13 year old patron
8 - Attempt to checkout item
9 - Item is blocked
10 - Apply patch
11 - Repeat tests, confirm no change

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37158: Make OPAC recalls history table responsive
Owen Leonard [Fri, 21 Jun 2024 17:08:29 +0000 (17:08 +0000)]
Bug 37158: Make OPAC recalls history table responsive

Some markup errors in the OPAC recalls history template are causing the
table to not be responsive even though the DataTable is configured to be
responsive. This patch corrects it.

Also changed:

- Removed obsolete <span class="tdlabel">, a remnant of the
  way we did responsive tables before the DataTable option
- Removed very obsolete "type" attribute from the <script> tag and very
  obsolete "<![CDATA" marker from the script block.
- Removed <span>s which were used in the obsolete "title-string" method
  of sorting a DataTable.

To test you must have recalls enabled and have at least one circulation
rule which allows for recalls.

- Log in to the OPAC as a user who can place recalls.
- Locate an item which is elligible for recall and place the recall.
- Go to your user summary page, and click the "Recalls history" link in
  the sidebar.
- Confirm that the table of recalls on that page behaves
  correctly. It should adjust well to varying browser widths.

Sponsored-by: Athens County Public Libraries
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>
20 hours agoBug 37167: Fix mapping call number searches to Z39.50
Phil Ringnalda [Tue, 25 Jun 2024 03:59:42 +0000 (20:59 -0700)]
Bug 37167: Fix mapping call number searches to Z39.50

When you do an advanced search for call number, your search uses the index
callnum, but the code that maps your search to a possible Z39.50 search
still uses the index lcn,phr which was last used 15 years ago, so it's
treated as an unknown index and mapped to the Title field in the Z39.50
search form.

Test plan:
1. Click Search in the top menu to load Advanced Search
2. Change the dropdown menu for the first input from Keyword to Call
   Number, and paste TT174.3 in the input and search
3. Find the Z39.50/SRU search button in your results and click it
4. Note that your search was filled in the Title field
5. Apply patch, reset_all
6. Repeat steps 1-3, note that your search was filled in the Dewey field
7. Choose the server Library of Congress SRU and search
8. Note that even though we labelled it Dewey and you searched for an
   LC call number, your results are things with that call number in 050,
   the LC call number field.

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>
20 hours agoBug 34920: Add cypress tests
Pedro Amorim [Thu, 29 Feb 2024 16:06:39 +0000 (16:06 +0000)]
Bug 34920: Add cypress tests

Run the agreements cypress test spec:

cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 34920: Ensure 'description' property is an empty string if 'lib' is null
Pedro Amorim [Thu, 29 Feb 2024 15:26:54 +0000 (15:26 +0000)]
Bug 34920: Ensure 'description' property is an empty string if 'lib' is null

Test plan:
1. Enable ERM module
2. Confirm that you can open the ERM module in the staff interface.
3. Go to the authorized values, select 'ERM_AGREEMENT_CLOSURE_REASON' and edit the 'Cancelled' authorized value by removing the description. Making this change with any of the ERM authorized values will result in an error.
4. Go back to the ERM module and notice that there is an error. 'Something went wrong: Error: Expected string - got null.'
5. Apply patch. Run yarn js:build. Repeat test plan
6. Create a new agreement. Pick status 'Closed'.
7. Open 'Closure reason'. Confirm there is an entry for 'Expired' and an empty entry below that.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 34920: Add API endpoint tests
Pedro Amorim [Thu, 29 Feb 2024 13:44:12 +0000 (13:44 +0000)]
Bug 34920: Add API endpoint tests

prove koha/t/db_dependent/api/v1/authorised_values.t

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 34920: Return sorted av_cats to be able to test
Pedro Amorim [Thu, 29 Feb 2024 13:43:47 +0000 (13:43 +0000)]
Bug 34920: Return sorted av_cats to be able to test

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37216: DBRev 24.06.00.011
Katrin Fischer [Mon, 1 Jul 2024 16:24:44 +0000 (16:24 +0000)]
Bug 37216: DBRev 24.06.00.011

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37216: (follow-up) Clear invalid value
Emily Lamancusa [Fri, 28 Jun 2024 21:02:50 +0000 (17:02 -0400)]
Bug 37216: (follow-up) Clear invalid value

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37216: (QA follow-up) Add update to set existing options
Martin Renvoize [Fri, 28 Jun 2024 15:03:03 +0000 (16:03 +0100)]
Bug 37216: (QA follow-up) Add update to set existing options

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
20 hours agoBug 37216: Fix SQL for EmailFieldSelection
Emily Lamancusa [Thu, 27 Jun 2024 20:27:37 +0000 (16:27 -0400)]
Bug 37216: Fix SQL for EmailFieldSelection

Test plan:
Part A: New installation
1. Start a fresh test instance
2. Set EmailFieldPrimary to "selected addresses", and do not touch
    EmailFieldSelection
3. Edit a patron to ensure the following fields are set:
   - Primary email
   - Secondary email
   - Alternate email
   - Enable email notices for item checkout
4. Attempt to check an item out to that patron
--> Koha explodes!
5. Apply patch
6. reset_all
7. Repeat steps 2-4
--> Checkout succeeds!
8. Ensure test plan for bug 12802 still passes

Part B: Upgraded installation
1. Start a fresh test instance at version 23.11
2. Switch to main
3. Install database update
4. Set EmailFieldPrimary to "selected addresses", and do not touch
    EmailFieldSelection
5. Edit a patron to ensure the following fields are set:
   - Primary email
   - Secondary email
   - Alternate email
   - Enable email notices for item checkout
6. Attempt to check an item out to that patron
--> Koha explodes!
7. Go back to 23.11 and reset_all
8. Switch to main and apply patch
9. Repeat steps 4-6
--> Checkout succeeds!
10. Ensure test plan for bug 12802 still passes

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>
20 hours agoBug 36557: (follow-up) Restore missing "Remove from list" control
Owen Leonard [Fri, 21 Jun 2024 15:10:05 +0000 (15:10 +0000)]
Bug 36557: (follow-up) Restore missing "Remove from list" control

This patch restores the "Remove from list" control to the batch
operations toolbar when one is looking at the contents of a list. It was
unintentionally left out of the previous patch.

The patch also corrects some button markup to ensure consisten style of
controls in the batch operations toolbar.

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>
20 hours agoBug 36557: Convert Cart and Lists controls to buttons and rework logic
Owen Leonard [Thu, 21 Mar 2024 17:29:47 +0000 (17:29 +0000)]
Bug 36557: Convert Cart and Lists controls to buttons and rework logic

This patch tries to address errors in the way features are displayed in
result lists so that controls for holds, tags, lists, etc. are shown or
hidden according to system preferences.

The patch converts the Cart/Lists dropdown to separate buttons, making
the display logic simpler and making the interface more consistent with
updates to the staff interface search results.

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

- In the OPAC, test these pages:
  - Catalog search results
  - List contents
- Test with various combinations of these system preferences:
  - opacbookbag
  - DisplayMultiPlaceHold
  - virtualshelves
  - OPACHoldRequests
  - TagsEnabled
  - TagsInputOnList
  - UseRecalls
  - ArticleRequests

With each different combination of settings the right controls should
appear in the toolbar at the top (if present), and with each search
result.

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>
20 hours agoBug 36873: Make Koha::Objects->delete pass parameters to the underlying method
Tomas Cohen Arazi [Wed, 15 May 2024 19:13:04 +0000 (16:13 -0300)]
Bug 36873: Make Koha::Objects->delete pass parameters to the underlying method

This patch makes the generic method pass any parameters it got passed to
the underlying `delete()` method.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Objects.t
=> FAIL: Tests fail, parameters are not passed
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
20 hours agoBug 36873: Unit tests
Tomas Cohen Arazi [Wed, 15 May 2024 19:12:31 +0000 (16:12 -0300)]
Bug 36873: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
20 hours agoBug 35125: Respect LinkerConsiderThesaurus in update_cache
Nick Clemens [Tue, 25 Jun 2024 14:56:04 +0000 (14:56 +0000)]
Bug 35125: Respect LinkerConsiderThesaurus in update_cache

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>
20 hours agoBug 35125: Respect LinkerConsiderThesaurus in get_link
Nick Clemens [Mon, 24 Jun 2024 19:53:42 +0000 (19:53 +0000)]
Bug 35125: Respect LinkerConsiderThesaurus in get_link

This patch adds a new key 'notconsidered' to the authority cache when
linking to avoid doubling when creating new authorities and wishing
to ignore thesaurus

To test:
0 - Set LinkerConsiderThesaurus to "don't"
1 - Set AutCreateAuthorities to generate
2 - Set AutLinkBiblios to Do
3 - Set CataloguingModuleRelink to Do
4 - Save a new record in Koha with the same randomized heading repeated
    but from 3 different authority sources
    ensure source is defined by indicators only and by field $2 once
    ensure the heading is random so that no matches will be found
5 - Confirm each authority is linked to a new unique authority
6 - Apply patch, restart all
7 - Repeat 4 with a new subject heading
8 - Confirm all headings are linked to the same authority

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>
20 hours agoBug 37150: Can't delete single title from a list using the "Remove from list" link
Owen Leonard [Mon, 24 Jun 2024 14:46:36 +0000 (14:46 +0000)]
Bug 37150: Can't delete single title from a list using the "Remove from list" link

In the OPAC display of titles on a list, the "Remove from list" control
needs to trigger a POST operation instead of GET. This patch
appends a form for handling single entry deletions, populating
the hidden input upon confirmation.

To test, apply the patch and create a list if necessary, adding multiple
titles to it.

- View the contents of your list.
- Each title on your list should have a "Remove from this list" link.
  - Click one of these. You should see a modal confirmation, "Are you
    sure you want to remove this item from the list?"
    - Confirming should delete the title form the list.
  - Check multiple checkboxes in the list of titles and click "Remove
    from list" at the top of the list.
    - You should see a modal confirmation, "Are you sure you want to
      remove these items from the list?"
      - Confirming should result in all checked titles being removed
        from the list.
  - Check one or more checkboxes and then click a single "Remove from
    list" link. After confirming, you should find that only the one
    title was removed from the list.

Sponsored-by: Athens County Public Libraries
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>
20 hours agoBug 37183: Batch edit serial subscriptions sets expiration date to today
Chris Cormack [Sat, 29 Jun 2024 22:52:42 +0000 (22:52 +0000)]
Bug 37183: Batch edit serial subscriptions sets expiration date to today

Test plan:

Add some serials:
1) Add a new serial, visit:
   /cgi-bin/koha/serials/subscription-add.pl
2) Put a biblionumber in the 'record' field, e.g. '112'.
   Press 'next' and click 'ok' on the alert box.
3) Fill all the required fields and click 'test prediction'.
4) Fill the Subscription end date (= Expiration Date).
5) Click 'save subscription'.
6) Repeat steps 1-5 to create a second serial.

Batch edit serials:
1) Visit serials and hit the 'Search' button:
   /cgi-bin/koha/serials/serials-home.pl
2) Click the 2 checkboxes for the 2 serials we created
   previously and click the new link that pops up
   'Edit selected serials'.
3) Click 'Save' without changing anything.
4) Go back to either of the serials, notice the value
   for Expiration date is changed to TODAY
   (the date of the batch edit).

Apply the patch and retest the batch editing (before
retesting, change the expiration dates of the two
serials back to the original expiration date).

Note that the expiration date now only changes if you
enter a date in the 'Expiration date' field.

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>
20 hours 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>
4 days agoBug 37132: Update MARC21 authority frameworks to Update 35
Caroline Cyr La Rose [Wed, 19 Jun 2024 19:34:11 +0000 (15:34 -0400)]
Bug 37132: Update MARC21 authority frameworks to Update 35

The patch updates the MARC21 authority frameworks to Update 35

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up35authority/adapndxf.html

- There should be a new subfield in 856
  - g - Persistent identifier (R)

- Subfield 856$h should be renamed Non-functioning Uniform Resource Identifier and should now be repeatable

- Subfield 856$q should now be repeatable

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37128: Update MARC21 authority frameworks to Update 34
Caroline Cyr La Rose [Wed, 19 Jun 2024 19:12:18 +0000 (15:12 -0400)]
Bug 37128: Update MARC21 authority frameworks to Update 34

The patch updates the MARC21 authority frameworks to Update 34

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up34authority/adapndxf.html

- There should be a new subfield in 024
  - 7 - Data provenance (R)

- There should be a new subfield in 034
  - 7 - Data provenance (R)

- There should be a new subfield in 043
  - 7 - Data provenance (R)

- There should be a new subfield in 065
  - 7 - Data provenance (R)

- There should be a new subfield in 100
  - 7 - Data provenance (R)

- There should be a new subfield in 110
  - 7 - Data provenance (R)

- There should be a new subfield in 111
  - 7 - Data provenance (R)

- There should be a new subfield in 130
  - 7 - Data provenance (R)

- There should be a new subfield in 147
  - 7 - Data provenance (R)

- There should be a new subfield in 148
  - 7 - Data provenance (R)

- There should be a new subfield in 150
  - 7 - Data provenance (R)

- There should be a new subfield in 151
  - 7 - Data provenance (R)

- There should be a new subfield in 155
  - 7 - Data provenance (R)

- There should be a new subfield in 162
  - 7 - Data provenance (R)

- There should be a new subfield in 180
  - 7 - Data provenance (R)

- There should be a new subfield in 181
  - 7 - Data provenance (R)

- There should be a new subfield in 182
  - 7 - Data provenance (R)

- There should be a new subfield in 185
  - 7 - Data provenance (R)

- There should be a new subfield in 260
  - 7 - Data provenance (R)

- There should be a new subfield in 335
  - 7 - Data provenance (R)

- There should be a new subfield in 336
  - 7 - Data provenance (R)

- There should be a new subfield in 348
  - 7 - Data provenance (R)

- There should be a new subfield in 360
  - 7 - Data provenance (R)

- There should be a new subfield in 368
  - 7 - Data provenance (R)

- There should be a new subfield in 370
  - 7 - Data provenance (R)

- There should be a new subfield in 371
  - 7 - Data provenance (R)

- There should be a new subfield in 372
  - 7 - Data provenance (R)

- There should be three new subfield in 373
  - 4 - Relationship (R)
  - 7 - Data provenance (R)
  - i - Relationship Information (R)

- There should be a new subfield in 374
  - 7 - Data provenance (R)

- There should be a new subfield in 375
  - 7 - Data provenance (R)

- There should be a new subfield in 376
  - 7 - Data provenance (R)

- There should be a new subfield in 377
  - 7 - Data provenance (R)

- There should be a new subfield in 378
  - 7 - Data provenance (R)

- There should be a new subfield in 380
  - 7 - Data provenance (R)

- There should be a new subfield in 381
  - 7 - Data provenance (R)

- There should be a new subfield in 382
  - 7 - Data provenance (R)

- There should be a new subfield in 383
  - 7 - Data provenance (R)

- There should be a new subfield in 384
  - 7 - Data provenance (R)

- There should be a new subfield in 385
  - 7 - Data provenance (R)

- There should be a new subfield in 386
  - 7 - Data provenance (R)

- There should be a new field 387 called REPRESENTATIVE EXPRESSION CHARACTERISTICS, with the following subfields
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)
  - 2 - Source of term (NR)
  - 3 - Materials specified (NR)
  - 6 - Linkage (NR)
  - 7 - Data provenance (R)
  - 8 - Field link and sequence number (R)
  - a - Aspect ratio of representative expression (R)
  - b - Color content of representative expression (R)
  - c - Content type of representative expression (R)
  - d - Date of capture of representative expression (R)
  - e - Date of representative expression (R)
  - f - Duration of representative expression (R)
  - g - Intended audience of representative expression (R)
  - h - Language of representative expression (R)
  - i - Place of capture of representative expression (R)
  - j - Projection of cartographic content of representative expression (R)
  - k - Scale of representative expression (R)
  - l - Script of representative expression (R)
  - m - Sound content of representative expression (R)

- There should be a new subfield in 388
  - 7 - Data provenance (R)

- There should be a new subfield in 400
  - 7 - Data provenance (R)

- There should be a new subfield in 410
  - 7 - Data provenance (R)

- There should be a new subfield in 411
  - 7 - Data provenance (R)

- There should be a new subfield in 430
  - 7 - Data provenance (R)

- There should be a new subfield in 447
  - 7 - Data provenance (R)

- There should be a new subfield in 448
  - 7 - Data provenance (R)

- There should be a new subfield in 450
  - 7 - Data provenance (R)

- There should be a new subfield in 451
  - 7 - Data provenance (R)

- There should be a new subfield in 455
  - 7 - Data provenance (R)

- There should be a new subfield in 462
  - 7 - Data provenance (R)

- There should be a new subfield in 480
  - 7 - Data provenance (R)

- There should be a new subfield in 481
  - 7 - Data provenance (R)

- There should be a new subfield in 482
  - 7 - Data provenance (R)

- There should be a new subfield in 485
  - 7 - Data provenance (R)

- There should be a new subfield in 500
  - 7 - Data provenance (R)

- There should be a new subfield in 510
  - 7 - Data provenance (R)

- There should be a new subfield in 511
  - 7 - Data provenance (R)

- There should be a new subfield in 530
  - 7 - Data provenance (R)

- There should be a new subfield in 547
  - 7 - Data provenance (R)

- There should be a new subfield in 548
  - 7 - Data provenance (R)

- There should be a new subfield in 550
  - 7 - Data provenance (R)

- There should be a new subfield in 551
  - 7 - Data provenance (R)

- There should be a new subfield in 555
  - 7 - Data provenance (R)

- There should be a new subfield in 562
  - 7 - Data provenance (R)

- There should be a new subfield in 580
  - 7 - Data provenance (R)

- There should be a new subfield in 581
  - 7 - Data provenance (R)

- There should be a new subfield in 582
  - 7 - Data provenance (R)

- There should be a new subfield in 585
  - 7 - Data provenance (R)

- There should be a new subfield in 670
  - 7 - Data provenance (R)

- There should be a new subfield in 672
  - 7 - Data provenance (R)

- There should be a new subfield in 675
  - 7 - Data provenance (R)

- There should be a new subfield in 677
  - 7 - Data provenance (R)

- There should be a new subfield in 678
  - 7 - Data provenance (R)

- There should be a new subfield in 680
  - 7 - Data provenance (R)

- There should be a new subfield in 700
  - 7 - Data provenance (R)

- There should be a new subfield in 710
  - 7 - Data provenance (R)

- There should be a new subfield in 711
  - 7 - Data provenance (R)

- There should be a new subfield in 730
  - 7 - Data provenance (R)

- There should be a new subfield in 747
  - 7 - Data provenance (R)

- There should be a new subfield in 748
  - 7 - Data provenance (R)

- There should be a new subfield in 750
  - 7 - Data provenance (R)

- There should be a new subfield in 751
  - 7 - Data provenance (R)

- There should be a new subfield in 755
  - 7 - Data provenance (R)

- There should be a new subfield in 762
  - 7 - Data provenance (R)

- There should be a new subfield in 780
  - 7 - Data provenance (R)

- There should be a new subfield in 781
  - 7 - Data provenance (R)

- There should be a new subfield in 782
  - 7 - Data provenance (R)

- There should be a new subfield in 785
  - 7 - Data provenance (R)

- There should be a new subfield in 788
  - 7 - Data provenance (R)

- There should be a new subfield in 856
  - e - Data provenance (R)

- These 856 subfields should be renamed
  - l - Standardized information governing access (R)
  - n - Terms governing access (R)
  - r - Standardized information governing use and reproduction (R)
  - t - Terms governing use and reproduction (R)

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37125: Update MARC21 authority frameworks to Update 33
Caroline Cyr La Rose [Tue, 18 Jun 2024 22:17:59 +0000 (18:17 -0400)]
Bug 37125: Update MARC21 authority frameworks to Update 33

The patch updates the MARC21 authority frameworks to Update 33

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up33authority/adapndxf.html

- No changes in the frameworks for field 034, changes only affect field
  documentation

- There should be two new subfields in 672
  - i - Relationship information (R)
  - 4 - Relationship (R)

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37124: Update MARC21 authority frameworks to Update 32
Caroline Cyr La Rose [Tue, 18 Jun 2024 22:07:22 +0000 (18:07 -0400)]
Bug 37124: Update MARC21 authority frameworks to Update 32

The patch updates the MARC21 authority frameworks to Update 32

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up32authority/adapndxf.html

- There should be two new subfields in 022
  - 0 - Authority record control number or standard number (NR)
  - 1 - Real World Object URI (R)

- There should be three new subfields in 046
  - 3 - Materials specified (NR)
  - x - Nonpublic note (R)
  - z - Public note (R)

- Subfield 082$2 should now be named Edition information

- Subfield 083$2 should now be named Edition information

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37123: Update MARC21 authority frameworks to Update 31
Caroline Cyr La Rose [Tue, 18 Jun 2024 21:49:13 +0000 (17:49 -0400)]
Bug 37123: Update MARC21 authority frameworks to Update 31

The patch updates the MARC21 authority frameworks to Update 31

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up31authority/adapndxf.html

- There should be a new field 335 EXTENSION PLAN with the following subfields https://www.loc.gov/marc/authority/ad335.html
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)
  - 2 - Source (NR)
  - 3 - Materials specified (NR)
  - 6 - Linkage (NR)
  - 7 - Data provenance (R)
  - 8 - Field link and sequence number (R)
  - a - Extension plan term (NR)
  - b - Extension plan code (NR)

- The following 856 subfields should be marked as obsolete
  - b - Access number [OBSOLETE]
  - h - Processor of Request [OBSOLETE]
  - i - Instruction [OBSOLETE]
  - j - Bits per second [OBSOLETE]
  - k - Password [OBSOLETE]
  - l - Logon [OBSOLETE]
  - n - Name of location of host [OBSOLETE]
  - r - Settings [OBSOLETE]
  - t - Terminal emulation [OBSOLETE]

- Field 043 should now be repeatable

- There should be two new subfields in 375
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)

- There should be two new subfields in 384
  - 0 - Authority record control number or standard number (R)
  - 1 - Real World Object URI (R)

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37122: Update MARC21 authority frameworks to Update 30
Caroline Cyr La Rose [Tue, 18 Jun 2024 21:18:13 +0000 (17:18 -0400)]
Bug 37122: Update MARC21 authority frameworks to Update 30

The patch updates the MARC21 authority frameworks to Update 30

To test:
1. Apply patch and reset_all
2. Go to Administration > Authority types
3. Click Actions next to the Default framework and choose MARC structure
4. Check for the changes detailed in the update
   https://www.loc.gov/marc/up30authority/adapndxf.html

- Field 883 should be named METADATA PROVENANCE

- Subfield 883$a should be named Creation process

- Subfield 883$d should be named Creation date

- Subfield 883$q should be named Assigning or generating agency

5. Optional: Check other authority frameworks, they should all be changed

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36941: Limit login branch list when IP restriction enabled
Nick Clemens [Thu, 23 May 2024 12:30:46 +0000 (12:30 +0000)]
Bug 36941: Limit login branch list when IP restriction enabled

This patch adds a new 'ip_limit' option to Koha::Template:Plugin::Branches

To test:
1 - Set some branches in the system to have random IPs
2 - Set one branch to have your IP
    To find the IP in KTD I:
    Enabled ILS-DI
    Set ILS-DI:AuthorizedIPs to 1.1.1.1
    Visit:
    http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=248&id_type=biblio
    And note the unauthorized IP listed
3 - Log out, confirm all branches are listed
4 - Log in, enable StaffLoginRestrictLibraryByIP
5 - Log out, confirm branches with IPs are removed
6 - Confirm branch matching your IP is listed
7 - Choose any of the branches and login
8 - Confirm login 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>
4 days agoBug 35430: Add rota endpoints for stockrotation
Martin Renvoize [Wed, 29 Nov 2023 13:50:59 +0000 (13:50 +0000)]
Bug 35430: Add rota endpoints for stockrotation

This patch adds the CRUD endpoints for stock rotation rota's.

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>
4 days agoBug 35430: Add unit tests for new stockrotation endpoints
Martin Renvoize [Wed, 29 Nov 2023 14:47:23 +0000 (14:47 +0000)]
Bug 35430: Add unit tests for new stockrotation endpoints

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>
4 days agoBug 35430: Move 'Stage' into StockRotation directory
Martin Renvoize [Wed, 29 Nov 2023 11:54:30 +0000 (11:54 +0000)]
Bug 35430: Move 'Stage' into StockRotation directory

Cleaning up a little, I opt to move the 'Stage' controller under a new
StockRotation parent directory.

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>
4 days agoBug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliog...
Janusz Kaczmarek [Tue, 28 May 2024 12:42:20 +0000 (12:42 +0000)]
Bug 36976: Warning 'Argument "" isn't numeric in numeric' in log when merging bibliographic records

When merging bibliographic records, Koha generates warning:

[WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81.

in [plack-]intranet-error.log.

This is because $tagslib->{$fieldtag}->{'tab'} -- for a tag, not for a
subfield --is (always?) an empty string (cf.
C4::Biblio::GetMarcStructure : $res->{$tag}->{tab} = ""), and in
Koha::Util::MARC::createMergeHash it is compared numerically with 0.

Test plan:
==========
1. From biblio search result page, selact two records with the checkboxes
   and start a merge (Edit -> Merge records).  Proceed with merging.
   After the merge, controll the content of the plack-intranet-error.log
   (when using plack -- standard in ktd).  Note the lines:
   [WARN] Argument "" isn't numeric in numeric ge (>=) at /kohadevbox/koha/Koha/Util/MARC.pm line 81.
2. Apply the patch; restart_all.
3. Repeat p. 1.  There should be no fresh warnings.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37038: (QA follow-up) Replace \> by -gt
Marcel de Rooy [Fri, 28 Jun 2024 06:29:50 +0000 (06:29 +0000)]
Bug 37038: (QA follow-up) Replace \> by -gt

Note that -gt is the bash integer comparison and > is the
lexical one:
$ if [ '1' \> '09' ]; then echo true; fi
true
$ if [ '1' -gt '09' ]; then echo true; fi

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added the dev/null redirection to suppress warn in bin/sh.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37038: koha-elasticsearch creates a file named 0
Janusz Kaczmarek [Wed, 5 Jun 2024 17:27:03 +0000 (17:27 +0000)]
Bug 37038: koha-elasticsearch creates a file named 0

After execution of koha-elasticsearch command a file named 0 remains in
the current directory.

Inside the single parentheses, the character '>' is treated as a file
redirection, not as a comparison operator.

Test plan:
==========
1. Have a test installation with Elasticsearch.  As root, perform:
   ./debian/scripts/koha-elasticsearch --rebuild kohadev
   When the command finishes, check the contents of the current
   directory (ls -ltr | tail).  You sould notice a fresh file named '0'
2. Apply the patch. Delete the file named 0.
3. Repeat p. 1.  There should be no file named 0 now.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36936: Squash warning in bookings test
Martin Renvoize [Wed, 26 Jun 2024 13:12:48 +0000 (14:12 +0100)]
Bug 36936: Squash warning in bookings test

Simple catch for the warning throwing by DuplicateID exceptions in the
bookings.t api tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 14565: Allow koha-run-backups to backup an instance called `demo`
Tomas Cohen Arazi [Tue, 28 May 2024 11:19:08 +0000 (08:19 -0300)]
Bug 14565: Allow koha-run-backups to backup an instance called `demo`

We all have a `demo` instance somewhere. It is so weird that the default
script for backing up Koha has a hardcoded exclusion for instances
called like that. This patch fixes that.

To test:
1. Add a demo instance:
   $ ktd --shell
  k$ sudo koha-create --create-db demo
2. Run:
  k$ sudo debian/scripts/koha-run-backups
3. Check the backups:
  k$ ls -l /var/spool/koha/demo/
=> FAIL: No backup for the demo instance
3. Apply this patch
4. Repeat 2
=> SUCCESS: Backup made!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36944: Mock AutoLocation in 2FA subtest
Marcel de Rooy [Thu, 23 May 2024 11:42:24 +0000 (11:42 +0000)]
Bug 36944: Mock AutoLocation in 2FA subtest

Test plan:
Enable AutoLocation in prefs.
Run Auth.t. Should pass now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 32575: Add an empty text body to fix multipart/mixed handling
David Cook [Mon, 17 Jun 2024 02:23:36 +0000 (02:23 +0000)]
Bug 32575: Add an empty text body to fix multipart/mixed handling

By adding an empty text body, we force Email::Stuffer/Email::MIME
to use multipart/mixed handling for the attachment instead of forcing
a single part (ie direct attachment) email, which is not consistently
handled by different email clients.

An empty text body is language-neutral (ie not imposing English),
and it allows SMTP servers to inject organisational footers into
the email (e.g. confidentiality notices).

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I have tested this solution in production, and it works for me.

Bug 32575: Tidy patch

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>
4 days agoBug 36741: Skip auto_too_soon issues in auto renew digest
David Cook [Thu, 23 May 2024 00:47:08 +0000 (00:47 +0000)]
Bug 36741: Skip auto_too_soon issues in auto renew digest

This change adds a line to skip auto_too_soon issues/checkouts
in the auto renew digest template.

Since auto_too_soon do not trigger notifications and don't require
any special action, let's skip them in the breakdown of checkouts in
the AUTO_RENEWALS_DGST email.

Test plan:
0. Apply the patch
1. reset_all (in koha-testing-docker)
2. Note the following line in the AUTO_RENEWALS_DGST template:
[% NEXT IF (checkout.auto_renew_error == 'auto_too_soon') %]

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>
4 days 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>
4 days agoBug 28664: (follow-up) Throw exception if debt if VOID
Martin Renvoize [Thu, 27 Jun 2024 15:55:55 +0000 (16:55 +0100)]
Bug 28664: (follow-up) Throw exception if debt if VOID

This patch adds an exception when an attempt is made to refund against a
VOID debit.

Test plan
1) Run the included unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 28664: Prevent refunds against void lines
Martin Renvoize [Mon, 5 Jul 2021 18:34:58 +0000 (19:34 +0100)]
Bug 28664: Prevent refunds against void lines

With the introduction of double entry accounting for VOID actions, we
need to add an additional filter to the 'Issue refund' button appearance

Test plan
1/ Add a debt
2/ Pay the debt
3/ Void the payment
4/ Confirm that with the patch applied the 'Issue refund' button doesn
not appear on the 'Void' accountline.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37044: Added library branch to SCO OPAC message
Sam Lau [Thu, 6 Jun 2024 14:29:54 +0000 (14:29 +0000)]
Bug 37044: Added library branch to SCO OPAC message

This patch simply adds the correct branch at the end of an OPAC message on the SCO page.

To Test:
1) From the staff interface, click on a patron and add an OPAC message
   to their account.
2) Log into the SCO with this patron.
   (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl)
3) Notice how in the "Messages for you" at the top, you will see the
   message, however, at the timestamp, it says something like "Written
   on 06/06/2024 by " w/o listing the library that sent it.
4) Apply patch
5) Log back into SCO module
6) Note that now in the message timestamp, it correctly lists the
   library that sent the message.
7) Sign-off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36767: Add a hint to show the new default of 22
Matt Blenkinsop [Fri, 14 Jun 2024 16:12:25 +0000 (16:12 +0000)]
Bug 36767: Add a hint to show the new default of 22

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36767: Default port should be set to 22
Matt Blenkinsop [Fri, 14 Jun 2024 16:09:54 +0000 (16:09 +0000)]
Bug 36767: Default port should be set to 22

This patch sets a default value for the EDI account form for the upload and download ports

Test plan:
1) Try to create an EDI account without setting the upload or download ports
2) The form will crash
3) Apply patch and restart_all
4) Try again, the form should submit
5) In your new EDI account, you should see the value of 22 for both ports

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36952: Add 370 to authority index (MARC21)
Caroline Cyr La Rose [Thu, 23 May 2024 19:35:04 +0000 (15:35 -0400)]
Bug 36952: Add 370 to authority index (MARC21)

This enhancement adds field 370 to MARC21 default authority
index mappings.

To test:
1. Import the attached .mrc file
2. Go to Authorities
3. Search 'Main heading' for quebec
   --> 1 result (normal)
4. Search 'Entire record' for quebec
   --> 1 result
5. Go to the OPAC > Authority search
6. Redo steps 3 and 4
   --> Same results
7. Apply patch
8. Reindex authorities (in KTD shell:
   koha-elasticsearch --rebuild -a -v -r kohadev)
9. Redo step 3
   --> Still 1 result (normal)
10. Redo step 4
    --> 2 results
11. Redo step 5-6
    --> Same results as steps 9-10

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36953: Add 678 to authority index (MARC21)
Caroline Cyr La Rose [Thu, 23 May 2024 20:44:09 +0000 (16:44 -0400)]
Bug 36953: Add 678 to authority index (MARC21)

This enhancement adds field 678 to the default MARC21 authority index mappings.

To test:
1. Import the attached .mrc file
2. Go to Authorities
3. Search "Entire record" for innu
   --> No results
4. Go to the OPAC > Authority search
5. Search "in the complete record" for innu
   --> No results
6. Apply patch
7. Reindex authorities (in KTD shell:
   koha-elasticsearch --rebuild -a -v -r kohadev)
8. Redo step 3
   --> 1 result
9. Redo steps 4-5
   --> 1 result

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36912: Add more spans/classes to member-display-address-style.inc
Lucas Gass [Tue, 21 May 2024 20:37:04 +0000 (20:37 +0000)]
Bug 36912: Add more spans/classes to member-display-address-style.inc

To test:
1. APPLY PATCH
2. Make an AV for ROADTYPE
3. Find a patron record and make sure the entire 'Main address' portin is filled out. ( street number, street type, address, address 2, ZIP, City, State, and Country )
4. For easier testing you can add this test CSS to IntranetUSerCSS:

.patronaddress1 {
  .streetnumber {
   color: blue;
  }
  .address1 {
   color: green;
  }
  .roadtype {
    color: pink;
  }
}

.patronaddress2 {
color: lightgreen;
}

.patroncity {
  .city {
     color: orange;
  }
  .state {
     color: brown;
  }
  .zipcode {
     color: limegreen;
  }
  .comma {
     color: teal;
  }
  .country {
     color: red;
  }
}

5. Go to the patron's record and look aty the brief info. you should see classes for everything in the address block. If you added the CSS from above everything should be colored differently.
6. Find the system pref 'AddressFormat' and test everything in US style, French style, and German style.

Signed-off-by: Laurae <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 36777: Add new section for lost item circulation preferences
David Nind [Sat, 1 Jun 2024 22:21:44 +0000 (22:21 +0000)]
Bug 36777: Add new section for lost item circulation preferences

This moves lost item circulation system preferences from
'Checkout policy' to their own 'Lost item policy' section.

It also fixes a capitalization issue - 'Fines Policy' to
'Fines policy'.

Test plan:
1. View the circulation system preferences page (Administration >
   System preferences > Circulation).
2. Search the page, and note that there are several system
   preferences about lost items in the 'Checkout policy' section.
3. Apply the patch.
4. Refresh the page.
5. Note that there is now a new section heading 'Lost item policy'.
   The system preferences previously under 'Checkout policy' are
   now located in this new section.
6. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days agoBug 37002: Correct several HTML markup errors
Owen Leonard [Fri, 31 May 2024 13:14:17 +0000 (13:14 +0000)]
Bug 37002: Correct several HTML markup errors

This patch makes several minor corrections to HTML markup in the
bibliographic detail page template and related include files. This
corrects the following validator errors:

- Stray end tag a.
- Bad value true for attribute disabled on element select.
- Bad value true for attribute disabled on element input.
- No space between attributes.
- Duplicate attribute class.
- The value of the for attribute of the label element must be the ID of
  a non-hidden form control.

The patch is simple enough that an inspection of the patch is probably
enough, but following is a detailed test plan of the affected areas:

- Apply the patch and view the bibliographic detail page in the
  staff interface.
- Under the "Edit" menu in the toolbar, these options should still work
  correctly:
  - Modify record using template
  - Edit items in a batch
  - Delete items in a batch
- Click the "Items" link in the sidebar and find the "Bookable" setting
  for the title's items. Make at least one item bookable and return to
  the detail page.
- Click the "Place booking" button in the toolbar and confirm that you
  can successfully place the booking.
- If you have access to Novelist, confirm that Novelist content displays
  correctly on the detail page.
- Turn on the "EnableItemGroups" preference.
- On the detail page, open the "Item groups" tab and click the "New item
  group" button.
  - In the modal, the "Name" and "Display order" labels give focus to
    the corresponding form field when clicked.
  - Create an item group.
- Under the holdings tab, select one or more items and click "Add/move
  to item group".
  - In the modal, clicking the "Item group" label should give focus to
    the dropdown.

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>
4 days 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>
4 days 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>
4 days agoBug 36905: Terminology: home locations / home collections
Owen Leonard [Thu, 13 Jun 2024 11:58:42 +0000 (11:58 +0000)]
Bug 36905: Terminology: home locations / home collections

This patch removes the unnecessary word "home" from several aria-lablels
in OPAC facets. I think they were copy-paste errors.

To test, apply the patch and perform a catalog search in the OPAC.

Since the aria-label isn't visible in the interface, you can check the
source to confirm that the "Show more" links for locations, collections,
and languages say "Show more locations," "Show more collections," and
"Show more languages."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 days 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>
4 days 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>
4 days 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>
4 days 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>
5 days agoBug 35197: (QA follow-up) Add note about intentions
Martin Renvoize [Wed, 12 Jun 2024 14:45:14 +0000 (15:45 +0100)]
Bug 35197: (QA follow-up) Add note about intentions

This is the beggining of a wider series of developments aimed at
retifying overlapping features.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: Rename to 'Extended attribute types'
Tomas Cohen Arazi [Mon, 29 Apr 2024 17:38:54 +0000 (14:38 -0300)]
Bug 35197: Rename to 'Extended attribute types'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: (QA follow-up) Add 'additional_fields' tag description in docs
Tomas Cohen Arazi [Mon, 29 Apr 2024 13:18:31 +0000 (10:18 -0300)]
Bug 35197: (QA follow-up) Add 'additional_fields' tag description in docs

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: (QA follow-up): Fix permissions specification
Pedro Amorim [Mon, 29 Apr 2024 11:07:50 +0000 (11:07 +0000)]
Bug 35197: (QA follow-up): Fix permissions specification

Sponsored-by: UKHSA - UK Health Security Agency
Sponsored-by: PTFS Europe Ltd
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: (QA follow-up): Fix pasted comment
Pedro Amorim [Mon, 29 Apr 2024 10:01:44 +0000 (10:01 +0000)]
Bug 35197: (QA follow-up): Fix pasted comment

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: (QA follow-up): Update tablename
Pedro Amorim [Mon, 29 Apr 2024 10:00:42 +0000 (10:00 +0000)]
Bug 35197: (QA follow-up): Update tablename

prove t/db_dependent/api/v1/additional_fields.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: Field name consistency
Martin Renvoize [Thu, 7 Dec 2023 13:03:12 +0000 (13:03 +0000)]
Bug 35197: Field name consistency

This patch adds a to_api_mapping and updates the yaml definitions to be
ensure we are consistent with modern best practice for our api field
names.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: Add tests
Pedro Amorim [Mon, 6 Nov 2023 11:33:36 +0000 (11:33 +0000)]
Bug 35197: Add tests

prove t/db_dependent/api/v1/additional_fields.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 35197: Add additional_fields REST API endpoint
Pedro Amorim [Tue, 31 Oct 2023 11:56:31 +0000 (10:56 -0100)]
Bug 35197: Add additional_fields REST API endpoint

Test plan:
1) Apply patch, restart plack 'koha-plack --restart kohadev'
2) Visit /api/v1/additional_fields?tablename=aqinvoices - Notice its empty
3) Visit /cgi-bin/koha/admin/additional-fields.pl?tablename=aqbasket and add a new additional field
4) Do step 2) again - Notice the newly created additional field is there
5) Visit /cgi-bin/koha/admin/additional-fields.pl?tablename=aqinvoices and add a new additional field for invoices
6) Do step 2) again - Notice both additional fields are there
7) Visit /api/v1/additional_fields?tablename=aqinvoices - Notice only the additional field for aqinvoices is listed

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 37181: Add --confirm option to pseudonymize_statistics.pl
Nick Clemens [Sat, 23 Mar 2024 16:24:52 +0000 (16:24 +0000)]
Bug 37181: Add --confirm option to pseudonymize_statistics.pl

To test:
1 - Perform some transactions
2 - Enable Pseudonymization
3 - perl misc/maintenance/pseudonymize_statistics.pl -v
4 - Confirm test run an nothing changed
5 - perl misc/maintenance/pseudonymize_statistics.pl -v -c
6 - Confirm statistics are pseudonymized

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Amend: tidied the changes [tcohen]
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 36815: (follow-up) Use correct language for default
Martin Renvoize [Thu, 27 Jun 2024 10:25:26 +0000 (11:25 +0100)]
Bug 36815: (follow-up) Use correct language for default

When 'default' language is set, we need to use the default as defined by
the OPACLanguages system preference.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 36815: (follow-up) Fix logic for new languages
Martin Renvoize [Fri, 10 May 2024 12:15:39 +0000 (13:15 +0100)]
Bug 36815: (follow-up) Fix logic for new languages

If a notice doesn't already have any data in it we weren't able to use
the object to lookup the sample.. with this patch we now always load the
samples if they exist for each installed and enabled language,
regardless of whether there's already a notice stored in that language.

Test plan
1. Install Spanish by running koha-translate --install es-ES from inside
   the kohashell
2. restart all
3. Set TranslateNotices to Allow
4. Verify that the Spanish-language sample_notices.yml exists
5. Open a notice that has at least one Spanish default notice defined
6. Confirm you see the 'View default' button for the spanish notice and
   that the displayed notice is indeed the spanish translation

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 36815: Expose to the UI
Martin Renvoize [Wed, 8 May 2024 16:05:26 +0000 (17:05 +0100)]
Bug 36815: Expose to the UI

This patch adds a modal to preview the sample notices in the UI and
allow replacing the template content with that content of that modal.

Test plan
1) Apply patches and restart plack (Or just use a sandbox)
2) Login to the staff client and navigate to 'Tools > Notices and Slips'
3) 'Edit' a notice.
4) Note the new 'View default' button on some notices where we ship a
   default in the 'sample_notices' file.
5) Click the button to view the sample notice
6) Confirm 'Close' just closes the modal
7) Confirm 'Copy' copies the sample notice into the editor field

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 36815: Unit tests
Martin Renvoize [Tue, 14 May 2024 12:50:29 +0000 (13:50 +0100)]
Bug 36815: Unit tests

Add a pretty sparse integration test that relies on the default shipped
sample_notices.yaml.  This should catch if the format of that file
changes, but it doesn't test any more than that.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 36815: Add 'get_default' method to Koha::Notice::Template
Martin Renvoize [Wed, 8 May 2024 15:19:26 +0000 (16:19 +0100)]
Bug 36815: Add 'get_default' method to Koha::Notice::Template

This patch adds a new 'get_default' method to the Koha::Notice::Template
object.  The idea is that it returns the template content as defined by
the sample_notices.yml file for the language of your choosing.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 34481: DBRev 24.06.00.010
Katrin Fischer [Thu, 27 Jun 2024 10:10:58 +0000 (10:10 +0000)]
Bug 34481: DBRev 24.06.00.010

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 34481: Tidy altered code
Kyle M Hall [Fri, 17 May 2024 10:51:32 +0000 (06:51 -0400)]
Bug 34481: Tidy altered code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days agoBug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Fridolin Somers [Fri, 4 Aug 2023 20:51:22 +0000 (10:51 -1000)]
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches

Like IncludeSeeFromInSearches adds see from heading in search (4xx),
new system preference IncludeSeeAlsoFromInSearches adds see also from heading (5xx).

Test plan:
Test on both Elasticsearch and Zebra:
1)
1.1) Create an authority record with heading, see from heading 4xx and see also from heading 5xx
1.2) Use this authority in a biblio record
2)
2.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Don't include"
2.3) Rebuild search engine
2.4) Perform a search on heading text => you find the biblio record
2.5) Perform a search on see from heading => you do not find the biblio record
2.6) Perform a search on see also from heading => you do not find the biblio record
3)
3.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Include"
3.2) Rebuild search engine
3.3) Perform a search on heading text => you find the biblio record
3.4) Perform a search on see from heading => you find the biblio record
3.5) Perform a search on see also from heading => you find the biblio record

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days 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>
5 days 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>
5 days agoBug 35232: Fix typo on list.tt
Eric Garcia [Tue, 25 Jun 2024 15:43:55 +0000 (15:43 +0000)]
Bug 35232: Fix typo on list.tt

1. Go to Patron lists and add patrons to a list.
2. Click the "Add multiple patrons" link
3. Clicking the "Borrowernumbers" label doesn't trigger the corresponding radio button
4. Apply patch
5. Attempt steps 1-3
6. Sign off :)

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 days 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>
5 days 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>
5 days agoBug 36970: (Bug 34160 follow-up) Barcode should be html filtered, not uri filtered
Janusz Kaczmarek [Mon, 27 May 2024 21:43:00 +0000 (21:43 +0000)]
Bug 36970: (Bug 34160 follow-up) Barcode should be html filtered, not uri filtered

If a barcode (in rare cases) contains a space, with bug 34160, it is
converted into %20 in holds queue view (because of mistakenly applied
uri filter).

Nota bene, in parallel lines of view_holdsqueue.tt a right filter is
used for the barcode.

Test plan:
==========
1. Have an item with the barcode containing a space.
2. Make a hold on it, run build_holds_queue.pl
3. Go to Circulation > Holds queue ; select your branch etc.
4. You should see '%20' instead of the space in the barcode.
5. Apply the patch, restart_all.
6. Repeat p. 3.  You should now see the space in the barcode.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>