Commit Graph

56944 Commits

Author SHA1 Message Date
Victor Grousset/tuxayo d0ad8a0727
Bug 35635: (QA follow-up): fix terminology
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:55 +01:00
Lucas Gass 189fde2304
Bug 35635: (follow-up) Fix DBRev
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:54 +01:00
Lucas Gass 56dbd0b491
Bug 35635: Add opac_mandatory to patron attribute table
To test:
1. Before applying the patch go to Adminstration > Patron attribute types
2. Create or modify some attributes to be mandatory and some to not be mandatory.
3. APPLY PATCH, updatedatabase, restart_all
4. Go back to Adminstration > Patron attribute types. The patron attributes that were made mandatory should now also have the opac_mandatory field checked.
5. Make sure that you can change the correctly save the new "OPAC mandatory:" field.
6. If the 'Display in OPAC:' field is unchecked the 'OPAC mandatory:' checkbox should be disabled.
7. Mark some patron attributes as 'OPAC mandatory:'.
8. Go to the OPAC self reg page, the field should be required.
9. BAck on Adminstration > Patron attribute types check some attributes as 'OPAC mandatory:' and 'Editable in OPAC:'.
10. As a logged in OPAC user go to "Personal details" and make sure the attribute is required.
11. For the same attriubute as step 9-10 , mark as NOT 'Editable in OPAC:'. Make sure you can still save the form on the OPAC "Personal details" page.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:54 +01:00
Lucas Gass 478c64a7b4
Bug 35635: Split mandatory field into mandatory and opac_mandatory
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:53 +01:00
Lucas Gass 3ec2419152
Bug 35635: DB Updates
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:53 +01:00
Martin Renvoize 7597d8f0d1
Bug 38818: Unit tests
Add unit tests for the updated mock module

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:52 +01:00
Martin Renvoize 17b2b4cd6e
Bug 38818: Add diag option to t::lib::Mocks::Logger
This patch adds a diag method to the Mocks::Logger object. This aids in
debugging logging errors by simply outputting all log lines to screen in
a diag statement.

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-20 17:34:52 +01:00
Tomas Cohen Arazi cc0aa072dd
Bug 38762: Make compare_es_to_db.pl provide links to staff interface
This patch makes the script provide links to the staff interface instead
of the OPAC. This way, the links can just be picked to access the
problematic records for fixing them.

To test:
1. Run:
   $ ktd --shell
  k$ perl misc/maintenance/compare_es_to_db.pl
=> FAIL: Generated links point to the OPAC
2. Apply this patch
3. Repeat 1
=> SUCCESS: Generated links are useful as they point to the staff
interface
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:37 +01:00
Jonathan Druart 1dd5bc8c0c
Bug 38952: Remove JS function messenger from acq.js
Test plan:
% git grep -l messenger
koha-tmpl/intranet-tmpl/lib/fontawesome/css/brands.min.css
koha-tmpl/intranet-tmpl/lib/fontawesome/webfonts/fa-brands-400.ttf
koha-tmpl/opac-tmpl/lib/fontawesome/css/brands.min.css
koha-tmpl/opac-tmpl/lib/fontawesome/webfonts/fa-brands-400.ttf

The function is unused and can be removed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:36 +01:00
Jonathan Druart 74050efda3
Bug 38871: Remove sub string_list from misc/translator/xgettext.pl
It is never used

% git grep string_list
should not return anything

Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:36 +01:00
Jake Deery 7f48902403
Bug 38313: Remove confusing string from RESTOAuth2ClientCredentials
This patch removes a once necessary and now confusing warning
from the RESTOAuth2ClientCredentials syspref.

TO TEST:
a)  Notice how the RESTOAuth2ClientCredentials syspref references
    installing Net::OAuth2::AuthorizationServer, even though this
    module is in the cpanfile and koha-perldeps and has been since
    22.11
