Lucas Gass [Thu, 7 Sep 2023 21:19:26 +0000 (21:19 +0000)]
Bug 34719: Add middle_name to patron autocomplete
To test:
1. Apply patch and clear browser cache.
2. Find some patrons with middle_name populated or add new patrons with a middle_name.
3. Make sure PatronAutoComplete is on
4. Try searching for a part of one of the patron's names who has a middle_name.
5. It should appear in the autocomplete dropdown
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a6c77f664c6b21b3d7c9ee4590a8b8b21a18a9b2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 92cb17716931ff68e963acf04361be29dff3b80e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Thu, 14 Sep 2023 13:21:44 +0000 (13:21 +0000)]
Bug 33406: (QA follow-up) Adjust tests and tidy
Rather than test that nothing is returned, we want to test that the terms are filtered as expected. This also avoids the possibility of the tests failing in a db where there is a record for Donald Duck
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3d7b60dc90142b171b6aaa268bdf2abf917b3739) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4cc41203223e5e43b1289e819682f2b1b38efde6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 33406: Filter out some known isolated trouble makers
Test plan:
1) Launch k-t-d with ES:
-- ktd --es7 pull
-- ktd --es7 up
2) Visit /cgi-bin/koha/authorities/authorities-home.pl and search for 'tim'
3) Edit that, add a dash '-' to 100$a, like 'Bunce, Tim - name'"
4) Do a authority search for 'tim - name', notice it errors out
5) Apply patch
6) Perform the same search, notice it doesn't error and returns the correct record
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27c6171222bf3abb5ed91e399bb2663579e8e367) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 14487cd5e06cc8e5da133194f8d31e60b03fab9b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Thu, 11 May 2023 10:38:53 +0000 (12:38 +0200)]
Bug 33406: Handle ES search errors for authorities
We are dealing ok with ES exceptions for biblio records search,
catching them and raising them to the end user. But we don't for
authorities, where we explode with an ugly 500.
Test plan:
Search for "(term_1*) AND (-) AND (term_2*)" in the authority search and
notice that you don't get a 500 but an error instead saying that you
should try again
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09b29d06da5fac2bd1315d849f1b9bf924576700) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b4187cf2abb7007d528585f59b723c10dc3b4480) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Mon, 4 Sep 2023 12:28:29 +0000 (12:28 +0000)]
Bug 33406: Add tests
Test plan:
1) Apply this tests patch only
2) Run: prove t/Koha/SearchEngine/ElasticSearch/Search.t
3) Notice it fails with nasty ES "Failed to parse query" error
4) Apply the other patches
5) Repeat 2) - notice theres no nasty error
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fbd62562e0d67d22738435e44adf9f03900a147e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f36647c32a7224146ff2a8420b4c3243562f094c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5797079fc5e5b1e9a4d883f0ceb5a344b8cdbd36) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b8b21c6d11cc2065a475b36bf1214fd03d7ebe05) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Fri, 8 Sep 2023 11:04:56 +0000 (11:04 +0000)]
Bug 34743: Fix POD description
Currently --expiration-from-today has the same definition as --update-expiration. The description has now been updated to reflect the fact that it will set the date from today, and not the patron's enrollment date
Test plan:
Look at the patch file and confirm that the POD now mentions today's date rather than the patron's enrollment date
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 91dd8dd16f11f721d109f240eb9928b7383f9b15) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 636c601995db0e8b86c75a304b9e27dfb00a5245) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Emily Lamancusa [Thu, 31 Aug 2023 14:52:52 +0000 (10:52 -0400)]
Bug 34656: (QA follow-up) perltidy
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4988bcdb93008b44e2ce0517c0441f08c61958b2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 66726cca42ec17097862b12610bf0a672b16bce6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 30 Aug 2023 13:46:52 +0000 (13:46 +0000)]
Bug 34656: Do not update real Time Holds Queue when moving from cart to shelf
To test:
1 - Enable RealTimeHoldsQueue system preference
2 - Set UpdateItemLocationOnCheckin to _ALL_: CART
3 - Check in an item
4 - Check the background jobs - the RTHQ is updated
5 - perl -e 'use C4::Items; C4::Items::CartToShelf(##);' -- substitute the itemnumber from above
6 - Check the background jobs - no new update to RTHQ
7 - Confirm item was set back to correct permanent_location
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 84521918d93878ffa314decc4eb3b67afe46dca3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1779dddfe8ec84d4f654b4a65190fb8ede7e4cbe) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Tue, 12 Sep 2023 15:24:19 +0000 (16:24 +0100)]
Bug 34767: Pass fee_ack into ::Transaction::Renew(All)
This patch copies the $fee_ack field into the generated
::Transaction::Renew|All objects such that the fee acknowldegement flag
is respected for renewals.
Test plan
To test:
1) Add a rental charge to an itemtype
2) Checkout an item of that itemtype to a user
3) Attempt a renewal of that item via SIP2 and note that it fails
sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529000035676 --item 39999000007756 -m renew
4) Pass the fee_acknowledgement bit in renewal and note the renewal
still fails.
sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m renew
5) Apply patch and note the above now succeeds
sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m renew
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a2dcf0733733a92ddbf46fb863434a46060e279) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 11c73ed5b83402495ece7ffe5601f291e5c4247b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 12 Sep 2023 15:28:34 +0000 (15:28 +0000)]
Bug 34768: Remove checkbox column from relatives fines on OPAC
When a patron has a guarantee and can see their fines on the opac and
an opac payment plugin is enabled there is an error on the 'Charges'
tab.
The table uses a 'COLSPAN' variable which is set to 5 or 6 depending on
if OPAC payments are enabled. The guarantees table has one less column
than the patron's however, so it is going out of range and causing a JS
error. Additionally, we are adding a column to the child's table which
is not used as their fines cannot be selected for payment at this time.
This patch removes the checkbox column and sets the colspan directly to
4
I also fix an issue where the table is not being set as we need to
reference the patron object in the guarantor info to obtain the id.
To test:
1 - Set system preference: AllowStaffToSetFinesVisibilityForGuarantor to
allow
2 - Find a patron
3 - Add some fines to their account
4 - Install and enable an opac payment plugin
(https://github.com/bywatersolutions/koha-plugin-pay-via-govolution
for example)
5 - Sign in to OPAC as borrower
6 - Go to 'Charges' tab
7 - Select a fee
8 - Confirm 'Make payment' button enabled and 'amount to pay' is
updated
9 - Add a guarantee to patron in staff interface
10 - Set 'Show charges to guarantors' to 'Yes'
11 - Add and pay a fine for the child
12 - View guarantor account on the OPAC
13 - Confirm you now see child's charges
14 - Confirm selecting your own fees does not enable the button or
update amount to pay
15 - Note JS error in console
16 - Apply patch
17 - Reload patrons page
18 - Confirm the table loads correctly (no JS error)
19 - Confirm selecting a fine updates the total and enables button
20 - Disable the payment plugin
21 - Confirm the display is still correct, no errors
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3e40408ea6792186e87e95a7de1dff515981432) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c61c182fda90cf2349be55a1c090a95daa42aa42) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Tue, 12 Sep 2023 13:18:37 +0000 (14:18 +0100)]
Bug 34764: Set fee_acknowledged to expect a string
For consistency with other options I opted to have the fee acknowledged
parameter to expect a string and as it's an optional parameter I've
dropped the default value of 'N' too.
Test plan
1) Prior to this patch
1a) Attempt a checkout without passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will be '|BON', the default
1b) Attempt a checkout passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will still be '|BON', failure
1c) Attempt a checkout passing a string for fee_acknoewledeged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will still be '|BON', failure
2) Apply the patch
2a) Attempt a checkout without passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --patron 23529000035676 --item 39999000007756 -m checkout`
The optional `|BO` element should not be present
2b) Attempt a checkout passing -fa/--fee_acknowledged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged N --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will now be '|BON', success
2c) Attempt a checkout passing a string for fee_acknoewledeged flag
`./misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL --fee-acknowledged Y --patron 23529000035676 --item 39999000007756 -m checkout`
The final field of the SIP request will now be '|BOY', success
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0e9603bb49436e4bb74e893f74a63ef31065f798) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7c07d7b6a6a6ccdd73bab0f5199fdaf408c085e6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Mon, 14 Aug 2023 21:11:52 +0000 (21:11 +0000)]
Bug 34532: Silence warns in Patroncard.pm
To test:
1. Go to patron card creator and make a patron card batch, card layout, and card template.
2. In the card layout leave some values blank for Lower left X coordinate and Lower left Y coordinate.
3. Now go create a card batch while tailing the plack-intranet-error log/
4. Notice in the logs:
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 109.
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 248.
[2023/08/14 20:50:54] [WARN] Argument "" isn't numeric in multiplication (*) at /kohadevbox/koha/C4/Patroncards/Patroncard.pm line 249.
5. Apply patch, restart_all
6. Try again and notice the WARNS should be gone from the logs now.
7. Make sure you can still create patron cards and the PDF's the generate look right.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1164402b49bfb775a7aafab55b629ae443bddf1c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fb988b42c4a61676609aded9e85f9b42e1e66cac) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Thu, 3 Aug 2023 08:01:32 +0000 (10:01 +0200)]
Bug 34369: Fix 'Did you mean'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Tue, 1 Aug 2023 07:12:10 +0000 (09:12 +0200)]
Bug 34369: Pass csrf token from syspref API client (for Vue app)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Tue, 1 Aug 2023 06:56:23 +0000 (06:56 +0000)]
Bug 34369: Require CSRF token for updating system preferences
This patch adds the requirements that updating a system preference
requires a CSRF token. (Also, adding and deleting local system preferences.)
0. Apply patch
1. koha-plack --reload kohadev
2. Add local system preference
3. Update local system preference
4. Delete local system preference
5. Update normal system preference
6. Note no errors
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 13 Sep 2023 01:33:43 +0000 (01:33 +0000)]
Bug 34761: Prevent XSS for searches and saved search filters
</script> tags are interpreted in JSON strings as HTML, which can
lead to XSS attacks.
This patch puts HTML escaped JSON in the value of a hidden HTML element.
The Javascript then takes the value as a string, parses it as JSON,
and is able to use it to save search filters without triggering a
XSS attack.
This patch also adds DataTable's built-in HTML escaping for the query
and limits on the admin UI for the search filters.
Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=SavedSearchFilters
2. Enable the system preference
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
4. Click "Save search as filter"
5. Checkbox "Show in staff interface?"
6. Type "E-TEST" into box and click 'Save'
7. Go to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
8. Click "E-TEST" under "Custom search filters"
9. Note that you see search results
10. Go to
http://localhost:8081/cgi-bin/koha/admin/search_filters.pl
11. Note that for "E-TEST" you see a "Query" like
{"operators":[],"operands":["e"],"indexes":[]}
12. Note that for "E-TEST" you see a "Limits" like
{"limits":[]}
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e32b761986f5de28df4f1125b5d16c6c2f24306) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Mon, 24 Jul 2023 04:31:15 +0000 (04:31 +0000)]
Bug 34349: Validate/escape inputs for task scheduler
This change validates and escapes inputs for task scheduler.
Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. Go to http://localhost:8081/cgi-bin/koha/tools/scheduler.pl
3. Input a time a minute in the future and leave the date blank
4. Choose an existing report and output format
5. Type a malicious string which is also a valid email address
into the Email field
6. Click "Save"
7. Note that the job is added but the Email is wrapped in single
quotes
8. Try using a non-malicious email address with a single quote.
9. Note that the single quote is escaped, so that it will still
be used by runreport.pl
JD amended patch: tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Removed pars for $email =~ regex, removed old commented lines. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dcd698a4b4ed7f3a714ef35fe83c007fce9d52ae) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Thu, 24 Aug 2023 18:19:37 +0000 (18:19 +0000)]
Bug 34513: (QA follow-up) Tidy
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 332b95b2507184e20cd70ddfb16c6f5a260d6dc0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 16 Aug 2023 02:51:43 +0000 (02:51 +0000)]
Bug 34513: Add checkauth unit test for resetting auth state when changing users
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit abbbc5924de287a73c7d91c0f8ab70f8d7461508) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 16 Aug 2023 02:21:40 +0000 (02:21 +0000)]
Bug 34513: Add end-to-end test for authorization check after first failed authorization
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb581fe78be9dacb9215366f3a54ab9b640f783f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Fri, 11 Aug 2023 03:03:01 +0000 (03:03 +0000)]
Bug 34513: Set auth state correctly when changing auth sessions
This patch sets the $auth_state to failed when changing auth sessions,
so that the new login attempt gets processed correctly (instead
of skipping the authorization step).
Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=baseurl
3. Log in as an OPAC user with 0 permissions
4. Note the auth screen "Error: You do not have permission to access this page"
5. Click "Log in"
6. Note that you're still shown a login screen (and that you've been logged out of
your previous authenticated session)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16da12cbbc200d9ef07a87ee7f9bdf8e61ae06f3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Fri, 25 Aug 2023 15:51:12 +0000 (15:51 +0000)]
Bug 34552: Don't exclude payments with no status
Bug 29664 removed payments with a void status, however, the query also
removed any payments with no status set
Test Plan:
1 - Set up your cash registers and enable POS and add a debit type that is able to be sold
2 - Take 2 payments via POS
3 - Void one payment
4 - Go to Reports->Statistics wizards->Cash register
4) Verify neither shows for the "All payments to the library" and
"Payment" transaction type filters
5) Apply this patch
6) Restart all the things!
7) Verify the non-voided fee shows for the "All payments to the library" and
"Payment" transaction type filters and the voided fee does not
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ee6bea6bfee301146dc2f631480b227d237e43a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7d977be3e9431ee7f7e7c58a2889189ef648966b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 26 Sep 2023 15:32:03 +0000 (15:32 +0000)]
Bug 34219: (rmaint fix) Remove embed from vendors getAll request
An embed that is not supported in 22.11 was added as part of a refactoring patch. This commit removes that embed to allow the ERM module to function properly
This patch removes a useless Template Toolkit tag.
To test:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=LocalCoverImages
2. Change to "Show"
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4. Upload an image
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
6. Note that the local cover image appears even without the TT tag
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9da5895d79163a518825fbb102526aef119a93fe) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2af5c36bbc71a8521b38002f7840f7492c902618) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Tue, 31 Jan 2023 08:20:15 +0000 (09:20 +0100)]
Bug 32765: Retry transfer after cancelling hold
When trying to manually transfer an item that is on hold, we have the
choice to cancel the hold and try the transfer again. When choosing
this option, the hold is correctly cancelled but the transfer is not
tried again.
This patch fixes that
Test plan:
1. Place a hold on a specific item
2. Try to transfer it manually (Circulation » Transfer)
3. Choose the option to "Cancel hold and then attempt transfer"
4. See that the hold was cancelled, but no transfer was made
5. Apply the patch
6. Repeat step 1-3
7. See that the hold was cancelled, and the transfer was made
Signed-off-by: Nicolas Giraud <nicolas.giraud@inlibro.com> Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68b97cc7e4c60e6b84b9a7554e29c1c32453f685) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4352e97a282ce89708af61970e89ca80daf87bc2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Mon, 11 Sep 2023 13:50:43 +0000 (14:50 +0100)]
Bug 34223: (follow-up) Ensure consistent ordering of statuses
This patch adds an order_by clause to ensure consistent ordering of the
returned status and status_alias statuses from the database between
MySQL 8 and other DB engines.
This fixes the failing tests introducd in bug 34223.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7f9ff906d9c2800fc5bf3d38db23a77e1f3745ab) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9b1ff4d540e38c984d785ae10b56639163fe9633) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Fri, 18 Aug 2023 07:40:16 +0000 (07:40 +0000)]
Bug 34572: Simplify template logic around check-in input form
This patch makes a minor simplifying change to the check-in template
around how to style the barcode input field in dropbox or fine-exempt
mode.
To test, apply the patch and go to Circulation.
- If necessary, check some items out to patrons so that you have items
to check in.
- Go to the check-in page and click the icon inside the barcode field to
expand the panel of options.
- Check the "book drop mode" checkbox. The barcode field should now be
highlighted yellow.
- Check in an item. When the page redisplays, the barcode field should
have the same highlighted style.
- If necessary, enable the finesMode system preference.
- On the check-in page, in the panel of options, check the "Forgive
overdue fines" checkbox. Test checking in again, confirming the same
style consistency in the barcode field.
Signed-off-by: Inkeri <inkeri.hakulinen@helsinki.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edb9787fc85752c636e0d982871c4b715a2e57d8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit edf7c6766128067ec8e28109f575c932e7707d48) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 6 Sep 2023 06:28:45 +0000 (06:28 +0000)]
Bug 34723: Show thumbnails on opac-imageviewer.pl when imagenumber not provided
This patch fixes a method call in the opac-imageviewer.pl so that thumbnails
correctly appear.
Test plan:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=localcover
2. Change both *LocalCoverImages sysprefs to "Show"
3. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=AllowMultipleCovers
4. Change "AllowMultipleCovers" to "Allow"
5. Go to
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
6. Click "Images (0)" tab
7. Download or make two JPEG images
8. Upload the images
9. Go to http://localhost:8080/cgi-bin/koha/opac-imageviewer.pl?biblionumber=29
10. See one large image in the centre and two smaller thumbnails on the right side
PA amended patch: Added missing test plan step
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 00edf9a541c6d512682f19db7120c808d60a4bf2) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit eba9d58734553cd3e4051475407d56e2cc9164e2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated
This patch reunites the words for the sentence "Displaying
[all|approved|pending|rejected] terms" in order to facilitate
translating in languages that have a different syntax.
To test:
1. Install a new language
./misc/translator/translate install xx-XX
2. Check the xx-XX-staff-prog.po file for the sentence
--> All the words are individual strings
3. Apply patch
4. Update the po files
./misc/translator/translate update xx-XX
5. Check the xx-XX-staff-prog.po file again
--> The sentence is reunited for each status (Displaying all terms,
Displaying approved terms, etc.)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 272a080cb35fe83e9f11ab8401effb7223f5d94c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 48282124fac08d26382c77b491bdf75828360b33) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34081: Contextualization of "Approved" (one term) vs "Approved" (more than one term), and other tag statuses
To test:
1. Apply patch
2. Install language
./misc/translator/translate install xx-XX
3. Update po files
./misc/translator/translate update xx-XX
4. View the xx-XX-messages.po file
--> Strings for tag statuses for one tag should be separated from
strings for statuses for multiple tags, with context Tags
(single) or Tags (multiple)
5. Change the strings so you know which is which
For example, in French, the approved status for a single tag would
be "Approuvé" and for multiple tags would be "Approuvés" (with the
plural s at the end)
6. Apply translations
./misc/translator/translate install xx-XX
7. Add tags through the OPAC
7.1. In another tab, go to the OPAC
7.2. Log in
7.3. Search for a record
7.4. From the detailed record, click Add tags
7.5. Enter a tag and click Add
8. In the staff interface, go to Tools > Tags
9. Approve/Reject the tag
--> The status in the table and on the button should be the singular
status, the status in the summary on the right should be plural
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d23be933f958bf4b3343c41802530088afc0b1d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ff89574592f7a387cc1c2cc5bdb168cd2b1f9361) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Fri, 18 Aug 2023 14:45:14 +0000 (14:45 +0000)]
Bug 34257: Limit item types by branch in batchMod.pl
To test:
1. Go to Item types administration.
2. Set some items types to be limited to a branch you are not logged in as.
3. Find some items from the branch you are logged in at and go to Batch item modification.
4. Add the barcodes and attempt to edit the item type to the one you limited in step 2.
5. You can change these item types to ones that your branch should not be able to.
6. Apply patch
7. Try steps 4 -5 again but this time you should not see item types in the dropdown that are limited to other branches.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 13d5ff94248df32623853ed2d87258f81edc0a8f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b7e93600614770f16cc26da7c6ee50dd8ebc5e0f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Fri, 30 Jun 2023 02:50:17 +0000 (02:50 +0000)]
Bug 34163: Handle both anonymous userenv when generating CSRF tokens
An anonymous session might have a userenv which is undef or which is
a hashref of undef/empty values.
This patch generates the "anonymous" prefix for undef/empty 'id'
values, which prevents CSRF errors when logging in via OAuth2/OIDC
following a Koha logout.
Test plan:
Before applying patch:
1. Go to https://wiki.koha-community.org/wiki/Testing_SSO
2. Set up OpenID Connect realm, user, client, and Koha
integration to Keycloak for koha-testing-docker as noted in the wiki
3. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl?logout.x=1
4. Click on OIDC "Log in with XXXX" button and log into IDP
5. Note that you're not logged in and you instead see an error message like:
"There was an error authenticating to external identity provider wrong_csrf_token"
6. Apply patch
7. Go to "Sessions" section of the test realm in Keycloak
e.g. http://sso:8082/auth/admin/master/console/#/test/sessions
8. Click "Action" on the far right side of the screen
9. Choose "Sign out all active sessions"
After applying patch:
10. koha-plack --restart kohadev
11. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl?logout.x=1
12. Click on OIDC "Log in with XXXX" button and log into IDP
13. Note that you're logged in
Pedro Amorim [Mon, 31 Jul 2023 14:57:06 +0000 (14:57 +0000)]
Bug 34448: Update the way we handle response in http-client.js
Test plan:
Before patch:
- Visit a non-existent ID i.e. /cgi-bin/koha/erm/agreements/999
- Visit a char ID i.e. /cgi-bin/koha/erm/agreements/abc
Apply patch:
Repeat above steps.
Run cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2a0fcd9ddacf7bce25912778746f9994c06cdabe) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Mon, 31 Jul 2023 15:04:09 +0000 (15:04 +0000)]
Bug 34448: Update cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 767a004f03863bd93febd2260cb236d505f21ef5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Thu, 20 Jul 2023 11:24:23 +0000 (11:24 +0000)]
Bug 34310: Input prompt in datatables column search boxes untranslatable
This patch corrects the internationalization function wrapped around the
"% search" string in datatables.js. It should be the double-underscore
function instead of the single-underscore.
To test, apply the patch and test that the placeholder string is
translatable. In this example I'm testing fr-FR:
- Update a translation:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from
JavaScript e.g. misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from prog/js/datatables.js for
translation, e.g.:
In the staff interface, test a page that has column header filters, e.g.
patron search. Confirm that the table of search results shows the
translated string in the column header placeholders.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c23f36b81218032ed2aa3f2f476fd880e2d1b704) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d1d9a3353502101e6d86411eafe0988bdf2e9185) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 5 Sep 2023 14:38:38 +0000 (14:38 +0000)]
Bug 34666: Tidy
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fcf0ba17b55be93c4b63b1683ca2960e5edda0cd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 63434d59e8e4db3e918371b2ff814925bfca6ad4) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 30 Aug 2023 18:56:59 +0000 (18:56 +0000)]
Bug 34666: Combine queries in _Findgroupreserve
The queries here are the same except for 2 differences:
1 - They check if the hold was on a particular item
2 - The latter confirms that the reserve item group matches the item's item group
For 1, it doesn't matter - only 1 item can be mapped ot a reserve, itemnumber is the primary key
for hold_fill_targets - so we are either matching it in the first query or the second, either way we get the same
reserve - the returns are the same so we don't care which query it came from
For 2, this has already been checked when the queue was built. We don't need to verify the match because
it wouldn't be in the targets if they didn't match
To test:
1 - Apply second unit test patch
2 - prove t/db_dependent/Reserves.t
3 - It should pass
4 - Apply this patch
5 - prove t/db_dependent/Reserves.t
6 - It continues to pass
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 72bfb416d3725bd11dc4595ac429d4c510d6d3ee) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7aa6464c239873cb52dee11fd079280eea944b62) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 30 Aug 2023 18:54:15 +0000 (18:54 +0000)]
Bug 34666: Add a second unit test for item level
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f7ccdf6c3d4916ac19b7ace58068ff862a5ee24) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 91d9a154850a7a2fa9a1d233c555262a01ecef18) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 30 Aug 2023 18:38:56 +0000 (18:38 +0000)]
Bug 34666: Allow item_group to be null and still match
The current logic requires that the grop ids match, but this eliminates null matches
from the group.
The fallout essentially is that the queue won't be checked to fill holds in cases of title level matches
where holds don't have an item group id. The queue checks the transport cost matrix while the check reserves
check does not, so this may have an impact on holds costs and delivery times
To test:
0 - Apply unit test patch
1 - prove -v t/db_dependent/Reserves.t
2 - It fails
3 - Apply this patch
4 - prove -v t/db_dependent/Reserves.t
5 - It passes!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fe3872f62885b4b0ee483e446c0b2b85e74970f7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f4641ea97228966cc5b7a54e1bfda2778b4d1a3b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 30 Aug 2023 18:29:27 +0000 (18:29 +0000)]
Bug 34666: Unit test
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 99d7e55be67332fea1ced61ddf8105b4261923d8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0cad18658a2b04513349b7c4c9740b77261f02a5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Fri, 16 Jun 2023 14:29:42 +0000 (14:29 +0000)]
Bug 34038: Fix incorrect use of __() in .tt and .inc files
This patch corrects instances of the double-underscore function being
used in .tt and .inc files where the single-underscore function should
be used instead.
To test, apply the patch and update a translation, e.g. fr-FR:
> cd misc/translator
> perl translate update fr-FR
- Open the corresponding .po file for JavaScript strings, in this case
misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
should find these lines:
- koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc: "No
title."
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt:
"Check in and add to bundle"
"Ignore holds and add to bundle"
- koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt:
"Please enter only a barcode, or only a biblionumber."
- koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt:
"Please enter only barcodes, or only biblionumbers."
- koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt:
"Please specify a content for 'Default'"
- Check fr-FR-opac-bootstrap.po for these lines:
- koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc:
"Please enter a valid date (should match %s)."
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt:
"No item was selected"
- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt,
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt,
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt:
"No item was selected"
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1d9f4698eb2f959964d83d22b2079f07286a7c4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f558474af319b4d95898f3046ac646c9fdeaaae3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Thu, 27 Jul 2023 14:20:11 +0000 (14:20 +0000)]
Bug 34223: (follow-up) Mock backend in tests
Add a new request with a backend specific status
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b00806774d3353086fc7c7e3def22f4de570c795) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6151e6ee8cfb309412727c5bf3383eb2d9464fbe) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Thu, 27 Jul 2023 12:20:13 +0000 (13:20 +0100)]
Bug 34223: Add unit test for existing_statuses
This patch adds a unit test for the 'existing_statuses' method.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cda13a73284ce049535f782dad794c6593e55ba9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4bec5acad4ab6bcd560e10b764c4ce4112d55946) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
By reducing the original call to all distinct 'status' we also removed
the status_alias combinations. This patch adds an additional distinct
query to fetch all 'status_alias' and add them to the returned data
structure.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b67a4f8549d03a43ca771acc205779a78708240d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cec8ef7ae9e36893431cf5ef527ce012551f4bc6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Mon, 10 Jul 2023 17:03:34 +0000 (17:03 +0000)]
Bug 34223: Work around ONLY_FULL_GROUP_BY in Illbackend
This patch re-works the query in the existing_statuses method to remove
the FIXME and improve performance. We pass an SQL literal into the
query to make it explicit which illrequest_id we're looking for (which
dampens the SQL warning) even though we really don't mind which request
is returned here.
Test plan:
The following command will (hopefully) reset your ILL data and create 10k fake ILL requests (run this in DEV KTD only).
1) On an empty k-t-d, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-data.sh)
2) Pet a cat
3) Visit /cgi-bin/koha/ill/ill-requests.pl and select a backend on the left side filters
4) Notice how the status filter takes a while (3-5 secs) to load
5) Apply patch and koha-plack --restart kohadev
6) Repeat 3, notice how the status filter now loads fast
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 87d1b1fdb61ea27effbac654d55923bf6abbe1ab) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c145f874eb5695433dd3297400f9bc784932892a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Fri, 1 Sep 2023 07:10:52 +0000 (09:10 +0200)]
Bug 34685: Make updatedatabase.pl propagate the error
updatedatabase.pl already return 0 even if an error occurred during the upgrade.
Test plan:
Adjust a db rev to make it fail and modify the value of the syspref 'version' in DB to
make the db rev run.
Run updatedabase.pl and `echo $?`
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 531fb2c9fd2e8b38ac1c6ef21be047bbb0358d7a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 706e1ed0925acc1a50816065594104deaba37b44) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Thu, 31 Aug 2023 15:05:57 +0000 (17:05 +0200)]
Bug 34684: Prevent 220600007.pl to fail if run twice
The error is
ERROR 1292 (22007): Truncated incorrect DECIMAL value: 'no'
Happens on MariaDB 10.5.22, not MySQL 8
Test plan:
update systempreferences set value="0" where variable="DisplayClearScreenButton";
play installer/data/mysql/db_revs/220600007.pl
select value from systempreferences where variable="DisplayClearScreenButton";
=> "no"
update systempreferences set value="1" where variable="DisplayClearScreenButton";
play installer/data/mysql/db_revs/220600007.pl
select value from systempreferences where variable="DisplayClearScreenButton";
=> "issueslip"
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 027e1e18620e3c790e85ea49b3870f9ee7785871) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f73ed6655d41c9a518ead7a9c42b4e882d33b186) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3c6971d50cefa376df3a760519d1d9a8da1f5d71) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9212e7580e80c6624d6fb76e4e999994d186843c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Per Larsson [Wed, 18 Sep 2019 08:50:37 +0000 (10:50 +0200)]
Bug 23548: Set AQ to empty when item not exist
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2256a8532335f763346f13698cb840dd97ecafa3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43022c87985f0d90f75e0a2d180e1011fc14b030) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 23548: Unit test - Set AQ to empty when item not exist
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1cd82e29b5ceec08cf77f8c24497b1def1ee3c7e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e362982884e2f9daa6e805e5629d0de321b5544e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Tue, 29 Aug 2023 15:45:39 +0000 (15:45 +0000)]
Bug 34641: Fix Novelist display when NovelistSelectView is set to below
To test:
1. Have Novelist credentials: NovelistSelectProfile, NovelistSelectPassword.
2. Enable NovelistSelectEnabled
3. Set NovelistSelectView to 'below holdings table'.
4. Find a record on the OPAC that would have Novelist content. It does
not display.
5. Set NovelistSelectView to any except 'below holdings table'. Notice it displays the content.
6. APPLY PATCH
7. Try steps 1 -5 again, this time when NovelistSelectView is set to
'below' the content should properly display.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0663e692cf022611a0be2c3e5ef5beb7eac10e5e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 708cc3bccf84eaab2754b32974c80b326754d0f0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Mon, 29 May 2023 15:41:44 +0000 (15:41 +0000)]
Bug 22135: Display 'shelved out of order' error in inventory CSV export
When using the inventory tool with an uploaded barcode file
and checking the "Compare barcodes list to results",
"Check barcodes list for items shelved out of order" and
"Export to CSV file" checkboxes, the resulting CSV file showed
a blank in the "problem" column for items with out of order
callnumbers. With this patch, you'll see "Shelved out of order".
To test:
* Create 3 items with callnumbers and barcodes a, b, and c
* Go to Cataloguing > Inventory
* Enter a c b (each on its own line) into the barcode field
* Check "Compare barcodes list to results"
* Check "Check barcodes list for items shelved out of order"
* Check "Export to CSV file" (at the bottom)
* Verify the file has empty lines in the problem column
* Apply patch
* Repeat test, the empty lines should now read: "Shelved out of order"
Note: Also fixes "problem" to "Problem" to make capitalization
consistent. All those strings are currently not translatable,
this will be filed separately.
Co-authored-by: Mark Alexander <marka@pobox.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d35c3596da488b61f49fd605872de02f0f31fe4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b185fd3fe3801784186d9a35125f49d92960aa18) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Fri, 25 Aug 2023 15:49:09 +0000 (15:49 +0000)]
Bug 34620: Do not throw expection if payment type is writeoff
To test:
1. Turn on RequirePaymentType
2. Create a manual invoice and then attempt to write it off.
3. 500 error
4. Turn of RequirePaymentType, no error.
5. Apply patch, restart_all
6. Try step 2 again, you should not get an error
7. prove t/db_dependent/Koha/Account.t
8. Make sure tests pass
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d77aa887e4b9df61493837b9d88a80537c525471) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5cc97ab746463f9a48b54a6b5f9a81a83dc80d25) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Mon, 28 Aug 2023 12:26:51 +0000 (12:26 +0000)]
Bug 34625: Fix search engine configuration tables header problem
This patch corrects the JavaScript which allows DataTables to be created
and destroyed based on which tab is clicked on the search engine
configuration page. When you click from one tab to the other, the
original tab's DataTable should be destroyed and the new tab's DataTable
initialized.
To test, apply the patch and go to Administration -> Search engine
configuration (Elasticsearch)
- The page should load with the "Search fields" tab enabled and the
DataTable initialized: Sorting and filtering should work. If you
scroll down the page the floating table header should be correct.
- Switch to the "Bibliographic records" tab. This table should have
filtering enabled, and the floating table header should work when you
scroll down the page.
- The same should be true for the "Authorities" tab.
- Return to the "Search fields" tab to confirm that the DataTable is
still working as expected.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cac122b6117d10f58fefa437a67b9f23ed9ab947) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 702356084a3e4726e27f3f03d468b628f87bf23b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
misc/cronjobs/holds/holds_reminder.pl help says one can use arge -t for --triggered
But not implemented in code.
Should be like in misc/cronjobs/overdue_notices.pl :
't|triggered' => \$triggered,
Test plan :
Play with misc/cronjobs/holds/holds_reminder.pl with arg -t and
--trigger
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f4f4feb50b3d2b58b9212b692daf2c4e3e000b7d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d019a68079ccaf2948561e73fee619d1a9892251) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Mon, 28 Aug 2023 22:24:24 +0000 (22:24 +0000)]
Bug 34634: Show expirationdate of expired holds on reserve/request.pl
To test:
1. Place some holds and go to /reserve/request.pl for that bib.
2. If the reserves.expirationdate is set to today or some date in the past the date does not display in the Flatpickr instance.
3. Change the reserves.expirationdate to sometime in the future, the date displays.
4. Aply patch, restart_all
5. Try steps 2-3 again.
6. This time if the expiration date is in the past you should see it displayed. However it will be uneditable.
7. Make sure holds with a expiration date in the future can still be properly edited.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Christine <chlee@pascolibraries.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0710ccb606faba126acb7b7e62b2868b6a28cbb5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0594b63baebe2f8c0ff1acf605aa32da6f3e2a39) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Petr Svoboda [Tue, 22 Aug 2023 13:13:18 +0000 (15:13 +0200)]
Bug 34583: Overdue notice - wrong coding in outlook in czech e-mail in “print” mode
Koha overdue notice “print” email in Outlook is incorrectly encoded in czech language.
Tested in KohaTestingDocker - https://gitlab.com/koha-community/koha-testing-docker
This patch fixes that error.
Test plan:
Overdue notice, set print in UI, https://snipboard.io/FLkIxf.jpg.
Message body:
<table style="padding:0; margin: 0; border-collapse: collapse; font-family: 'Trebuchet MS', Helvetica, sans-serif; width: 100%; "><tr><td style="vertical-align: top; padding: 0"> </td><td style="width: 75mm; vertical-align: top;"><table style="margin-top: 2.5cm; font-size: 11pt;"><tr><td><<borrowers.cardnumber>></td></tr><tr><td><<borrowers.firstname>> <<borrowers.surname>></td></tr><tr><td><<borrowers.address>> <<borrowers.streetnumber>></td></tr><tr><td><<borrowers.city>></td></tr><tr><td><<borrowers.zipcode>></td></tr></table></td></tr><tr><td colspan="2" style="padding: 0;"><table style="width: 100%; margin: 3cm 0 0 0;"><tr><td style="width: 5mm; height: 5mm; border-bottom: 1px dotted #000;"> </td><td style="height: 1mm;"></td><td style="width: 5mm; height: 1mm; border-bottom: 1px dotted #000;"> </td></tr></table></td></tr><tr><td colspan="2"><table><tr><td style="padding: 0.5cm 0.3cm">V Chrudimi dne <<today>></td></tr><tr><td style="padding: 0 0.3cm">Upozorňujeme Vás, že byla již o 30 dnů překročena doba, na kterou jsme Vám půjčili dokumenty (celkem<<count>>). Žádáme Vás o brzké vrácení těchto výpůjček:</td></tr><tr><td style="padding: 0.5cm 0.3cm;"><table><tr><th>Od</th><th>Do</th><th>Název</th><th>Autor</th><th>Částka</th></tr><item><tr><td><<issues.issuedate>></td><td><strong><<issues.date_due>></strong></td><td><<biblio.title>></td><td><<biblio.author>></td><td><<items.fine>> Kč</td></tr></item></table></td></tr><tr><td style="padding: 0 0.3cm">Zpozdné je účtováno dle ceníku knihovny.</td></tr><tr><td style="padding: 0 0.3cm">Dokumenty můžete vrátit na jakémkoli oddělení knihovny a pobočce v jejich provozní době.</td></tr><tr><td style="padding: 0 0.3cm">Nesplní-li čtenář svou povinnost vyrovnat závazky s knihovou, má knihovna právo postupovat podle příslušných ustanovení občanského zákoníku.</td></tr></table></td></tr></table>
Set delay 1 day, https://snipboard.io/boAd3F.jpg.
Checkout any book.
Set in database issues->date_due = today() - 1
for checkouted book, https://snipboard.io/PrylGB.jpg.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c3a0b9131f3a0df92d1aba4b2548ab3ffbc9980) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 77a5baf94fc76cc7df598032c8d26a29442d4874) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Thu, 13 Jul 2023 08:58:42 +0000 (10:58 +0200)]
Bug 34266: Add unit tests
Signed-off-by: joubu <xxx@example.org> Signed-off-by: tuxayo <victor@tuxayo.net>
Took the opportunity to perltidy this file as I was signing off
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added a rollback. Shouldnt harm :) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3d0e443ce7a90687077c73b5d5a7116d4401d71) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d3f6681c5d100ac40a706b4196e1f65dea227be) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Julian Maurice [Thu, 13 Jul 2023 07:22:44 +0000 (09:22 +0200)]
Bug 34266: Default to biblioitems.itemtype only if it's a valid itemtype
biblioitems.itemtype can contain values that are not itemtypes (for
instance if the MARC field mapped to it uses another authorised value
category)
This patch checks that before using it as a default value for the
'itemtypes' item subfield.
Test plan:
0. Do not apply the patch yet
1. Change your MARC framework so that the field linked to
biblioitems.itemtype uses an authorised value category different from
'itemtypes'
2. Make sure that you have an item subfield linked to the authorised
value 'itemtypes' in your MARC framework
3. Create a biblio with an itemtype (using a value that is NOT an item
type, but a value from the authorised value category you selected in
step 1)
4. Create a new item for this biblio. Notice that the biblio itemtype is
automatically selected for the 'itemtypes' subfield
5. Apply the patch
6. Create a new item for the same biblio. Now the 'itemtypes' subfield
should be empty.
7. Revert the change at step 1 so that your biblioitems.itemtype MARC
field uses the 'itemtypes' AV category
8. Modify your biblio to use a valid item type.
9. Create a new item. The biblio itemtype should be used as a default
value
Signed-off-by: joubu <xxx@example.org> Signed-off-by: tuxayo <victor@tuxayo.net> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 807c58d28d7be4fa1a9606cd6cf2f59f661249ec) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 27fa85423e87be084b22a974f80984493641272d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Fri, 25 Aug 2023 14:51:28 +0000 (14:51 +0000)]
Bug 34617: Preserve calculated expiration dates if set to update on import whether column included or not
To test:
1 - Setup a csv with column headers:
surname firstname branchcode categorycode cardnumber dateenrolled
2 - add values
Acosta Edna CPL PT 23529001000463 02/01/2013
3 - Set PT catgeory enrollement period to a specific date in the future
4 - Import the file and overwrite patrons and update dateexpiration
5 - Check Edna, note her date is not correct
6 - Apply patch
7 - Repeat
8 - Expiration date is now set as expected
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ed2b395a1084d9c064e1631f3f68215ce9df7702) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0cdabc65f0494252cfb391f88888ae732a2bfd4c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Fri, 25 Aug 2023 14:51:23 +0000 (14:51 +0000)]
Bug 34617: Unit tests
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b38780f6cb0ec0cddc0fdbf8cc2c1a3c6dcecfb6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6a9c3eeeb4166fa267853100f278d2027a202a22) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Fridolin Somers [Tue, 29 Aug 2023 17:59:05 +0000 (07:59 -1000)]
Bug 34646: Fix two attributes class in OPAC masthead-langmenu.inc
In OPAC template masthead-langmenu.inc a link as two class attributes :
<a class="dropdown-item" href="#" tabindex="-1" class="menu-inactive" role="menuitem">
Test plan :
1) Go to OPAC with at least one translation
2) Look at HTML source code
=> Without patch you see a link with 2 class attributes
=> With patch you see the 2 classes in same class attribute
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8c63a4bb049b663bb94769b5f5e78ba85ca9918f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e61fd088d32f568efacc528acadf8c9e3f5dbc0e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Mon, 10 Apr 2023 16:38:14 +0000 (16:38 +0000)]
Bug 33316: (QA follow-up) Add link to record, fix typo and heading
* h2 h2 directly following each other make no sense. Changed to h2 h3
* ids changed to IDs
* Linked the record ID to the catalog entry
Note: We also have this link in the batch record mod job details
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a80de2dc8379efa2a8fef761738779aaf4396647) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 22 Mar 2023 19:54:48 +0000 (19:54 +0000)]
Bug 33316: Improve display of ES indexer jobs
We don't do a lot of processing to the data, but we can still
make the display a bit nicer, to show how many records were
done, and show the record ids.
To test:
1 - Do some batch modifications on a system running ES
2 - Check background jobs to see ES jobs
3 - Note display
4 - Apply patch
5 - Confirm display is improved
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dad9430b7b062d25aec0cdeb86dd412133621d5f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Wed, 30 Aug 2023 14:21:37 +0000 (16:21 +0200)]
Bug 34276: (bug 21983 follow-up) Fix db rev 23.06.00.002
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 352a2afd0bf1b67c4c579d299c088604d131ae1a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 10324fd58718e48b8caffbd73573842affdc4ad8) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 16 May 2023 11:14:01 +0000 (11:14 +0000)]
Bug 33744: Fix cloning (sub)fields with framework plugins
This patch is meant as a temporary measure for fixing the problem.
Bug 30975 may resolve it further, but this is good for now.
Note: The original commit message referred to removing a deprecated internal
structure. But this patch actually still uses the structure which has been
moved to _data in jQuery now.
Test plan:
1) Apply patch
2) Repeat steps in the original bug description
3) This time clicking on the Upload button for a cloned field should launch the uploads pop up.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2fa6105779d02e9b7fa81bc0ea47bff51e9f3170) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e486548409e44becb9f3db660871345ddd134a6e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 30 Aug 2023 00:28:53 +0000 (00:28 +0000)]
Bug 34650: Convert list toolbar delete into form POST
This patch adds a HTML form with a CSRF token to POST the list delete,
which is triggered by a click handler on the A element. The A element
is still needed for existing style reasons.
Test plan:
0. Apply patch
1. koha-plack --reload kohadev
2. In the staff interface, add a list
3. Go into that list (e.g. virtualshelves/shelves.pl?op=view&shelfnumber=X)
4. From the toolbar click the "Edit" dropdown
5. From the dropdown try either "Edit list" or "Delete list"
6. Note no CSRF error and operation completes as expected
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d3b7cf08949d5776b732f24cefcbe377260c281) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c4fe03c2331e2fc255e955312fcd4c5c9606225) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 30 Aug 2023 00:07:23 +0000 (00:07 +0000)]
Bug 34650: Remove unnecessary CSRF check on edit_form
The op "edit_form" doesn't change state. It just renders the edit
form. Therefore, it doesn't need a CSRF token/check.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit caf962fbaa4f52bfea12acfa02671cd6920f7a53) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e81e765d7da1b3e34ba4976c2fa6264e658d0044) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Thu, 31 Aug 2023 07:03:31 +0000 (09:03 +0200)]
Bug 34609: Add missing test for Koha::Hold->biblio
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7cab415f0b3d363761e773c728e976470c81337a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1d23e46f8c8fa517f2ec6066bcf5b7b270c161ba) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Wed, 30 Aug 2023 13:12:31 +0000 (13:12 +0000)]
Bug 34609: Add biblio method to Old::Hold
Test plan, clean k-t-d:
1) Add a reserve to koha/koha user, mysql run:
insert into reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, biblionumber)
VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 76);
2) Add an old_reserve to koha/koha user, mysql run:
insert into old_reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, reserve_id)
VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 1);
3) Visit holdshistory on either OPAC (requires OPACHoldsHistory sys pref) or STAFF
STAFF/cgi-bin/koha/members/holdshistory.pl?borrowernumber=1
OPAC//cgi-bin/koha/opac-holdshistory.pl
4) Notice it blows up with a 500 error
5) Repeat step 3
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b57163ef32e08179acd76b245b1b4f49aa93875) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ea252ffa010e6dba469e939eab3b1f900dc9637) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Wed, 30 Aug 2023 13:13:04 +0000 (13:13 +0000)]
Bug 34609: Add tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eaa1a1d7e29d1421bf58f8215994e9ddfe8cdefa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 315927af8bcc461693a5fe22b8f5cc44fc9f0e90) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Thu, 31 Aug 2023 16:18:56 +0000 (16:18 +0000)]
Bug 34466: Add listener to enable or disable clear filter button on KohaTable.vue
Test plan:
Apply only the cypress test patch
Run KohaTable_spec.ts
Notice it fails
Apply this patch, repeat
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5316b4c9cc1138c21a8ff05d2599784e2f6139ca) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0645519fafbcbecc3a347d97abda20a1485e62a4) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Thu, 31 Aug 2023 16:14:45 +0000 (16:14 +0000)]
Bug 34466: Cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68baf8a7c13e77dc8fa5208665044498fa3f936c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e4ddce3f98f391be0f7059d2e9effe0382d91545) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
3) View the generated man page with `man -l koha-z3950-responder.8`
(KTD users may need to `apt-get install man-db` first as
that package provides tools for reading manual pages)
4) Make sure this unit test passes:
prove -v xt/verify-debian-docbook.t
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb902d7a92b2e435890cff78c9c118a2a8280fa7) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 306ec5c3e786960bf54f1bde20416a948a6813d4) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Thu, 20 Jul 2023 02:39:18 +0000 (02:39 +0000)]
Bug 30362: Fix unit test
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95aa1c3da584c06ce439cc2d065e838790e7f6f9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b0fa0150b8a348c8b1ebab1308819e1ca1453675) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Fri, 25 Mar 2022 15:18:27 +0000 (15:18 +0000)]
Bug 30362: Unit test
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 145788398ab6ef606bb9cb86a4783577b6f2d234) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a41958999886cd72899a432809adf45a104986e2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Thu, 20 Jul 2023 02:39:27 +0000 (02:39 +0000)]
Bug 30362: Fix GetSoonestRenewDate to really return soonest renew date
This change fixes GetSoonestRenewDate so that it returns the soonest
renew date as calculated using "No Renewal Before" and "NoRenewalBeforePrecision".
In the past, it would only return the soonest renew date if "$now" was
lesser than it, which would typically only happen when using an "exact"
precision rather than a "date" precision.
Test plan:
0. Apply the patch
1. prove t/db_dependent/Circulation.t
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f8c474019d74c9fd608206daf3074a79c5737f12) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8fc3531e079d076a3212b2aa76525b5ca6e874bd) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eeef7839fbbf72637b9d7eccf84ec62760b9cd23) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit edda7a23cb64acd2a29ab7f76496a1f1ffffd69a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34313: Add patron information in pass validation response
This patch makes the password validation response return the following
patron attributes to the API consumer:
* cardnumber
* userid
This will give hints on what was used to validate in the fallback
bahvior the endpoint has.
To test:
1. Apply the unit tests patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/password_validation.t
=> FAIL: The endpoint doesn't return this valuable data
3. Apply this patch
4. Repeat 2
=> SUCESS: Tests pass! We got the cardnumber and the userid!
5. Sign off :-D
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 749783debf95abd69410c62f119627564ae092ed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 06f09de19e47e2e48abc90938f2986115f062d7c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Owen Leonard [Wed, 21 Jun 2023 13:30:57 +0000 (13:30 +0000)]
Bug 34066: Datatable options don't fully translate on list of saved reports
This patch corrects the DataTable option for defining an alternate
language string when no records are returned by a table filter. An
obsolete version of the option name was breaking the existing custom
option supplied by our datatables.js
To test, apply the patch and go to Reports -> Use saved..
- In the DataTable of existing reports, all the DataTable controls
should look correct.
- In the filter field at the top of the table, enter a string which
will not be found. You should see a message, "No matching reports
found."
- Install another language if necessary, and switch to that language.
- The labels on all the DataTable controls should show the terms which
have been translated for that language.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e26d7c783eb8c70d318e402e3a90930afcff44cd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 12969850e8d2b89896c1dde4bbab728b3700e4e2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Fri, 25 Aug 2023 10:28:58 +0000 (10:28 +0000)]
Bug 34465: Make KohaTable.vue actions column not sortable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 60cf53cf798b16138b53d6012f083caee06941f3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3fa6983a5380cf3703def68989f6f81019e315ae) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Fri, 11 Aug 2023 20:53:44 +0000 (20:53 +0000)]
Bug 34522: Pass the suggestion branchcode, not the suggester branchcode
To test:
1. Turn on OPACViewOthersSuggestions
2. Log into OPAC as patron of Branch A
3. Make purchase suggestion for Branch B
4. Refresh /cgi-bin/koha/opac-suggestions.pl and see that suggestion appears to have been made for Branch A
5. View suggestion from staff client - See that it accurately reflects suggestion having been made for Branch B
6. Apply patch and try steps 2 - 5 again, this time you should see the proper branch.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cb4db13612da28c3a04114fbdb2c7005c13631ef) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9feb62a7031f8ee055c54023a3c8a7e3eafa078e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Fri, 18 Aug 2023 04:32:31 +0000 (04:32 +0000)]
Bug 34571: Remove use of "onclick" for ExpandField in cataloguing editors
This change replaces the onclick HTML attribute with a Javascript binding
to make it more in line with Koha conventions and make it CSP compatible.
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Try hiding/unhiding fields
3. Try cloning fields and hiding/unhiding those too
4. Note that everything works as expected
5. Do the same thing for authorities by going to
http://localhost:8081/cgi-bin/koha/authorities/authorities.pl?authtypecode=#
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8341ffe13db350f3d0c623e1f6ff6671e1944d82) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8237fdd32a6519ce063f3e119874e89395aec379) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Fri, 18 Aug 2023 03:02:30 +0000 (03:02 +0000)]
Bug 34570: Remove use of "onclick" for PopupMARCFieldDoc()
This change removes the "onclick" attribute for the MARC doc
link in the cataloguing editor.
Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=#
2. Click on the question mark (?) next to any of the MARC fields
3. Press the "Repeat this tag" button
4. Click on the question mark (?) on the cloned MARC field
5. Note that both times it worked
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b992dd12ed657a9af516bac6a507bab395e9add) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19c940c2870820ee0da524f6a295b9d062cd2828) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Michael Hafen [Thu, 24 Aug 2023 16:27:36 +0000 (10:27 -0600)]
Bug 34592: Patron Search filter fields needs to be at least an empty array
If buildPatronSearchQuery() doesn't return an empty array when it exits
early, then the code that adds the sort fields to the filters will fail.
Test plan:
- If there is not all ready a patron with a sort1 or sort2 value from
the bSort1 or bSort2 authorized values, add an authorized value if
necessary.
- Add a patron if necessary, and set the patrons sort field to the added
value.
- In Tools -> Patron card creator start a new card batch.
- Click on Add Patron(s) to open the patron search window.
- Pick the value in either the sort1 or sort2 drop down.
- Submit the page. The page will reload and there won't be results.
- Apply the patch, close the patron search window, clear the browser
cache, reload the "New patron card batch" page, and open the patron
search window again.
- Repeat the search. There will be results.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 275197f4052c1695994a978b9ade04b6fc38e910) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e24304ccd54156c8b7fa44dec283306ed02fd44f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>