Commit graph

54375 commits

Author SHA1 Message Date
3d385d0e11
Bug 29507: Speed up auto renew cronjob via parallel processing
The cron can take a very long time to run on systems with many issues.
For example, a partner with ~250k auto_renew issues is taking about 9 hours to run.

If we run that same number of issues in 5 parallel chunks
( splitting the number of issues as evenly as possible ), it could take under 2 hours.

Test Plan:
1) Generate a number of issues marked for auto_renew
2) Run the automatic_renewals.pl, use the `time` utility to track how much time it took to run
3) Set parallel_loops to 10 in auto_renew_cronjob section of config in koha-conf
4) Repeat step 2, note the improvement in speed
5) Experiment with other values

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:11 +02:00
783aed1b07
Bug 18317: DBRev 24.06.00.013
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:10 +02:00
8477099dee
Bug 18317: (QA follow-up) Fix missing ,
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:10 +02:00
52448fa788
Bug 18317: Add database update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:09 +02:00
7d1d042ff2
Bug 18317: (QA follow-up) Clean up code and add unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:08 +02:00
4d03c038e4
Bug 18317: Perl tidy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:08 +02:00
8c561d950f
Bug 18317: Allow check out of already checked out items through SIP
This patch allows checkouts to be processed via SIP even when
the item is already checked out to a user.

Test plan:
0) Apply the patch
1) koha-sip --stop kohadev
2) koha-sip --start kohadev
3) misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron koha --item 39999000001310
4) misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron 23529000035676 --item 39999000001310
5) Note the output includes "AFItem checked out to another patron"
6) Enable system preference "AllowItemsOnLoanCheckoutSIP"
7) misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m checkout --patron 23529000035676 --item 39999000001310
8) Note the output no longer includes "AFItem checked out to another patron" and the item has been checked out to patron 23529000035676

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:07 +02:00
Andreas Jonsson
a6457c14aa
Bug 37244: Facets should not impact library pulldown.
When parsing the branch limits the regular expression matches
parameters that contains the substring "branch:" rather than the prefix
"^branch:". Consequently, both prefixes homebranch: and holdingbranch:
triggers the branch limit.

Test plan:

- Activate the system preference  IntranetAddMastheadLibraryPulldown.
- In staff interface:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Click on the "more options" icon in the search box and make sure
    that "All libraries" is selected.
- Activate the system preference  OpacAddMastheadLibraryPulldown
- In opac:
  - Perform a catalogue search (e.g. "book").
  - Click on a facet for holding library or home library
    (e.g. "Fairview").
  - Make sure "All libraries" is still selected in the dropdown next
    to the search input.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:07 +02:00