b)  APPLY PATCH
c)  Run reset_all in k.t.d
d)  Notice how the message is now gone

Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:35 +01:00
Emily Lamancusa 2a5880d86b
Bug 36112: Port default CHECKOUT_NOTE notice to TT
Port the default notice text to Template Toolkit. Also, add access to
item information in order to give more useful information about the
checked-out item that the note refers to (in this case, the item barcode
instead of the biblionumber)

To test:
1. Apply patch and reset all
2. Enable the system preference AllowCheckoutNotes
3. Go to Administration > Libraries and edit the current logged-in
   library to ensure that there is a value in the Email field
4. Check out an item to a patron
5. Ensure the patron has values in the first name and surname fields
6. Log into the OPAC as that patron
7. Click to display the patron's current checkouts
8. Click the + button to the right of a checkout
9. Click the "Add Note" button beneath the table
10. Add some text and submit the note
11. Return to the staff interface and go to the Notices tab for the patron
--> Confirm that there is a notice called "Checkout note" with all the
correct information

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:35 +01:00
Aleisha Amohia bd14a9d869
Bug 36660: (follow-up) Use mainentry search for more accurate linked results
Useful in particular when headings are split across the $a and the $x

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:34 +01:00
Aleisha Amohia ab055249e9
Bug 36660: Make Authorities 'see from' searches 'exact'
This enhancement changes the search URL for 'see from' headings to look for an 'exact' match.

When using a 'see from' heading, when Koha does a 'contains' search this is quite general and may fetch a bunch of unexpected results.

This enhancement also changes the OPAC authority search to search on all headings when doing a 'see from' search, so the results mirror that on the staff interface. Also important if subheading info is stored in the $x or other subfields, for example.

To test (assume using KTD):

1) In the staff interface, add a new topical term authority. Set the following values:
  150$a: Quests
  550$a: Travel
2) Add a second topical term authority, this is one we DON'T want showing in 'see from' results. Set the following values:
  150$a: Cheques
  550$a: Travellers' cheques
3) Do a 'main heading ($a only)' search for 'Quests'. Your new heading should show in the results, with 'Travel' showing as a see from searchable link.
4) Click the 'Travel' search link. Notice you get a few results, including the 'Cheques' heading which we don't want to show.
5) Follow steps 3 & 4 on the OPAC. Notice you get a few results, but your 'Quests' heading doesn't even show, which you may expect it to.

6) Apply the patch and restart services.

7) In the staff interface, go back to the Authorities homepage.
8) Repeat steps 3 & 4. Confirm you get the expected 'Quests' heading in the results, and do not get the 'Cheques' heading.
9) Repeat steps 3 & 4 on the OPAC. Confirm you get the expected 'Quests' heading in the results, and do not get the 'Cheques' heading.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:34 +01:00
Owen Leonard 0f1ee97837
Bug 38227: Collapse authority popup search form when showing results
This patch takes the collapsing-panel functionality of the patron entry
form and generalizes it so that it can be used on the authority search
popup window in cataloging.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Cataloging -> New record (basic MARC editor)
- Switch to tab 1 and click the tag editor link next to tag 100 subfield
  a.
- The search form should be expanded in the pop-up window.
- Perform a search. When the window reloads with search results the
  search form should be collapsed.
- Confirm that clicking the "Search options" legend works correctly to
  expand and collapse the form.
- Collapse the form and click the "Clear form" button. The form should
  expand -- This is based on the assumption that the "Clear form" button
  would be used when the user wants to initiate a new search.
- Go to Patrons -> New patron and confirm that collapsible sections
  still work correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:33 +01:00
Owen Leonard a4531fd78f
Bug 7508: (follow-up) Show item number if item has no barcode
This follow-up adds item number as a fallback for display when an item
doesn't have a barcode.

The patch also implements a sidebar sub-menu showing barcodes (or item
numbers) so that the user can jump directly to a particular section. The
sub-menu will show a scrollbar if the record has more than around 15
items.

