Commit Graph

57848 Commits

Author SHA1 Message Date
Owen Leonard dad63bfdf3
Bug 39688: Improve i18n and spacing
Reworking the template logic of this section improves the spacing and
makes it so that the strings make more sense in translation.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:11 +02:00
Lucas Gass a009011d5c
Bug 39861: Delegate click function to the table
To test:
1 - Add a new Z3950 server with basic information filled out, it doesn't need to be valid
2 - Add a second copy via the DB:
    INSERT INTO z3950servers SELECT null,host,port,db,userid,password,servername,checked,rank,syntax,timeout,servertype,encoding,recordtype,sru_options,sru_fields,add_xslt,attributes FROM z3950servers WHERE id=6;
3 - Delete the copy, assuming it is on page one, it works
4 - Spam the DB with the SQL above and create 20+ entries
5 - Open the Z3950 admin page
6 - Go to second page of servers
7 - Attempt to delete any entry
8 - Nothing happens
9 - APPLY PATCH
10 - Try deleting again, it should now work.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:11 +02:00
Jonathan Druart fb88cabe54
Bug 39473: Add Cypress tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:10 +02:00
Jonathan Druart ec2fbc0d81
Bug 39473: Use exact search for column filtering with dropdown
We need to use an exact search when using the id of an option.

Test plan:
0. If not using default KTD data, create an item type with the following settings:
   Item type: BK
   Description: Books
   leave all other values on their defaults

1. Create a new item type with the following settings:
   Item type: BKA
   Description: Other type of book
   leave all other values on their defaults

2. Add or edit items on a bib record so that the record has at least one item of type "Books" and at least one item of type "Another type of book"

3. Go to Normal View for that bib record

4. Click "Show filters" above the item holdings table

5. In the Item type column, filter by "Books"
Only "Books" items show in the table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:10 +02:00
Pedro Amorim 25167963e9
Bug 39777: Use cardnumber OR authenticated user cardnumber
Test plan:
1) Apply the 'rollback tests' patch to reinstate the testing of the behavior if a cardnumber is missing (and a user is authenticated)
2) Run tests (they should fail):
    prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
3) Apply this patch. Repeat 2) They should pass.

Test plan for UI:
1) Enable ILLModule and ILLHistoryCheck
2) Create a new ILL on OPAC, visit:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
3) Select type="journal", enter DOI = "123". Create.
4) Repeat steps 2 and 3. A history check screen should be displayed (it is not, before this patch).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:09 +02:00
Pedro Amorim c3ef47d432
Bug 39777: Rollback tests
These tests should test an authenticated patron, without the presence of a cardnumber in the metadata (as it is the case in the OPAC form)
This is also the reason why we mock_userenv right below this.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Tidied the file...
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:09 +02:00
Tomas Cohen Arazi a8afc9f8d7
Bug 39784: Remove stray 'xxx' string in migrate.inc
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:08 +02:00
Lucas Gass 8bd72af1ff
Bug 39644: Skip processing guarantor if already seen
To test:
1. In k-t-d try loading both member/moremember.pl and circ/circulation.pl for a patron with many guarantors.
2. Note the load times.
3. APPLY PATCH
4. Load times should now be reduced pretty significantly.
5. prove -v /kohadevbox/koha/t/db_dependent/Koha/Patron.t
6. No behavior should change.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:07 +02:00
Magnus Enger b16a015235
Bug 26479: Always show "Check in"-button if SCOAllowCheckin
To reproduce:
- Make sure SCO is enabled and SCOAllowCheckin = Allow
- Log in to SCO in the OPAC
- Check an item out to yourself
- The item has a green "Renew item" button. Click this button until
  all renewals have been used up, and you get a blue "Check in item"
  button.

To test:
- Apply the patch
- Check an item out to yourself
- Verify the item has a green "Renew item" button in the "Renew"
  column, and a blue "Check in item" button in the "Check in" column
- Click "Renew item" until all renewals are used up. Verify you
  eventually get the "No renewals allowed" message in the "Renew"
  column, but no blue "Check in item" button (in that column)
