]> git.koha-community.org Git - koha.git/log
koha.git
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months agoBug 35942: OPAC user can enroll several times to the same club
Kyle M Hall [Tue, 30 Jan 2024 15:58:02 +0000 (10:58 -0500)]
Bug 35942: OPAC user can enroll several times to the same club

Test Plan:

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months agoBug 37187: Fix deletion of label batches and label templates
Owen Leonard [Wed, 26 Jun 2024 14:56:58 +0000 (14:56 +0000)]
Bug 37187: Fix deletion of label batches and label templates

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

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

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

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months agoBug 36895: Fix background job link
Matt Blenkinsop [Fri, 17 May 2024 13:48:28 +0000 (13:48 +0000)]
Bug 36895: Fix background job link

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

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

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

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

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

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

- Perform the same tests in the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months 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>
2 months agoBug 37198: Improve GetPreparedLetter documentation
Martin Renvoize [Wed, 26 Jun 2024 14:24:01 +0000 (15:24 +0100)]
Bug 37198: Improve GetPreparedLetter documentation

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36141: Add classes to CAS text on OPAC login page
Fridolin Somers [Wed, 21 Feb 2024 09:09:30 +0000 (10:09 +0100)]
Bug 36141: Add classes to CAS text on OPAC login page

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

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

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

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36911: (follow-up) Add markup comments
Owen Leonard [Tue, 21 May 2024 17:12:21 +0000 (17:12 +0000)]
Bug 36911: (follow-up) Add markup comments

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36911: Reindent circ-menu.inc
Owen Leonard [Tue, 21 May 2024 16:36:54 +0000 (16:36 +0000)]
Bug 36911: Reindent circ-menu.inc

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

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months 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>
2 months agoBug 36498: Tidy cataloguing/additem.pl
Kyle M Hall [Fri, 17 May 2024 10:29:39 +0000 (10:29 +0000)]
Bug 36498: Tidy cataloguing/additem.pl

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months 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>
2 months agoBug 36128: (QA follow-up) Add regression test
Martin Renvoize [Thu, 27 Jun 2024 09:01:45 +0000 (10:01 +0100)]
Bug 36128: (QA follow-up) Add regression test

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

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

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

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

by checking if the variable is defined before comparing it.

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months 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>
2 months agoBug 35257: Change 'Circulation desks' to 'Desks'
David Nind [Sat, 8 Jun 2024 06:19:53 +0000 (06:19 +0000)]
Bug 35257: Change 'Circulation desks' to 'Desks'

The administration page is the only page that uses "Circulation desks" for
navigation elements. All other areas (sidebar menu, breadcrumbs,
adding and editing desks, page titles) all use just "Desks".

This updates the Koha administration page to use "desks" for consistency. It
also updates the UseCirculationDesks system preference description.

Test plan:
1. Enable the UseCirculationDesks system preference.
2. Go to Koha administration > Patrons and circulation
3. Select the Circulation desks option.
4. Note that the sidebar menu, breadcrumbs, and page titles all
   use just "Desks".
5. Note that in the top-right hand menu bar that it says "NO DESK SET". If
   you click the dropdown menu it says "Set library and desk".
6. Apply the patch.
7. Go to Koha administartion > Patrons and circulation.
8. Note that the heading now says just "Desks".
9. Note that the description for the UseCirculationDesks system
   preference is now "Don't use/Use circulation desks".
10. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35240: Add missing IDs to input
Eric Garcia [Tue, 25 Jun 2024 17:18:13 +0000 (17:18 +0000)]
Bug 35240: Add missing IDs to input

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 30372: Fix value->attribute
Pedro Amorim [Fri, 24 May 2024 16:10:44 +0000 (16:10 +0000)]
Bug 30372: Fix value->attribute

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 35238: Incorrect label markup in patron card creator printer profile edit form
Eugene Jose Espinoza [Tue, 5 Dec 2023 12:43:19 +0000 (12:43 +0000)]
Bug 35238: Incorrect label markup in patron card creator printer profile edit form

HTML element for Template name is changed from 'label for "template_name"' to 'span with "label" class'.

So from:
<label for="template_name">Template name:</label>
It should now be:
<span class="label">Template name:</span>

To test:
1) Go to: Tools -> Patron card creator -> Edit printer profile.
2) Right click page and choose "View page source".
3) Locate the part with "Template name". It should read:
<span class="label">Template name:</span>

Signed-off-by: Riomar Resurreccion <urslibrary.webinars@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36966: Actually fix data-link for local cover images
David Cook [Thu, 30 May 2024 04:16:56 +0000 (04:16 +0000)]
Bug 36966: Actually fix data-link for local cover images

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36966: Fix data-link for local cover images
David Cook [Wed, 29 May 2024 07:26:18 +0000 (07:26 +0000)]
Bug 36966: Fix data-link for local cover images

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36966: Fix local cover image links for items
David Cook [Mon, 27 May 2024 03:33:06 +0000 (03:33 +0000)]
Bug 36966: Fix local cover image links for items

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36880: Record overlay rules are not validated
Jan Kissig [Thu, 16 May 2024 08:11:53 +0000 (10:11 +0200)]
Bug 36880: Record overlay rules are not validated

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

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

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

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

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

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37157: Fix Malformed UTF-8 character in JSON string before decode_json
Hammat Wele [Fri, 21 Jun 2024 17:07:47 +0000 (17:07 +0000)]
Bug 37157: Fix Malformed UTF-8 character in JSON string before decode_json

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 37016: Invalid due date in SIP renew response
Andreas Jonsson [Thu, 13 Jun 2024 15:00:31 +0000 (17:00 +0200)]
Bug 37016: Invalid due date in SIP renew response

Test plan using koha-testing-docker:

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 36527: Patron category or item type not changing when editing another circulation...
Phan Tung Bui [Thu, 11 Apr 2024 20:02:27 +0000 (16:02 -0400)]
Bug 36527: Patron category or item type not changing when editing another circulation rule

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

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

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

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

To test:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 25387: (follow-up) Slightly change wording of alert
Katrin Fischer [Thu, 27 Jun 2024 07:03:20 +0000 (07:03 +0000)]
Bug 25387: (follow-up) Slightly change wording of alert

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 25387: (QA follow-up) Tidy
Nick Clemens [Tue, 25 Jun 2024 21:12:39 +0000 (21:12 +0000)]
Bug 25387: (QA follow-up) Tidy

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

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

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 33563: Add comments for Elasticsearch security config
David Cook [Wed, 22 May 2024 23:49:35 +0000 (23:49 +0000)]
Bug 33563: Add comments for Elasticsearch security config

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2 months agoBug 33317: DBRev 24.06.00.009
Katrin Fischer [Tue, 25 Jun 2024 15:19:35 +0000 (15:19 +0000)]
Bug 33317: DBRev 24.06.00.009

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>