The patch modifies staff-global.scss to improve readability of the
sidebar sub-menu and removes CSS which was specific to the system
preferences page. This make the sub-menus on the item details and system
preferences pages consistent with each other.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:32 +01:00
Owen Leonard c099055bad
Bug 7508: Collapsable items on items tab
Since we recently updated the patron entry form in the staff interface
to have more visibly-collapsible sections I thought there might be
interest in picking up this old bug.

The patch implements collapsible sections on the item detail page,
allowing the user to hide sections by clicking the item barcode header.
The patch includes relocation of some JS code from the authority and
MARC editors into the global JS file. This is the code that helps jump
the user to a certain scroll point on the page.

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

- In the staff interface, locate a bibliographic record with items and
  view the detail page.
- Click the "Items" tab in the sidebar.
- On the item detail page, each section should have an icon indicating
  that they are expanded. Hovering your mouse over the section heading
  should highlight the clickable area.
- Test that each section collapses correctly and that the next section
  is moved into view.

- Go to Cataloging -> New record. Test that the links to specific tags
  under the main tab bar still work to jump you to the correct part of
  the page.
- Go to Authorities -> New authority and perform the same test.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:32 +01:00
Tomas Cohen Arazi 03ae61e9f8
Bug 35246: Make Koha::Biblio->to_api throw relevant exception if no biblioitem row
This patch makes the `to_api()` method return an proper exception when
the `$self->biblioitem` accessor returns `undef`. This is a bad data
scenario and we could do better in terms of logging the situation.

The new exception will be correctly rendered in the logs by the
`unhandled_exception` Mojolicious helper and no behavior change on the
API.

I wasn't sure to keep the api tests I wrote. I originally added handling
for the specific exception in the controller, but it become obvious it
was not worth: too much code, the `GET /biblios` endpoint would need the
same treatment, etc. And the current `500 Internal server error` is good
enough as a response, and the logs explain the situation correctly.

To test:
1. On a fresh `KTD` pick a biblio (say biblionumber=1)
2. Use your favourite REST tool (Postman?) to access the record with
   `Accept: application/json`. i.e.

```
GET kohadev.localhost/api/v1/biblios/1
Accept: application/json
```

=> SUCCESS: All good
3. Delete the related `biblioitems` row:
   $ ktd --shell
  k$ koha-mysql kohadev
   > DELETE FROM biblioitems WHERE biblionumber=1; \q
4. Repeat 2
=> SUCCESS: You get a 500 error
5. Check the logs
=> FAIL: You get a cryptic message about accessing a method on an
undefined object:

```
2025/02/13 13:15:00] [ERROR] GET /api/v1/biblios: unhandled exception (Mojo::Exception)<<Can't call method "to_api" on an undefined value at /usr/share/koha/Koha/Biblio.pm line 1433.>>
```

6. Apply this patch
7. Restart things:
  k$ restart_all
8. Repeat 2
=> SUCCESS: You get a 500 error
9. Check the logs
=> SUCCESS: You get a more meaningful exception:

```
[2025/02/13 13:20:00] [ERROR] GET /api/v1/biblios/1: unhandled exception (Koha::Exceptions::RelatedObjectNotFound)<<Exception 'Koha::Exceptions::RelatedObjectNotFound' thrown 'The requested related object does not exist' with accessor => biblioitem, class => Koha::Biblioitem>>
```

10. Run the tests:
  k$ prove t/db_dependent/Koha/Biblio.t \
           t/db_dependent/api/v1/biblios.t
=> SUCCESS: They pass!
11. Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:31 +01:00
Tomas Cohen Arazi b2215edce1
Bug 35246: Unit tests
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:31 +01:00
Owen Leonard bf1e45e490
Bug 39053: Add page-section div to reports results pages
This patch adds a "page-section" wrapping div around reports results
pages where it is missing.

Note: This patch contains indentation changes.

To test, apply the patch and test the following reports, confirming that
the results page looks correct:

- Patrons with the most checkouts
- Acquisitions statistics
- Patrons with no checkouts
- Patrons statistics
- Most-circulated items
- Catalog statistics
- Average loan time
- Circulation statistics
- Lost items
- Catalog by item types
- Holds statistics

Sponsored-by: Athens County Public Libraries
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>
2025-02-19 17:05:30 +01:00
Martin Renvoize 9bed52a868
Bug 38375: Unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:30 +01:00
Martin Renvoize 006485a036
Bug 38375: Use perl 5.10+ \R
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:29 +01:00
Lari Strand 3407dc28a3
Bug 38375: Splitting SIP2SortBinMapping syspref does not support all operating systems' line endings
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-19 17:05:29 +01:00
Victor Grousset/tuxayo 81df6dbe64
Bug 39149: Make perltidy.t also check .PL files
Now perltidy.t will check 2958 files instead of 2954. Which matches
with the 4 .PL files.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 15:35:53 +01:00
Tomas Cohen Arazi 50d1acb3de
Bug 39149: Tidy .PL files
This patch is the result of running:

```shell
perl misc/devel/tidy.pl *.PL
```

Commiting raised an error about fix-perl-path.PL calling `warn` which I dismiss for the
time being.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 15:35:53 +01:00
Tomas Cohen Arazi 63cba14abd
Bug 39149: Make tidy.pl deal with .PL files
This patch adds handling for files with the `.PL` extension to the
`tidy.pl` helper script.

It will now consider them Perl files and tidy them as appropriate.