- Verify the "Check in item" button works as expected
- Set SCOAllowCheckin = Don't allow, reload the SCO page and verify
  that no "Check in" column and no blue "Check in item" button is
  shown, even after all renewals has been used up

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:07 +02:00
Tomas Cohen Arazi b0f21ad50a
Bug 39771: Make `data` attribute nullable for jobs
This patch makes the `data` attribute nullable. This happens when
`$job->finish()` is called with no parameters.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/jobs.t
=> FAIL: Tests don't pass, a 500 is returned when `finish()` was called
with no data
3. Apply this patch
4. Rebuild the API spec:
  k$ yarn api:bundle
5. Repeat 2
=> SUCCESS: Tests pass! The API doesn't explode
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:06 +02:00
Tomas Cohen Arazi 01e3a6f600
Bug 39771: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:06 +02:00
Nick Clemens 0049543314
Bug 39842: Populate current location for SIP item with holdingbranch
This patch simply adds the holdingbranch to the SIP item as current_location

To test:
1 - Find an item and check it in at a different location than its homebranch
2 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR -m item_information --item 39999000004151
3 - Note no AP field is returned
4 - Apply patch, restart all
5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR -m item_information --item 39999000004151
6 - You see the current holdingbranch in the AP field
7 - Return the item to its homebranch
8 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR -m item_information --item 39999000004151
9 - Confirm home and holding branches are the same now

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:05 +02:00
Slava Shishkin 32eeb4c87c
Bug 39787: Fix missing sender EAN when only one EAN is defined
If only one EAN is defined for the library, the Create EDIFACT order
button template used the eans.0 object instead of its ean field.
As a result, the data-ean attribute contained an object, not the EAN
string. Fixed by explicitly accessing the field: eans.0.ean.

Steps to reproduce:
1. Ensure only one Library EAN is configured in
   /cgi-bin/koha/admin/edi_ean_accounts.pl.
2. Create a new basket.
3. Inspect the HTML of the Create EDIFACT order button.
4. The data-ean attribute will show an object instead
   of EAN string — e.g. Koha::Schema::Result... (this is the bug).
5. Apply the patch and reload the basket page.
6. Inspect the HTML again — data-ean should now show
   the EAN string (fixed).
7. Click the button, confirm basket closure, then go to EDIFACT messages
(/cgi-bin/koha/acqui/edifactmsgs.pl) and verify the message was created.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:05 +02:00
Nick Clemens 6130a072d3
Bug 39857: Fix expanded_avs option for OAI
This patch correct the call to filter the record

To test:
1 - Enable OAI
2 - Set  OAI-PMH:ConfFile to '/var/lib/koha/kohadev/OAI.yaml'
3 - Edit/create the file above to have content:
format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1
    expanded_avs: 1
4 - save and restart_all
5 - View some records:
    http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
6 - Note the items show coded values
7 - Apply the regressions tests patch
8 - Run:
    $ ktd --shell
   k$ prove t/db_dependent/Koha/OAI/Server/Repository.t
=> FAIL: Tests fail!
9 - Apply this patch
10 - Restart all
11 - Refresh and confirm items now have descriptions
12 - Repeat 8
=> SUCCESS: Tests pass!

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Amended the test plan to include the added regression
tests run
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:04 +02:00
Tomas Cohen Arazi 2e07046708
Bug 39857: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:04 +02:00
Lucas Gass 0f70ec68c9
Bug 39848: Restrict record deletion to staff who have edit_catalogue permission
To test,
1. Create a user with the following permissions: edit_any_item, edit_items, items_batchdel, items_batchmod.
2. When logged in as that user, use the batch item deletion tool to delete a few items.
3. Select “Delete records if no items remain” and “Delete selected items.”
When the job has processed, notice that X item(s) deleted. X record(s) deleted.
4. APPLY PATCH
5. With the same user repeat step 2.
6. This time there should be no option to 'Delete records if no items remain'.
7. Give the same use the Edit catalog (Modify bibliographic/holdings data) (edit_catalogue) permission.
8. Make sure you can successfully delete a record using the 'Delete records if no items remain'.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:03 +02:00
Tomas Cohen Arazi ea5b6135d5
Bug 39858: Fix saving vendors with invoices
This patch makes the form remove the `invoices_count` attribute from the
object before sending it to the API.