a84a5fc7d0
Bug 37249: Disambiguate itemnumber with USING clause
1. Do an item search that returns results
2. Use the column filtering available at the top of the table for each column
3. Try itemnumber, get a 500 error each time
4. As long as there is data in the itemnumber column and you attempt to use another column you'll see a 500 error.
5. APPLY PATCH, restart_all
6. The itemnumber column filtering should now work as expected

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:06 +02:00
Julian Maurice
5f07b8ed52
Bug 35959: Fix C3 merge of Koha::Old::Hold (part 2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:06 +02:00
Julian Maurice
3d1b5932b4
Bug 35959: Fix C3 merge of Koha::Account::Debit, Koha::Account::Credit
Test plan:

Run the following commands

  perl -c Koha/Account/Debit.pm
  perl -c Koha/Account/Credit.pm

They should all print 'syntax OK'

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>
2024-07-05 15:48:05 +02:00
Julian Maurice
4190e92f5e
Bug 35959: Fix C3 merge of Koha::Biblio::Metadata::Extractor::MARC::*
Test plan:

Run the following commands:

  perl -c Koha/Biblio/Metadata/Extractor/MARC/MARC21.pm
  perl -c Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.pm

They should all print 'syntax OK'

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>
2024-07-05 15:48:04 +02:00
Julian Maurice
c951b02182
Bug 35959: Fix C3 merge of Koha::Old::Hold
Test plan:

Run `perl -c Koha/Old/Hold.pm`
It should print 'syntax OK'

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>
2024-07-05 15:48:04 +02:00
Julian Maurice
86acd6ec61
Bug 35959: Fix C3 merge of 5 modules
Test plan:

Run the following commands:

  perl -c Koha/AuthorisedValue.pm
  perl -c Koha/Patron/Category.pm
  perl -c Koha/Patron/Attribute/Type.pm
  perl -c Koha/Account/DebitType.pm
  perl -c Koha/Account/CreditType.pm

They should all print 'syntax OK'

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>
2024-07-05 15:48:03 +02:00
98bcde6143
Bug 37065: Filter expired bookings by default
This patch adds a default filter for the bookings table on the bookings
tab of a biblio.  We also add the option to turn off the filtering after
initial page load.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:03 +02:00
3662d51fe7
Bug 36742: (follow-up) Fix sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-02 17:43:02 +02:00
Eric Garcia
464f9296d4
Bug 37126: Add link to patron account when checking out to statistical patron ends checkout
When checking out an item to a statistical patron, where that item
is already checked out to another patron, the patron details in the
message do not link to that patron.

This patch fixes this so that the patron details are now linked.

This could be useful so that staff can more easily access the patron's
details, and can, for example, check for any incorrect charges.

Test plan:
1. Set up a statistical patron for local use:[1]
   1.1 Add a statistical patron category (Administration > Patrons and
       circulation > Patron categories), for example:
       - Category code: STAT
       - Description: Statistical
       - Enrollment period: 99
       - Category type: Statistical
   1.2 Add a new statistical paton (Patrons > +New patron > Statistical),
       for example:
       - Surname: Reference Statistical Patron
       - Card number: refstat
2. Check out an item to a standard patron.
3. Check out the same item to the statistical patron created in step 1.2.
4. Note that when the item is checked out to the statistical patron,
   the patron name and number in the message are not linked:
   "Item checked in from: PATRON_NAME (BORROWERNUMBER)".
5. Apply the patch.
6. Repeat steps 2 and 3.
7. Note that the patron details in the message are now linked.

[1] Monday Minutes: Statistical Patron and Local Use:
    https://bywatersolutions.com/education/monday-minutes-statistical-patron-and-local-use

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-02 17:20:40 +02:00
49ecc5c797
Bug 30873: DBRev 24.06.00.012
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-02 17:20:39 +02:00
0d4ebe4170
Bug 30873: Add system preference to hide libraries link in the OPAC
Some users would prefer that the libraries link not appear in the menu
of links under the OPAC's main search bar. This patch adds a preference
to do so.

The preference defaults to "On" since "On" is the current default
behavior.

To test, apply the patch and run the database update prcoess.

- In the OPAC, confirm that by default the "Libraries" link appears.
- In the staff interface, go to Administration -> System preferences ->
  OPACShowLibraries
- Set the preference to "Don't show"
- Return to the OPAC and confirm that the "Libraries" link isn't there.
- Try to navigate directly to /cgi-bin/koha/opac-library.pl. You should
  be redirected to a 404 page.

Sponsored-by: Athens County Public Libraries
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>
2024-07-02 17:20:39 +02:00
b5f122696c
Bug 37055: Check count of holds, not if defined
To test:
 - enable WaitingNotifyAtCheckout
 - have or create a waiting hold for a patron
 - check out an item to a different patron who does not have a waiting hold
 - Koha says "This patron has waiting holds that are available for checkout"
 - Apply patch
 - Reload patron (click 'Checkout' tab)
 - Check out an item - no warning
 - Find the patron with waiting hold
 - Check out an item - warning
 - Checkout the waiting item - no warning

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-02 17:20:38 +02:00
a964d98dc8
Bug 37206: Removing an item from a label batch should be a CSRF-protected POST operation
This patch updates the label batch edit template so that removing a
single or multiple items from a batch is a CSRF-protected POST
operation.

The patch also removes the existing "if ($op eq 'cud-delete') {" section
of label-edit-batch.pl because it was unused.

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

- Create a label batch and add multiple items to it.
- From the list of label batches, click "Edit" on the batch you created.
- Click the "Delete" button for one of the items in the batch.
  - If you confirm, the item should be deleted.
- In the "Select" column, check multiple checkboxes.
- Click the "Remove selected items" button in the toolbar.
  - Verify that confirming this operation results in the items being
    deleted from the batch.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-02 17:20:38 +02:00
edc5caf976
Bug 37056: Mount a new intranet_svc api to avoid redirects
When an unauthorized call to svc is made, we use the ErrorDocument middleware to respond with an HTML
page. The API doens't do this, it simply returns its status. We should mount the svc as its own app to avoid
the redirect to HTML for unauthorized responses

To test:
1 - Create a report
2 - Add to IntranetUserJs:
    $(document).ready(function() {
      // Your report ID
      var reportId = '492';

      // Fetch the report
      $.get('/cgi-bin/koha/svc/report?id=' + reportId, function(data) {
        console.log('Kaboom');
      });
    });
3 - Log out
4 - Attempt to login
5 - KO
6 - Apply patch
7 - Reset all (or copy the necessary changes to your plack/apache files)
8 - Generate report and update user js again
8 - Logout, login
9 - Success!

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>
2024-07-02 17:20:37 +02:00
Caroline Cyr La Rose
aeb2a50a0b
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>
2024-07-02 10:20:40 +02:00
Caroline Cyr La Rose
5d7968811d
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>
2024-07-02 10:20:39 +02:00
Caroline Cyr La Rose
86dc1ce6cd
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>
2024-07-02 10:20:39 +02:00
Caroline Cyr La Rose
2e90cfce5a
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>
2024-07-02 10:20:38 +02:00
Caroline Cyr La Rose
71d5234054
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>
2024-07-02 10:20:37 +02:00
David Nind
8bcc30b8cd
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>
2024-07-02 10:20:37 +02:00
Caroline Cyr La Rose
f6ff83f17c
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>
2024-07-02 10:20:36 +02:00
0a2c2468a7
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>
2024-07-02 10:20:36 +02:00
04a038f6b0
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>
2024-07-02 10:20:35 +02:00
7c0ed91c80
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>
2024-07-02 10:20:34 +02:00
67f18ea834
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>
2024-07-02 10:20:34 +02:00
ffab1df952
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>
2024-07-01 18:55:56 +02:00
43a08f0f1e
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>
2024-07-01 18:55:55 +02:00
b54c854d24
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>
2024-07-01 18:55:54 +02:00
Alexandre Noel
2e06546799
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>
2024-07-01 18:55:54 +02:00
30acbb2604
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>
2024-07-01 18:55:53 +02:00
Sam Lau
99b2fab569
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>
2024-07-01 18:55:53 +02:00
Sam Lau
0f2a5bf987
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>
2024-07-01 18:55:52 +02:00
Sam Lau
ce0fe316b8
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>
2024-07-01 18:55:52 +02:00
975a869c49
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>
2024-07-01 18:55:51 +02:00
11c5abda48
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>
2024-07-01 18:55:50 +02:00
a1cfe67d5e
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>
2024-07-01 18:55:50 +02:00
Phil Ringnalda
9c4b2c665f
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>
2024-07-01 18:55:49 +02:00
631f146ec3
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>
2024-07-01 18:55:49 +02:00
c81a4bb213
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>
2024-07-01 18:55:48 +02:00
7a20ef5d1c
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>
2024-07-01 18:55:47 +02:00
4cd81ed3ec
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>
2024-07-01 18:55:47 +02:00
0cb91c3a77
Bug 37216: DBRev 24.06.00.011
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-01 18:55:46 +02:00