Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 73dac4c5cc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Uncaught TypeError: patron_table.$ is not a function
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea123185b9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Without this patch it's always "{budget_description} (Inactive)"
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e057c02ca3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1. Create a basket and add an item to the order. Close the basket.
2. Receive shipment. Create an invoice.
3. Go to the invoice and then go to the receipt page.
4. Receive the item you had added to your basket. Under Fund you will only see “Keep current (your budget name)”. Active budgets are not visible.
5. Click on “Show inactive” — both inactive and active budgets become visible.
6. Apply the patch. Restart all.
7. Repeat step 3 and 4. Notice now that the active budgets are visible under your Fund dropdown. On this step you can create an inactive budget / fund if you don’t have one set already. Next click on “Show inactive” and notice that the active fund is active, and the inactive fund has a budget_description of inactive.
8. Test to make sure budgets stick.
9. Sign off and have a wonderful day!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1d2fc5133d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It seems we dropped a space somewhere so the class for default registers had become:
"{Branchcode}default" instead of "{Branchcode} default"
This broke the JS for selecting
To test:
1 - Enable UseCashRegisters system preference
2 - Create three registers for three different branches
3 - Make each register the default
4 - Click on username in top right
5 - Select 'Set library and cash register'
6 - Choose on of the three branches
7 - Note the dropdown does not populate with the default
8 - Note no registers can be selected
9 - Apply patch
10 - Reload the page
11 - Change libraries and verify all works as expected
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 301ec5dae2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch alters the code to append instead of prepend, removing the need to reverse the list
To test:
1 - Write a report to get some patron
SELECT cardnumber,surname FROM borrowers WHERE cardnumber <>'' ORDER BY rand() LIMit 6
2 - Enabled 'showLastPatron' and set count to 3
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=showLastPatron
3 - Copy the barcodes in order from the report and search for them in patron search, you'll want two tabs so you can keep report open
4 - Notice at 4th patron that list order has changed
5 - When 5th patron is loaded, the 4th is removed from the list
6 - Apply patch
7 - Clear the list
8 - Repeat the test plan, but note that list order does not change
9 - Confirm the patrons are removed from the list in expected order when adding new
10 - Change the count to 1 and search for several patrons, ensuring the last patron link is always correct
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f689133aaf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan, ktd:
1) Enable ILLModule
2) Install an additional backend plugin e.g. 'RapidILL':
https://github.com/openfifth/koha-ill-rapidill/releases/tag/v2.2.5
3) Restart plack if you have to:
$ koha-plack --restart kohadev
4) Edit the ILLOpacbackends system preference to just 'Standard'.
5) Now, attempt to create a request with the installed backend directly:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=RapidILL
6) Notice the form is shown. It shouldn't be, as the only OPAC back is Standard.
7) Apply patch. Repeat. You get a 404.
Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2d063d00d5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If 'default_save_state' is not in the yaml file then the feature is
enabled by default.
Caught by the following failure:
t/db_dependent/selenium/patrons_search.t ..
# Failed test 'Search works when category of patrons is limited to a library we are not signed in at'
# at t/db_dependent/selenium/patrons_search.t line 471.
# got: 'Showing 1 to 5 of 26 entries (filtered from 82 total entries)'
# expected: 'Showing 1 to 15 of 26 entries (filtered from 82 total entries)'
# Looks like you failed 1 test of 1.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eba0060286)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 412879a418)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When the authorised value of a REPORT_GROUP is numeric the filtering
does not work.
Test plan:
Create a new REPORT_GROUP av "123" (the description can be alphanumeric)
Create a new report and assign it to this new group
Confirm that with this patch the filtering works when the "123" tab is
selected
Signed-off-by: George <george@nekls.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bed343d5ed)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We should remove the regex metacharacters from the string or JS code
will raise an error and the query won't be generated, leading to the DT
neverending loading problem.
Test plan:
Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4
In the global "Search" of the items table, search using a regex
metacharacters in order to form a broken regex (eg. '[')
=> Without this patch there is a JS error in the console "Uncaught
SyntaxError: unterminated character class" and you get the "Processing"
that never ends
=> With this patch applied the search succeeds.
Signed-off-by: Mathieu <mathsabypro@gmail.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0f6f5ab252)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Mathieu <mathsabypro@gmail.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c4c013645)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The changes made on bug 39533 for the export page have affected other
instance of select2.
eg. on the "place holds" view the select2 elements are too narrow.
This patch suggests to reduce the elements on which the CSS rule
'max-width: 60%' is applied.
Test plan:
Confirm that this patch does not affect the display of the select2
elements on the export and item edition pages.
Confirm that the pickup locations are wider (and their values are
displayed) when placing multi holds
Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 353508cf0b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Batch patron operations are broken when using cardnumbers
From
commit d659526b5a
Bug 38664: Tidy the whole codebase
- [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type %]
-[%# We must not add whitespace to the cardnumbers %][% cells.cell | html %]
+ [%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type %]
+ [%# We must not add whitespace to the cardnumbers %][% cells.cell | html %]
The auto tidy added the whitespaces back
This patch suggests to use TT to add the new lines.
+ [%- cells.cell | html -%][% "\n" | $raw %][%# We want 1 item per line, without whitespace %]
Test plan:
- save and run "SELECT cardnumber FROM borrowers"
- use the Batch Operations button to send all visible cardnumbers to batch patron modification
- see that all of your cardnumbers have been found
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d79cf5665d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a9ffa8b64a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We want to add Cypress test for the force_visibility flag.
We do not test the basket table: the acq module will be rewritten
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c7a7fdde08)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Return early if there is no visibility to force
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad906a523a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
It's already set in the global config.
However it does make sense to have it for supplier_report: you don't
want to show it in the dropdown if the pref is off
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1ffa8aa6dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The _dt_visibility function is only called when the state is
initialized. Here we want to force the visibility of some columns even
if the state exists already.
The idea of this patch is to add a new 'force_visibility' flag to the
column when the visibility needs to be respected regardless what is in
the state. That should only be used when column cannot be toggled.
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 41b531b315)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The IF/ELSE block contents have been reversed in the JS code.
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3429bbfa12)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If a row exists in DB for a given table, default_sort_order will be NULL
in DB which will replace the flag from the YAML file: the feature won't
be available.
Test plan:
0. checkout main (we don't want bug 30633)
1. Go to http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
=> Notice that "Default sort order" is not available for 'holdingst'
(it's added by bug 30633)
2. Save
3. Verify what you have in DB:
select * from tables_settings where module="opac" and tablename="holdingst";
4. Apply 30633, restart_all
5. Go to http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
=> Notice that "Default sort order" is not available for 'holdingst' (not ok)
6. Save
7. Verify what you have in DB:
select * from tables_settings where module="opac" and tablename="holdingst";
8. Apply this patch set
9. Go to http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
=> Notice that "Default sort order" is available for 'holdingst'!
10. Save, verify what you have in DB.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de27044ba2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
No change here.
Test plan:
Apply only this patch and confirm that the tests are still passing.
The previous code was dynamic but complicated to adjust. The next patch
needs more complex and specific comparisons.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 71553c5803)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
To test:
1 - save and run a report of "SELECT borrowernumber FROM borrowers"
2 - observe your results page does not include the Show Data Menu button
3 - save and run a report of "SELECT cardnumber FROM borrowers"
4 - observe your results page does include the button
5 - save and run a report of "SELECT borrowernumber, cardnumber FROM borrowers"
6 - observe you are once again buttonless on the results page
7 - apply patch
8 - run your report from step 1, observe you now have the button
9 - run your report from step 3, observe you still have the button
10 - run your report from step 5, observe you now have the button
11 - confirm that the batch actions dropdown only includes the patron actions once
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5e5ffeea82)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
We had
[% IF item_level_holds > 0 || show_priority %]
[% ELSIF show_priority %]
We never reach ELSIF.
I am not sure what's the correct fix here. People involved on bug 39276
should help.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5d770843f3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01c2e93a5d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes malformed entries in .mailmap that were causing
display issues and incorrect author mapping.
Issues fixed:
- Marjorie Barry-Vila: Missing closing '>' in email address
- Mathieu Saby: Incorrect alias format instead of proper mailmap format
(was using excessive padding with alias, now uses proper
'Name <email> OldName <email>' format)
These structural issues were breaking terminal display in tools like
tig and preventing proper author consolidation.
Test plan:
1. Apply patch
2. Run: git log --oneline | head -20
=> SUCCESS: Authors display correctly
3. Check in tig or other git tools
=> SUCCESS: No excessive column width issues
4. Verify mailmap functionality:
git shortlog -sn | grep -E 'Mathieu|Marjorie'
=> SUCCESS: Authors properly consolidated
5. Sign off :-D
Signed-off-by: Tomás 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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6c3153a481)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch fixes the display logic for the LOC classification field
(050).
The current issue is that the inner components (each subfield) gets
separated with the pipe symbol (|) instead of grouping the components
together and using the separator for the outer 050 occurences.
To test:
1. Open a record to edit it
2. Add 050 like this:
```
050 4 $aE337.5 $b.O54 2025
050 4 $aE415.7 $b.A44 2025
```
3. Save
=> FAIL On the staff interface it displays:
```
LOC classification: E337.5 | .O54 2025 E415.7 | .A44 2025
```
4. Apply this patch
5. Run:
$ ktd --shell
k$ restart_all
6. Reload the detail page
=> SUCCESS: Things display correctly!
7. Sign off :-D
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2d85c9f4a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The default sort order for Koha's patron search includes many columns, some of which are not indexed:
[% CASE 'name-address' %] {
"data":"me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
Depending on the number of patrons in the database, and the specific configuration of the server, this can end up generating a query that creates a temp table in the hundreds of gigabytes of data or more. Not only does this risk crashing a database server with insufficient disk space, it's also incredibly slow.
We've found a compound index prevents the issue and also makes the search much faster. InndoDB indexes have a fixed maximum length which is too small ( 3072 bytes ) to encompass the full data for all the fields we need to sort by.
The following works well as a comprise to keep the index length within the maximum:
CREATE INDEX idx_borrowers_sort_order ON borrowers (
surname(100), -- 400
preferred_name(80), -- 320
firstname(80), -- 320
middle_name(50), -- 200
othernames(50), -- 200
streetnumber(20), -- 80
address(100), -- 400
address2(75), -- 300
city(75), -- 300
state(40), -- 160
zipcode(20), -- 80
country(40) -- 160
);
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Perform a patron search
4) No change in behvior should be noted!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63c44cbd0e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef5ba9a42d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
The routine to create the message can return nothing if there is no content,
we should handle this case and not attempt to send.
To test:
1 - Test plan from last patch
2 - Apply this patch
3 - POST to patron API again
4 - Success!
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1fa513be9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Currently we assume BadParameter has been thrown with a parameter that is a valid patron field.
It may only include a message, or it may have come from outside the patron object, we should
handle all cases.
To test:
1 - Wrap "WELCOME" notice content in conditional:
[% IF borrower.categorycode != 'SELFREG' %]
...
[% END %]
2 - Enable preference AutoEmailNewUser
3 - Attempt to self register a patron via API with body:
{"surname":"PATRON","firstname":"PROBLEM","library_id":"CPL","category_id":"SELFREG","email":"eample@example.org"}
4 - Response error: "Given does not exist"
5 - Apply this patch, restart all
6 - Repeat 3
7 - Response error: "Exception 'Koha::Exceptions::BadParameter' thrown 'Parameter message_id cannot be empty if passed.'\n"
8 - It's uglier, but actually helpful
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae14a11937)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Writing these I found that transferbook was generating two queue rebuilds - fixed that
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 168f52f99b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch does two things:
1:
It prevents rebulding the real time holds queue during a checkin if a reserve was found.
The reserve will either:
a - be set to waiting if at correct location and no confirmation - this is fine because we will rebuild the queue when
filling the hold
b - trigger a popup whihc will rebuild the queue when confirming the transfer, or be ignored
2:
It adds a form to ignoring a hold so that we can rebuild the holds queue if we decided not to use the current item
to fill the found hold
To test:
0 - Enable RealTimeHoldsQueue
1 - Place several holds for different libraries on a title
2 - Checkout a copy to a patron at current library (ignore current holds)
3 - Clean up DB so we can see outcomes from next steps:
delete from branchtransfers; delete from background_jobs; update reserves SET found=NULL where found='T';
4 - Check in item, confirm hold
5 - Check background jobs, note two rebuilds of the holds queue
6 - Check item out to previous patron, repeat 3
7 - Check in item, ignore the hold
8 - Check background jobs, note only one rebuild
9 - Apply patch, restart all
10 - Checkout item, repeat 3
11 - Checkin item, confirm hold
12 - Check background jobs, onlt one rebuild of holds queue
13 - Checkout item, repeat 3
14 - Checkin item, ignore hold
15 - Check background jobs, only one rebuild of holds queue
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9d096df27)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
For some reasons t/db_dependent/ILSDI_Services.t fails if run after
t/db_dependent/api/v1/biblios.t
When we modify the MARC subfield structure from the tests we must flush
the cache.
Actually I don't understand why the tests are even passing.
I have not tracked down why it only fails when run after t/db_dependent/api/v1/biblios.t
Test plan:
0. Do not apply this patch
1. prove t/db_dependent/api/v1/biblios.t t/db_dependent/ILSDI_Services.t
It fails
# Failed test 'Title hidden in output as expected'
# at t/db_dependent/ILSDI_Services.t line 874.
# got: '1'
# expected: '0'
2. Apply this patch, repeat 1.
=> it's green!
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b6aab57065)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This test file was specifically testing the message_log return value
from CanBookBeIssued, which was removed as part of the bug 40866
patchset. The circulation message functionality has been reimplemented
elsewhere with proper test coverage, making this test file redundant.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2bd44c51f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
From
commit 46f7158f44
Bug 38714: acqui/invoice.tt
Debugging stuff left, sorry!
Test plan:
1. Go to Acquisition.
2. Create a vendor.
3. Click "Receive Shipment"
4. Enter an invoice number and save.
5. Go to Administration->Authorized Values->Add A Category
6. Name it ADJ_REASON
7. Put in 2 options
8. Go to invoices in Aqusition
9. Add an adjustment (enter an amount and select a reason, then save)
10. The reason is set to "no reason"
11. Go to reports
12. new sql report
select * from aqinvoice_adjustments
13. Run the report and see your reason is saved.
14. go back to the invoice and click save adjustments
15. Run the report and see your reason is saved.
Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93d680b645)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Cronjob cleanup_database.pl usage is wrong :
Usage: $0 [-h|--help] [--confirm] (...) [--bg-days DAYS [--bg-type TYPE] ]
Those args has been renamed jobs-days and jobs-type.
Also some args are missing.
There are too many args, I propose to remove them from there, one need to read the full help.
Test plan:
Run command line `misc/cronjobs/cleanup_database.pl -h`
You see first line:
Usage: misc/cronjobs/cleanup_database.pl
-h --help prints this help message, and exits, ignoring all
...
Signed-off-by: Anke Bruns <anke.bruns@gwdg.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3aefbaeaf6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
If the holds reminder cronjob would send a reminder on a holiday,when holidays are taken into account, it also will send it on the subsequent holidays and the first open day.
This bugfix adds a check to the cron when --holidays is set to skip sending the notices for that library if today is a holiday.
To Test:
Before applying:
1. Create a hold for a patron (I used patron 23529000035676 and 39999000000252)
2. Ensure your patron has an email address set and the hold reminder email selected.
3. Set the hold to waiting by checking it and confirming the hold.
4. In Tools->Calendar add a holiday to yesterday and a seperate holiday to today.
5. On the command line (the date should be set to 5 days ago for my commands to work and any dates adjusted accordingly)
koha-mysql kohadev
update reserves set waitingdate="2025-09-25"
exit
perl misc/cronjobs/holds/holds_reminder.pl -days 3 -t -v -holidays --date 2025-09-29
6. Observe that 1 notice would have sent to your patron
7. On the command line
perl misc/cronjobs/holds/holds_reminder.pl -days 3 -t -v -holidays
8. Observe that 1 notice would have sent to your patron
9. On the command line
perl misc/cronjobs/holds/holds_reminder.pl -days 3 -t -v -holidays --date 2025-10-01
10. Observe that 1 notice would have sent to your patron
11. Apply patches
12. Repeat the last command from step 5 and step 7
13. Observe that no notice should be sent for your patron
14. Repeat step 7
15. Observe that a notice should be sent for your patron.
16. Run
perl misc/cronjobs/holds/holds_reminder.pl -days 5 -t -v
17. Confirm the notice should be sent for your patron
18. Sign off
Signed-off-by: Katie Bliss <KEBliss@dmpl.org>
Bug 35700: (QA follow-up) fix POD and $today
This patch replaces the inncorrectly removed POD note and replaces $today with the more correct $date_to_run for checking if we should be skipping sending the message on the day.
Amended-by: Jonathan Druart
Squashed and adjusted commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b895eb9b7d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Test plan:
Read POD.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0991861e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
When a basket is generated via an EDI QUOTE message, the QUOTE message
includes a library's EAN code (buyer_ean). This patch makes the 'Create
EDIFACT order' button automatically use the EAN from the original QUOTE
message instead of requiring manual EAN selection.
This patch also fixes a bug in process_quote where all baskets in
multi-message QUOTE transports incorrectly used the first message's
buyer_ean, even when subsequent messages had different EANs.
Changes made:
1. Fixed Koha/EDI.pm process_quote auto-order creation to use the correct
buyer_ean for each message/basket pair in multi-message transports
2. Enhanced acqui/basket.pl to extract and provide the quote_ean from
QUOTE messages, handling both single and multi-message scenarios
3. Updated basket.tt template to automatically select the EAN from the
original QUOTE message when available and matching
Test plan:
1. Create a vendor with EDI account and multiple EANs configured
2. Process a QUOTE message that creates a basket
3. Go to the basket page and click "Create EDIFACT order"
4. Verify it automatically uses the EAN from the QUOTE message
(shows tooltip "Using EAN from original QUOTE message")
5. Test with multi-message QUOTE files to ensure each basket uses
the correct EAN from its corresponding message
6. Verify fallback behavior when no QUOTE EAN matches available EANs
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 47546f0849)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds unit tests to verify that when processing EDI QUOTE transports
containing multiple messages with different buyer EANs, each basket gets the
correct EAN for its corresponding message.
Test plan:
1. Run: prove t/db_dependent/Koha/EDI.t
2. Verify the new 'multiple_message_ean_handling' subtest passes
3. Verify that all existing EDI tests continue to pass
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd01562f5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This state is no longer ever set anywhere
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 213de9af0b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This follow-up adds missing override state translations that were
discovered during testing. The patchset logs various override states
but some were not covered in the log viewer display template.
Missing states added:
- USERBLOCKEDNOENDDATE: Patron had an indefinite restriction
- CURRENTISSUE: Item is currently checked out to this patron
- UNSEEN: Unseen renewal
- SEEN: Seen renewal
These states are now properly displayed in the action logs viewer
when reviewing circulation override logging.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4c24c03769)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch adds unit tests to verify the hold override logging
functionality implemented in the previous patches. The tests cover the
logging of hold overrides in `C4/Reserves.pm` and the `Koha/REST/V1/Holds.pm`
API endpoint.
To test:
1. Run the following tests and confirm they pass:
- prove -lrv t/db_dependent/Circulation.t
- prove -lrv t/db_dependent/Reserves.t
- prove -lrv t/db_dependent/api/v1/holds.t
2. All tests should pass.
Changes:
t/db_dependent/Circulation.t:
- Added tests for hold override scenarios in circulation.
t/db_dependent/Reserves.t:
- Added tests to verify that hold overrides are correctly logged when
a hold is placed.
t/db_dependent/api/v1/holds.t:
- Added tests to ensure that the holds API correctly logs overrides
when a hold is created with the `x-koha-override` header.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 19dc33c649)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This patch implements proper override logging for holds following the
Alternative implementation pattern used for checkouts and renewals.
Instead of just removing the orphaned logging code from the original
Bug 9762 implementation, this patch properly implements override logging
by updating AddReserve to accept and log override information, similar
to how AddIssue handles confirmations and forced overrides.
Changes:
C4/Reserves.pm:
- Added JSON qw(to_json) import
- Updated AddReserve to accept confirmations and forced parameters
- Enhanced the existing logaction call to include override information
in JSON format when overrides are present
- Log format matches the Alternative implementation pattern:
* hold ID
* branchcode
* biblionumber
* itemnumber
* confirmations array
* forced array
Koha/REST/V1/Holds.pm:
- Added confirmations array building in the add() method
- Pass 'HOLD_POLICY_OVERRIDE' confirmation when override_all is true
- Pass confirmations parameter to AddReserve call
reserve/request.pl:
- Removed orphaned original implementation logging code
- Removed unused variables and imports (message, @message, user, etc.)
- Removed C4::Log import
koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc:
- Added 'HOLD_POLICY_OVERRIDE' case to translate_log_override block
- Displays as "Hold policy override" in log viewer
koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt:
- Added JSON display handling for HOLDS module (similar to CIRCULATION)
- Displays hold ID, biblionumber, and optional itemnumber with links
- Shows forced and confirmation overrides using translate_log_override
This ensures hold overrides are logged consistently with the Alternative
implementation pattern, providing proper audit trails for policy overrides
that are properly displayed in the log viewer.
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1884f68c5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>