To test:
1. Have a vendor with some invoice
2. Edit the vendor to add a contact (for example)
3. Click 'Submit'
=> FAIL: Error, cannot be saved
4. Apply this patch
5. Rebuild the Vue assets:
   $ ktd --shell
  k$ yarn js:build
6. Restart:
  k$ restart_all
7. Reload the browser page and edit the vendor
8. Click 'Submit'
=> SUCCESS: It saved
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:03 +02:00
David Cook e429e642d6
Bug 39849: Fix makefile target dependency order
This patch fixes the makefile target dependency order, so that it runs
in this order:
1. Build CSS and JS assets
2. Run pm_to_blib, which is the step that copies over most of Koha's files
into blib
3. Move 'vue/dist' files via "move_compiled_js" makefile target/step

To test:
1a. Run 'git archive --format=tar HEAD > "koha.orig.tar"'
1b. sudo mkdir /opt/koha /opt/build_koha
1c. sudo chown kohadev-koha /opt/koha /opt/build_koha
1d. mv koha.orig.tar /opt/build_koha/.
1e. cd /opt/build_koha
1f. tar xvf koha.orig.tar
2. Run "perl Makefile.PL"
Choose "single"
Choose "/opt/koha" for target directory
Choose the defaults for the rest
3. Run "make"
4. Note the first step is the CSS/JS build
5. Note the second step is the copying of files to "blib"
6. Run "find -name 'esm.js.map'" and note it appears in the regular
build location as well as in "blib"
7. Run "find -name 'swagger_bundle.json'" and note it appears in
the regular build location as well as in "blib"
8. Run "make install"
9. Run the above "find" commands using "/opt/koha" and note that
the files appear in the installed directory

Signed-off-by: Blou <philippe.blouin@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:02 +02:00
Emmi Takkinen a2f190f01f
Bug 38356: (follow-up) Add code block to handle CURRENTISSUE message
Package C4::SIP::ILS::Transaction::Checkout was missing block to
handle new "CURRENTISSUE" message. This patch adds this block
so tests should no longer fail.

To test prove t/db_dependent/SIP/Message.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 11:49:13 +02:00
Emmi Takkinen 6e01b1a731
Bug 38356: (follow-up) Fix failing Circulation.t tests
After pushing bug 38356 to main, Circulation.t tests
started to fail. Fail happened randomly and was related
to sub is_serial trying to fetch biblios metadata. This
patch changes the way test item is build in
"CanBookBeIssued + needsconfirmation message" tests. It
seems more reliable to use build_sample_item rather than
building item using biblio and biblioitem data.

To test prove t/db_dependent/Circulation.t.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 11:49:12 +02:00
Katrin Fischer 69df45721a
Bug 30200: DBRev 24.12.00.040
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:59 +02:00
Martin Renvoize c2cfd92b3c
Bug 30200: (QA follow-up) Keep multiselect in sync
This patch updates the multiselect status picker handling to ensure it
remains in sync with the active tab.

On tab change we now disable statuses that are not part of the tab
select options, deselect any other status filters and then select all
tab statuses.  We allow further refinement of the filters still by
allowing the user to deselect any of the available statuses. The filters
should continue to work as before except using the 'Clear' button will
now reapply the tab defined status set in full as apposed to removing
all status filtering entirely.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:58 +02:00
Magnus Enger 038cf1dca4
Bug 30200: Add pref to right file
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:58 +02:00
Katrin Fischer f1ad32ebe2
Bug 30200: (follow-up) Update database update and pref description
* Rephrases the system preference description a bit
* Adds IGNORE to the database statement
* Update output message of database statement to include pref name

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:57 +02:00
Lari Taskula 543c5fab0a
Bug 30200: Add custom tabs to View ILL requests page
To test:
0: yarn css:build:prod
1. Set system preference ILLRequestsTabs:
- name: New
  status:
    - NEW
- name: Requested or reverted
  status:
    - REQ
    - REQREV
- name: Queued
  status:
    - QUEUED