I opted for explicitly listing `PL` instead of making the existing check
case-insensitive because the only files I found with changed case (i.e.
Perl scripts that don't have `.pl`) are:

$ find . -type f -iname "*.pl" ! -name "*.pl"
./fix-perl-path.PL
./build-resources.PL
./rewrite-config.PL
./Makefile.PL

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 15:35:52 +01:00
Andrew Fuerste Henry da6996c08e
Bug 38986: Restore Any in fund dropdown on suggestions homepage
This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>

Bug 38986: Restore Any option to suggestions homepage filter

"Any" should show all suggestions, any fund value and null fund values. One should not be able to create a suggeestion set to "Any"
"None" should show only suggestions with no fund value selected. A new suggestion should default to "None"

To Test:
1: have two suggestions, one with a fund selected and one without
2: go to suggestions homepage, confirm the filter does not have an "Any" option
3: apply patch, reload page
4: confirm the fund filter on suggestion homepage now has both Any and None and they behave as described above
5: confirm the fund filter defaults to Any as you change the branch filter
6: create a new suggestion, confirm its fund defaults to None and cannot be set to Any

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 15:35:52 +01:00
Katrin Fischer 20eb3d0a2e
Bug 37256: Fix faulty rebase, removing code from bug 25711
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 15:35:51 +01:00
Owen Leonard 0bb4787f68
Bug 37273: (follow-up) Remove parentheses and # from column
The new ID column shows numbers like "(#2)". I think the parentheses and
hash symbol are unnecessary and inconsistent with the way we do it in
other places and should be removed.

To test, apply the patch and rebuild the staff interface CSS: Either run
'yarn build' from the command line or if you're using a sandbox, click
the "Actions" menu for your sandbox and choose "Build CSS and JS."

Follow the previous test plan and confirm that the ID column looks
correct.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:33 +01:00
Eric Garcia d361c8adb6
Bug 37273: Added ID column to ERM Agreements and Licenses Tables
To test
1. Apply patch, yarn build, restart_all
2. System preferences -> ERMModule -> Enable
3. E-resource management -> Agreements -> "+New Agreement"
4. Notice ID is removed from name and put in it's own column
5. Repeat with licenses table

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:33 +01:00
Martin Renvoize e5eaa2aa17
Bug 37256: Ensure empty and null work as expected in PUT
Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:32 +01:00
Martin Renvoize adae95debe
Bug 37256: Add 'PUT' for circulation rule sets
Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:32 +01:00
Martin Renvoize df21c0618e
Bug 37256: Unit tests for set_rules
This patch adds unit tests for the to be introduced set_rules endpoint
for setting circulation rule sets.

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:31 +01:00
Martin Renvoize f4342c922d
Bug 37256: Defined 'context' of circulation rules
This is a follow-up to the previous bug exposing circulation rules over
the API.

We formally define a definition for a circulation rules set including a
new 'context' object the defines the context, library_id,
patron_category_id and item_type_id combination of the rules returned.

This is just a patch I missed in the last submission that I'd meant to
add and it's important for the PUT part of this patchset.

Sponsored-by: Glasgow Colleges Library Group <https://library.cityofglasgowcollege.ac.uk>
Signed-off-by: George Harkins <George.Harkins@cityofglasgowcollege.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:31 +01:00
Owen Leonard 85d9861fb3
Bug 28453: (follow-up) Make pagination labels translatable
This patch moves the English strings out of Output.pm and adds classes
to the pagination markup which can be used as hooks for JavaScript. The
global JS include is modified to look for these hooks and add text
labels to the links.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:30 +01:00
Owen Leonard 2685ac2c6c
Bug 28453: Update pagination subroutine to generate Bootstrap markup
This patch modifies Output.pm to change the HTML it generates when
creating pagination bars. The changes allow the pagination menu to be
styled like Bootstrap pagination, making them consistent with the
pagination on catalog search results.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Test pages where the pagination_bar subroutine is called:
 - Authorities -> Authority search results.
 - Cataloging -> Cataloging search results.
 - Cataloging -> MARC Editor -> Edit tag which is configured to use the
   unimarc_field_210c value builder.
 - Reports -> Saved SQL reports -> Results.
 - Tools -> Comments.
 - Lists -> List contents.

The pagination bar markup was removed from the templates for these pages
because it wasn't being used:

 - Administration -> Patron attribute types.
 - Administration -> Record matching rules.
 - Tools -> Tags.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:30 +01:00
Andrew Fuerste Henry d734a119c2
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Check Digests only for both
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Check Digest only for both
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out 2+ items
7. Set a custom due date for tomorrow and check out 2+ more items
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:29 +01:00
Katrin Fischer 34e71af165
Bug 36954: DBRev 24.12.00.009
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:28 +01:00
Marcel de Rooy 754fef4bac
Bug 36954: (QA follow-up) Add a dbrev print message about sip.log
With reference to BZ comment9 and comment10.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:28 +01:00
Marcel de Rooy cd4860fb59
Bug 36954: (follow-up) Return to the two logfiles pattern
Note that --errlog should refer to all output from the wrapper daemon
process only like respawning processes etc.
And that --output should refer to all output from the daemonized
client process (so in our case the SIP server).

Moving a few sip.log occurrences to sip-output in that regard.

Test plan:
Restart koha-sip.
Login to sip server.
Restart koha-sip.
Verify that you see Net::Server messages and traces from the login in the
-output log. The restarts are not found however in -error. See my comment
on the BZ report.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
2025-02-18 10:55:27 +01:00
Marcel de Rooy 235c31e683
Bug 36954: Adjust logfiles in koha-sip
No need for three files here (and badly specified).
We can just use sip.log.

Test plan:
Run koha-sip and verify that logging is still done as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:27 +01:00
Tomas Cohen Arazi 03520cf90b
Bug 39096: Add .git-blame-ignore-revs mapping to Makefile.PL
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:26 +01:00
Jonathan Druart 5127534f5c
Bug 39020: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-17 15:06:04 +01:00
Lisette Scheer d6c2124b29
Bug 39020: Search filters can't parse query
1. Turn on the SavedSearchFilters system preference
2. Go to advanced search, select a number of item types and search
3. Save the search
4. Enter a search term (such as power)
5. select the filter. Observe the following message:
Error: Unable to understand your search query, please rephrase and try again.
6. Apply patch
7. Repeat steps 4 & 5, search should work as expected.
8. Sign off!

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-17 15:06:03 +01:00
William Lavoie db067d48ee
Bug 19113: Barcode value builder not working with numeric branchcode
The regexp for the value builder 'hbyymmincr' doesn't allow for numerics in the branchcode,
so the nextnum found is always 0 and multiple Add always generate the same barcode.
This simply allow for numerics within the regex.

Test
- It's a bit complicated.  You need
   - all your branchcodes to be numerics (01,02,71...)
   - all barcodes to already be a bunch of numbers
- Modify the syspref 'autobarcode' to hbyymmincr, the home branch + date one.
- Find an item in the pro-search,
- New -> New Item
- Click on the 'p' to have the value builder create the next barcode.
   - Without the patch, the query won't have found anything, so it'll suggest xxxxxx0001
- Click Add.  It reprensent the form to enter another one.
   - Click on the 'p' edit box, it'll offer you again xxxxxx0001
With the patch, it'll offer valid ones everytime.

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>
2025-02-17 15:06:03 +01:00
Jonathan Druart 8e808e97b3
Bug 39080: Adjust the fixed header after we added the column filters
If a column contains a dropdown list (for libraries for instance), the
width of the column will be modified, but DT's fixed header need to be
adjusted.

Test plan:
One example where this problem can be observed is the "holds to pull"
table: "Title" is followed by "Libraries".
Test without and with the patch, and confirm that the display/offset is fixed.

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>
2025-02-17 15:06:02 +01:00
Jonathan Druart 16f528e4b4
Bug 36025: Fix failure when pref is off
Prevent JS error if ExtendedPatronAttributes is off
 "Uncaught TypeError: options.extended_attribute_types is undefined"

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes the Cypress tests pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-17 15:06:02 +01:00
Jonathan Druart 60332e7552
Bug 36025: Add cypress tests
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tests pass, with the followup patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-17 15:06:01 +01:00
Andreas Jonsson 208a7cc3a4
Bug 36025: Incorrect clause in patron search
This patch removes the search clause for
extended_attributes when there is no patron
attribute types which are searchable by default.

The clause was incorrectly added because the array
extended_attribute_types was rendered as [""]

This seems to be an issue with get_columns from DBIX Class and how that is cast when forcing an array
in the template. It returns an empty string for nothing, a scalar for a single value, and an array for multiple
values.

This patch now checks if the variable is set and has content, and wraps as an array if so. In the case of two attributes,
we do double the array, but this was true before as we always cast the return as an array.

Test plan:

* Make sure that no borrower attribute type is set to "searched by default"
  in Koha administration -> Patron attribute types.
* Enable the network monitring in the developer tools in your web browser
  (Ctrl + Shift + E in firefox or Ctrl + Shift + I and select the "Network"
  tab).
* Go to the patrons view members-home.pl (click patrons in top menu bar).
* Search for a string that will match multiple borrowers (to not be automatically
  redirected)
* Examine the ajax-request and make sure that "extended_attributes.code" is NOT
  part of the query.
* Also, in koha-testing-docker with selenium enabled,
  run 'perl t/db_dependent/selenium/patrons_search.t'
* Now set one patro attribute to searchable and searched by default and add a value for a patron, confirm search works
* Set a second patron attribute to searchable and searched by default and confirm searching works

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Did not run the selenium tests, as they have
been obsoleted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-17 15:06:01 +01:00
Lucas Gass 3cc9282e7b
Bug 39040: Add CSS back via _tables.scss
To test:

1/ Turn on POS
2/ Enable Cash registers
3/ Configure some items for sale
4/ Make some POS transactions
5/ Visit pos/register.pl?registerid=x
6/ Notice the problem described
7/ APPLY PATCH and regenerate CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
8/ Look at the table again. The rows should now be correctly highlighted.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-17 15:06:00 +01:00