- name: Empty
  status:
    - NONEXISTENT

2. Add some ILL requests with the following SQL:
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'NEW', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'NEW', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'REQ', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'REQREV', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'QUEUED', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'KILL', 'Standard');

3. Go to cgi-bin/koha/ill/ill-requests.pl
4. After the page loads, you should now see 4 different
   tabs:
   "All", "New", "Requested or reverted", "Queued", and
   "Empty"
5. Confirm all ILL requests are present under "All" tab
6. Confirm only ILL requests with the statuses you defined
   in system preference ILLRequestsTabs are under tabs
   "New", "Requested or reverted" and "Queued"
7. Confirm no ILL requests are under tab "Empty"
8. Clear system preference ILLRequestsTabs
9. Observe only one tab "All" under which correct ILL
   requests are presented
10. Try some other status values in ILLRequestsTabs and
   observe expected behavior

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:57 +02:00
Lari Taskula 9fabd8cac3
Bug 30200: Add a new system preference ILLRequestsTabs
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:56 +02:00
Katrin Fischer 23eab5df2f
Bug 39579: DBRev 24.12.00.039
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:56 +02:00
Lisette Scheer f9fef03cb9
Bug 39579: (QA follow-up) Update atomic update
This patch updates the atomic update to fix an error when the database was updated and the permissions for the atomic update file.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:55 +02:00
Alexander Blanchard 1f6e2c8f3c
Bug 39579: Restrict Patron Self Reg Date of Birth
Some libraries are getting dates of birth from the
self-registration form that make patrons impossible
ages, e.g. year of birth 1900.

To Test:
1) Navigate to the oPac
2) Ensure you are not logged in
3) Below the log in, see 'Create an Account'
4) Click the link and complete the relevant fields
5) Add an unrealistic d.o.b e.g 1900
6) Complete the verification and click 'Submit'
7) Your acount has been created
8) Apply the patch
9) Navigate to the staff site
10) Navigate to Administration > SystemPreferences
11) Navigate to OPAC preferences
12) Identify PatronSelfRegistrationAgeRestriction
13) Add a maximum age in numberals e.g. 100
14) Repeat steps 1 - 6
15) An error message that you have exceeded max age will appear.
16) Alter your date of birth to make your age below that of the max age you set
17) Complete the verification
18) Your account should be created as normal

Sponsored-by: Cheshire
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 08:49:55 +02:00
Lucas Gass 2d484d326b
Bug 39582: Syndetics support for UPC and OCLC numbers on OPAC results page
To test:
1. Enable Syndetics
2. Have a record with an 024 and 1st indicator.
3. Do a search to return the record from step 3.
4. The image does not display.
5. APPLY PATCH
6. Try step 3 again, this time the cover image should display properly on the OPAC results page.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:10 +02:00
David Cook ff403dcfb3
Bug 36586: Define self-checkin timer using Javascript class
This patch rewrites the self-checkin timer code to be defined in a
Javascript class which is then instantiated in once in sci-main.pl
depending on certain conditions (ie a barcode has been entered, or
an item has been checked in by barcode).

To test:
1 - Set SelfCheckinTimeout to a small value like 5
2 - Go to the self checkin:
    http://localhost:8080/cgi-bin/koha/sci/sci-main.pl
3 - Sign in as the SCI user
4 - Watch the page, it should refresh every 5 seconds
5 - Confirm that moving the mouse/typing prevents the reset
6 - Check in an item
7 - Wait and confirm reload of main page happens when idle
8 - Confirm mouse/typing prevents refresh
9 - Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Bug 36586: Add sc-timer to sco

This patch implements the timer form the last patch on the sco

To test:
1 - Set SelfCheckTimout to 5 or something low for testing
2 - Go to the self checkout module
3 - Either sign in or confirm you have AutoSelfCheck user setup
4 - Observe the page reloads every 5 seocnds (or as you set above)
5 - Sign in as a patron
6 - Confirm on idle you are logged out to home page
7 - Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Bug 36586: Fix tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:09 +02:00
David Nind ee32b5aa7b
Bug 38532: (follow-up) Add missing space for credits message
Fix credit message to add a missing space:
- Previously: Credits: Patron has outstanding creditsof
- Now: Credits: Patron has outstanding credits of

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:09 +02:00
Martin Renvoize 6b66e4e309
Bug 38532: (follow-up) Use Koha::Patron->account methods
Update the patch to use Koha::Account and it's associated 'outstanding'
methods to ensure we accurately portray outstanding amounts rather than
'all credits' totals.

I also remove the unused `$balance` variable from the
members/moremember.pl controller.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:08 +02:00
Andrew Fuerste Henry 337ef11cb3
Bug 38532: Show both debits and credits on patron's check out and details pages
To test:
1: Have patrons with a variety of credit/debit combinations
2: Confirm Koha shows the total debit amount in patron_messages if any debits exist
3: Confirm Koha does not show anything about creditd in patron_messages if any debits exist
4: Apply patch, restart_all
5: Confirm all patrons show both debit total and credit total

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:08 +02:00
Jonathan Druart 0fcb3b5bb6
Bug 39814: Restore filtering to the serials search table
Similar to bug 39775, but for the serials search.

Test plan:
Create some serials then go to http://localhost:8081/cgi-bin/koha/serials/serials-search.pl
and confirm that the filters now appear at the top of the table (which
is consistent with the other tables) and that they work correctly.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:07 +02:00
Nick Clemens 1df229719c
Bug 38650: Only fill title level holds, or holds on the exact item
We change the conditions for filling holds to require that either:
- the hold is title level
- the hold is on the exact item

To test:
 1 - Place a hold for patron A on item #1 of a record
 2 - Place a hold for patron B on item #2 of a record
 3 - Issue item #2 to patron A - their hold on item #1 is filled incorrectly, check the item in
 4 - Apply patch, restart all
 5 - Place hold for patron A on item #1
 6 - Issue item #2 to patron A - their hold on item #1 is not filled, check the item in
 7 - Cancel that hold
 8 - Place a title level hold for the record for patron A
 9 - Check item #1 in at a different branch and confirm transfer
 9 - Issue item #2 to patron A
10 - The hold is filled as title level, even though item #1 was selected for the hold, check the item in
11 - Place an item level hold for item #2 for patron A
12 - Issue item #2 to patron A, hold is filled

Signed-off-by: Stephanie Petruso <spetruso@aacpl.net>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:07 +02:00
Nick Clemens 5cdfea2d5f
Bug 38650: Unit tests
Signed-off-by: Stephanie Petruso <spetruso@aacpl.net>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:06 +02:00
Martin Renvoize 64b4e7cc27
Bug 39322: (follow-up) Further improvements
This patch updates the query logic of create_from_statistic for borrower
attributes.

We replace the count of attributes types with a query to fetch all
attributes type codes where keep_for_pseudonymization is set.

We then check for content in that array before using it to perform a
filtered search on the patrons extended_attributes to only return
attributes set for pseudonymization.

This should result in the same skip of extended_attributes fetch should
no attribute types be set to pseudonymization, but it should also reduce
the 1 call to attribute types per attribute the patron has to just a
single filtered call for patron attributes attributes followed by the
store call for each pseudonymizated attribute.

Test plan:
As before, except there should be even fewer sql calls to the database
than before for the case where there are attributes.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:05 +02:00
Nick Clemens 10b84d9df4
Bug 39322: Don't fetch borrower attributes if none kept for pseudonymization
This patch simply checks the count of pseudonymized borrower attributes before
looping through them

To test:
 1 - Define several borrower attributes, none kept for pseudonymization
 2 - Add some values for those attributes to some patrons
 3 - Generate some statistics for those patrons (checkin, checkout, renew, etc)
 4 - Enable pseudonymization
 5 - On command line: export DBIC_TRACE=1
 6 - Run the pseudonymization script with a date in the future to ensure all transactions are captured:
    perl misc/maintenance/pseudonymize_statistics.pl -v -c --before 2026-01-01
 7 - Note the borrower attributes are fetched
 8 - Apply patch
 9 - repeat 6
10 - Note the attributes are only counted, not fetched
11 - Make one of the attributes kept
12 - repeat 6
13 - Note the attributes are counted and fetched

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:05 +02:00
Jonathan Druart 85f9e30ed5
Bug 38010: Restore ordering on the contracts table
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-08 07:59:04 +02:00
Jonathan Druart edf94b9f7e
Bug 39835: Adjust some boolean flags
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:30:01 +02:00
Matt Blenkinsop aea3b3c700
Bug 39835: (follow-up) Fix API specs to check for boolean
Amended-by: Jonathan Druart
Removed changes to item.yaml

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:30:01 +02:00
Fridolin Somers ea6e31c39b
Bug 39746: Fix wrong system preference 'AutoLocation' in test suite
Bug 26176 renamed 'AutoLocation' to 'StaffLoginRestrictLibraryByIP'
Needs to be fixed in test suite

Test plan:
Enable 'StaffLoginRestrictLibraryByIP' in prefs
Run : prove Auth.t
Should pass

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:30:00 +02:00
Fridolin Somers b79fb6aedf
Bug 39747: Fix wrong system preference 'DefaultHoldExpirationUnitOfTime' in test suite
Correct preference is 'DefaultHoldExpirationdateUnitOfTime'.
Also no reason for ";".

Test by running : prove t/db_dependent/Reserves.t

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:30:00 +02:00
Andrew Fuerste Henry 66074093c0
Bug 39525: Label policy as 'Hold and booking pickup library match'
To test:
Apply patch, go to circ rules, confirm it says "Hold and booking library pickup match" under both "Defaul checkout, hold and return policy" and under "Default holds and bookings policies by item type" at both the all libraries and library-specific levels.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:29:59 +02:00
Caroline Cyr La Rose 79a6bca596
Bug 39550: RestrictPatronsWithFailedNotices system preference should not be in Patron relationships section
This patch changes the RestrictPatronsWithFailedNotices system
preference from the Patron relationships subsection of the Patron
preferences to a newly created Patron restrictions subsection.

To test:
1. Apply patch
2. Go to Administration > System preferences > Patrons
--> There should be a new section called 'Patron restrictions'
with RestrictPatronsWithFailedNotices in it

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:29:59 +02:00
Lucas Gass 2d75f7aa91
Bug 39491: Change all note inputs to textarea
To test:
1. APPLY PATCH
2. Try adding notes to the following actions from the patron transaction page:
    -Payout
    -Refund
    -Apply discount
    -Void
    -Cancel charge
3. Also try 'Pay amount', 'Pay selected', 'Write off selected' yellow buttons
4. Try the individual buttons for 'Pay' and 'Write off'

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

Removed stray 0 from id attribute.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:29:58 +02:00
Lucas Gass f79aec38b8
Bug 39603: Make sure authorised value category is ITEMTYPECAT
To test:
1. Add some AVs for ITEMTYPECAT and set some of your item types to be in that Search category. I made one called OTHER
2. Go to the OPAC advanced search page, the item types should be correctly displaying under ITEMTYPECAT with the correct description from ITEMTYPECAT.
3. Create a new AV called OTHER in a different category like 'ERM_AGREEMENT_CLOSURE_REASON'. Make the description something different like 'Wrong description'.
4. Now go back to the OPAC advanced search.
5. Notice your OTHER option now reads 'Wrong description'.
6. APPLY PATCH and restart_all
7. Try again, the OPAC descriptions should now be correct.

Signed-off-by: Eric Phetteplace <phette23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:29:58 +02:00
nina martinez 0dcfde757e
Bug 39237: Change opac-user title to "Your summary"
test plan :
1- login to opac
2- check the browser window title name
3- It should start with " Your Summary "

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:29:57 +02:00
Owen Leonard 650a2b7bca
Bug 39083: Fix title sorting on list of tagged titles
This patch adds the "anti-the" class to the title column on the tagged
titles page. This allows DataTables to ignore articles when sorting.

To test you should add the same tag to multiple titles.

In the staff interface, go to Tools -> Tags, and click a term which has
been added to multiple titles.

In the list of titles, test title sorting. Articles like "a", "an", and
"the" should be ignored when sorting.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-07 14:29:57 +02:00