Kyle M Hall [Fri, 14 Jul 2023 11:32:11 +0000 (07:32 -0400)]
Bug 34279: Unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8096ec9fff44a04c8ff32525499652116d1a8ad0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e360c5637c1f910100e10f049823fda01f588d9) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Wed, 19 Jul 2023 11:41:28 +0000 (12:41 +0100)]
Bug 32271: (QA follow-up) Restore $Price filtering for valid values
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 093d1959af59423e3a9a69139a4745703b7a399a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cf41331ba113a7b176c292820fb2d51c48ff0605) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Wed, 19 Jul 2023 11:31:14 +0000 (12:31 +0100)]
Bug 32271: (QA follow-up) Correction to 'can_be_blank' logic
The logic introducing the can_be_blank check into the monetary decimal
format check was flawed and meant we were no longer checking decimal
formatting in the majority of cases. This patch updates that so we pass
the unit tests and correctly check any value passed that's not an empty
string.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c42725bab4f7f4dc360d9b4fe0417b8b3082d879) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7ccbda031cbc076fe2188133c9b1327ed1b599d8) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Wed, 19 Jul 2023 11:11:50 +0000 (12:11 +0100)]
Bug 32271: Unit test
Add a unit test for the allow blank option added to the monetary check
in CirculationRules.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 41274ef7516ad09f1f9a5e6723ba7bd53379dd02) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d02637bec9848077bec53abfa449fd158ac12c0) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Kyle M Hall [Fri, 14 Jul 2023 13:08:51 +0000 (09:08 -0400)]
Bug 32271: (QA follow-up) Convert all positive numbers to monetary float and convert all 0 equivilents to blank value
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daedce4f6ea7d7ae9d4f12cd54e94b0230683a92) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 093a97c67b5cc9ab0741f860a119e090b8a3360b) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Géraud Frappier [Mon, 5 Dec 2022 17:30:40 +0000 (12:30 -0500)]
Bug 32271: Fix overdue fines cap (amount) set to 0.00 when editing rule.
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit adeb4d54530d6ef8c4adc171846eb7c47a81bb23) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b8a9eefc4cdd3062a688a3c693209c2bef599364) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Pedro Amorim [Tue, 27 Jun 2023 15:00:00 +0000 (15:00 +0000)]
Bug 34133: Set default sort on first column (ID) desc
Test plan:
Before applying patch:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by ASC (lowest ID first)
* Close incognito
Apply patch, then:
* Open incognito at /cgi-bin/koha/ill/ill-requests.pl,
* Verify order is by DESC (highest ID first)
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan from Bugzilla, and added it above.
Works as advertised. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 67916fc23a518bb1ddc895f6f3e0b27c434b8a92) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1c1cfdb0c7833ffafcefa06dfb3495a289cf1f9) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Aleisha Amohia [Tue, 13 Jun 2023 05:29:22 +0000 (17:29 +1200)]
Bug 33992: Only consider the date when auto-expiring problematic recalls
This patch carries this fix into the misc/cronjobs/recalls/expire_recalls.pl cronjob so that recalls are automatically expired when they have been waiting a problematic number of days, not considering hours, as expected.
To test, follow the test plan from the first patch. This will set you up with a waiting problematic recall.
Run the cronjob manually
perl misc/cronjobs/recalls/expire_recalls.pl
Refresh your 'Recalls awaiting pickup' page. Your problematic recall should be gone/expired.
Expiration dates will apply when expiring any 'unfulfilled' recall i.e. newly requested, overdue to be returned, and awaiting pickup.
Sponsored-by: Auckland University of Technology Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0d2052088ec62654f81154be0b9916b8e8630891) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3a5f4d170117e264ed15c8cf40c799ddfd2f6299) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
David Cook [Fri, 16 Jun 2023 06:04:37 +0000 (06:04 +0000)]
Bug 34028: Fix manual entry for two factor authentication
This patch changes the "Account" and "Key" display so that
you can manually enter two factor authentication details into
an authenticator app.
The details are the same as those provided by scanning the QR code.
Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
2. Change setting to "Enable"
3. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
4. Click "More" on record toolbar and choose "Manage two-factor authentication"
5. Click "Enable two-factor authentication"
6. Scan the QR code into an authenticator app and note it creates an entry called
"Centerville: Centerville_koha"
7. Manually enter an entry into an authenticator app (like Google Authenticator)
7a. Add the "Account" as shown on the Koha screen
7b. Add the "Key" as shown on the Koha screen
8. Note that the entries added by QR code and manual entry have the same
label and both were accepted by the authenticator app
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c05333914e3f54d66b9de6dde82b614ea83569a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a51d570a6ebff0989df8e599dc4b1a2cd0b14172) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Bug 33028: (follow-up) Lower the two digits requirement
This patch makes the code not require two decimal digits, as the main
intention here is to forbid (locale) formatted strings to reach the DB.
The number of digits we support needs to be discussed on its own bug,
and a centralized check implemented.
This patch fixes tests:
prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 1/67 Exception 'Koha::Exceptions::CirculationRule::NotDecimal' thrown 'The circulation rule expected a decimal value' with name => fine, value => 0.1
t/db_dependent/Circulation.t .. Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 53/67 subtests
Martin Renvoize [Wed, 19 Jul 2023 10:26:59 +0000 (11:26 +0100)]
Bug 33028: (follow-up) Add POD to new Exception
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b82f1bd8075e0d14aa9d08293831af4cd8a3059a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 187e58aa4907cefbef034a8d459493f40ef03673) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Wed, 19 Jul 2023 10:21:46 +0000 (11:21 +0100)]
Bug 33028: Unit tests
Add unit tests for is_monetary functionality introduced in the
CirculationRules module.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88ccaaf3acab9996070a5bcbc057bbe9dad1c771) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f0d56eb1dc7e7635d620bbe591c681005ea76638) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
While testing this bug I found Circulation.t was failing, but the
exception doesn't actually display anything useful in terms of helping
debug what's going on.
This patch makes it add the rule_name and rule_value to the message.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 82bdaa8fbcdf836dd2fea93850173f15f17b7de9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Katrin Fischer [Tue, 11 Jul 2023 13:23:40 +0000 (13:23 +0000)]
Bug 33028: Perltidy database update script
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f0a3b98cdb1ae0938403bf919f5494e2708821c4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 495a4a7477c715b56a4f96f07c455df029bbcd1c) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Mon, 3 Jul 2023 12:45:28 +0000 (13:45 +0100)]
Bug 33028: Throw exception if not passed a decimal number
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d5b1041f43c2a6d8b82f6ee88c1ecf6aaaeb9cae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0bd5fb0bb64fb7eb6a23b719155b9da67d81e99e) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Tue, 27 Jun 2023 15:54:02 +0000 (16:54 +0100)]
Bug 33028: (follow-up) Apply unformat_price to decimal fields
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 461c1931b9137bfcf64c5ec9a5bc3f127727ec14) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 18ce1916fa59662187f7fbcbeee7fe376b49ff4c) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Tue, 27 Jun 2023 15:22:36 +0000 (16:22 +0100)]
Bug 33028: (follow-up) Add unformat_price js function
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 31cbd5ce946832234c8eb6b99729d781e75fd4bc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9741e94376ea6c7ecf3920132ea05cc2849db4a8) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Katrin Fischer [Fri, 16 Jun 2023 17:01:52 +0000 (17:01 +0000)]
Bug 33028: (follow-up) Rewrite database update
This rewrite the database update with some things in mind:
* We now use a positive value list of allowed characters to check
This makes sure that all of those are recognized:
1,00
1.00€
abc
* Instead of dying after finding one wrong value, we loop through
all values first, building up an error string
* When we have errors... we die and print the full list of things
that need fixing.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0199f5fbbb50cbc4656cbeb73c269a7cc6718e55) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 00fc50a1f6af3b94e60b06c7edb0588974d6b1fd) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Katrin Fischer [Fri, 16 Jun 2023 16:59:22 +0000 (16:59 +0000)]
Bug 33028: Add TT filters for Price and pattern checks to input fields
With this patch, all monetary values in the table will be displayed
formatted.
Also, the input will be checked against our agreed pattern to make
sure no false values can be entered.
Missing: When editing a rule, we need to unformat the value, so that
instead of the display format we have the input format available
for editing.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3c2d40bb4a05687eca67a8e06befd5d43d0a4b9d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 32bddca28690bb05695d3e25fbd5764b7af0a06d) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Katrin Fischer [Fri, 16 Jun 2023 16:57:51 +0000 (16:57 +0000)]
Bug 33028: Add is_monetary to recall_overdue_fine and article_request_fee
This patch marks the 2 missing monetary values for recal over due fines
and article request fees as monetary.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2634097c15d808d4e9a96e33efa9ab245bba88c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit feb6ceaa249b938e1214c4e4bb104f043d1b5bb4) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Fri, 3 Mar 2023 11:33:46 +0000 (11:33 +0000)]
Bug 33028: (follow-up) Fix trailing 0 decimals
We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 598970a1223b9af043b1977965322758565f7d06) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 84076285128d986f9a75c3135d40156248636420) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Martin Renvoize [Fri, 3 Mar 2023 11:28:20 +0000 (11:28 +0000)]
Bug 33028: (follow-up) Move monetary definition into hash
This patch moves the defintion of monetary rule type into the rule kinds
hash.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b48a948cbe7f14526e4ea8836e5175e38ab9d20) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4a8fdaee6695c576966ddfa78262ae4f8da10651) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Thibaud Guillot [Tue, 21 Feb 2023 16:05:45 +0000 (17:05 +0100)]
Bug 33028: Fix calculations around cronjob fines.pl
When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.
I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.
This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)
Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (:tada:)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f9e161b412621c048c55741bab56b92c0b01a15) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4f9eba2d232dcd709fe4ef74d37963f1e019569d) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Katrin Fischer [Sun, 16 Jul 2023 14:11:19 +0000 (14:11 +0000)]
Bug 34181: Fix jQuery selector to make delete checkboxes reappear
Bug 32257 changed the page structure slightly to fix a display
issue with the labels. This resulted in a broken selector in the
function for displaying the checkboxes for deleting/emptying a
certain patron field.
To test:
* Go to Tools > Batch patron modifications
* Enter some cardnumbers or borrowernumbers
* On the batch patron edit form, verify that the checkboxes
behind each input field are missing
* Apply patch
* Verify the checkboxes reappeared
* Verify that for mandatory fields the checkbox is locked
* Make some batch edits and verify the checkboxes work as
intended
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d81b009ab0634e1ae33a1bb5cf20cad538bb361f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 625d0f812ad1c58750c032e7fdd271eaf2932f8c) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Jonathan Druart [Fri, 21 Jul 2023 09:27:26 +0000 (11:27 +0200)]
Bug 34337: (bug 33581 follow-up) Sample patrons not inserted
The "select all" link for the optional sample data is not selecting
holidays and patrons.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 39496af98f3d6408821636b92c5f6e3a25e5e71c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f400830a56ec12005f922e7b0de012e6c0ef9a07) Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
David Cook [Tue, 6 Jun 2023 03:48:06 +0000 (03:48 +0000)]
Bug 33881: Clear self-check JWT during auth kick out
This patch clears the JWT cookie during auth kick out (ie
when a web user navigates from the self-check out/in to
the rest of Koha).
Test plan:
0. Apply patch and koha-plack --reload kohadev
1. Go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
2. Log in as the "koha" user
3. In another tab, go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
4. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=a&weight_search=1
5. Note that you are prompted to "Log in to your account" via the normal Koha prompt
6. Go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
7. Note that you are prompted to "Log in to your account" within the "Self checkout system",
and note that your self-checkout session for the "koha" user has *not* persisted like
it did before the patch was applied
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1fa961b97b8f52d1c9920c72d9338d150deb829b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 158edb411b32253fae4f068ce416d6ad4d1a67d3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Kyle M Hall [Thu, 27 Jul 2023 11:45:57 +0000 (07:45 -0400)]
Bug 30524: (QA follow-up) Only generate CSRF token if it will be used
This patch avoids generating CSRF tokens unless the csrf-token.inc file
is included in the template.
Passed token doesn't need HTML escaped. The docs for WWW::CSRF state:
The returned CSRF token is in a text-only form suitable for inserting into a HTML form without further escaping (assuming you did not send in strange things to the Time option).
i.e. `">test<a ...` was successfully injected into the HTML.
I'm attaching a quick patch I've used to patch up our instance. It just indiscriminately URI-escapes all parameter keys. I didn't decode them back since as far as I understand all valid keys do not contain special characters.
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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e86e81a2480ec5486660bac241c694210eaefa11) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cbc2b0e8dafe7053785f98247df253f014cd632c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Wed, 11 May 2022 07:06:55 +0000 (07:06 +0000)]
Bug 22990: Fix template toolkit syntax issues in shelves_results.tt
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd69581fcf743c6720cc8b5fba687f75fc613321) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f820f0f6b07eff3f2c4ad8c2d3d4dd909dd47b6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Thu, 16 Sep 2021 14:13:23 +0000 (15:13 +0100)]
Bug 22990: Fix for shelves table
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0f232250e1186dd217e77db7e121a0b98a789cb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 20fa891788e002a6679651397ca0782410882bb0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Amit Gupta [Wed, 22 Jan 2020 16:07:22 +0000 (21:37 +0530)]
Bug 22990: Add CSRF protection to boraccount, pay and suggestion
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Test plan would have been nioe.
Tested by changing MAX_AGE with suggestions. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 833d1dc8b082cc742b88e358edef77960b5ffc2f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0c365b52f474e0fc0dd439f11bfa0a95534db029) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
David Cook [Tue, 25 Jul 2023 05:18:00 +0000 (05:18 +0000)]
Bug 34368: Add CSRF token to Content Management pages
This change adds a CSRF token to the Content Management pages
at additional-contents.pl.
Test plan:
0. Apply patch
1. koha-plack --restart kohadev
2. Try to add "News", "HTML customizations", and "Pages".
3. Try to delete these new content entries
4. Note that you were successful in your endeavours
JD amended patch: remove empty line removal (no need to create
unecessary conflicts)
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: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e97fae72141446b0a2fb06c454c601966e5f3494) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a759adc91730da7b57ced0f1baf59e83031197f9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Fri, 23 Jun 2023 10:52:28 +0000 (11:52 +0100)]
Bug 30524: Unit tests
Test plan:
Run t/Output.t
Run t/db_dependent/Auth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2918f6ceda533719ac0da53d8245ea4826f43681) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9436074a26fe903134f71e66b0f9fcb7f6724438) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Wed, 13 Apr 2022 12:55:04 +0000 (13:55 +0100)]
Bug 30524: Core CSRF checking code
Split out from bug 22990 as requested.
Signed-off-by: David Cook <dcook@prosentient.com.au> 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 aba9e61cfbab1e915f1be4a527b5708b9ec59c35) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6d6d36f6df79d3df22ea299934073d903f86e64a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Thu, 20 Jul 2023 08:41:00 +0000 (08:41 +0000)]
Bug 33167: (RMAINT fix) Revert 33167
Bug 33167 was reverted from 22.11.x but the revert does not seem to have removed all lines causing failing tests. This patch removes remaining lines and refactors the code to its pre-33167 state
Bug 33671: (follow-up) Disable FK check for column change
See also BZ report. As suggested by Tomas.
NOTE: The dbrev is extended too for removing records with a failing guarantor_id
foreign key (theoretically not present obviously).
Test plan:
1) cp installer/data/mysql/db_revs/220600048.pl installer/data/mysql/atomicupdate/
2) Run updatedatabase.pl
3) Remove copied file
Bonus:
Manually remove FK constraint before running updatedatabase.
Insert a record with bad guarantor_id into relationships manually.
Run the update again.
You should not see the message that the constraint is removed.
Is the bad record count reported and record removed?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Simplified. No longer removes the FK. Just disables during ALTER. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0397251ece455801d5b3083feb84cf959cfcea83) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4cdb3a57db739c8b5ad672444b02b333ef914762) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2bc251cfdd1efdf6d0f7f299838ff067744ff17b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 835bc43d316df60882c09fb201caa75e027af0a3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Fri, 30 Jun 2023 14:22:17 +0000 (14:22 +0000)]
Bug 29471: Add display of MARC 520 to staff interface detail page
At the moment 520 only displays in the OPAC. With this patch it
also displays in the staff interface detail page.
To test:
* Find a record with 520 or add some 520 entries to a record
Note: different ind. 1 values will result in different labels
* View the record in the staff interface and the OPAC
* Verify only the OPAC shows the 520 entries
* Apply patch
* Verify now the staff interface displays them as well
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Updated patch for displaying $u as link.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Restored signoff line from Phil. Change only for $u. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 256518bf75f4df70a62bfe401bd911473e629efd) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2cb9fa1b52e0f09d52c9a85d3b7ca04694add6a9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 33270: (QA follow-up) Do not change param hashref
Might just be a theoretical thing now, but safer to clone.
Test plan:
Run t/db_dependent/Koha/Biblio/Metadata.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cfbe8daf2118f0ecdeea13ef866e86d2e905b686) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 32db2823b89ae7250dbd35d5931f682e9a6ce4e2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Resolve:
WARN tidiness
The file is less tidy than before (bad/messy lines before: 21, now: 24)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3aba2b06527a36ad4edcf1cafbf614c974a590e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1d11b4360a3684ce3dad5f1f3908fed17e99ad4b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Tue, 11 Jul 2023 13:59:50 +0000 (13:59 +0000)]
Bug 33270: (follow-up) Handle records that fail attempt to ignore bad characters
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ea1a282b5e2100578354c44d273ba77ede7ae5af) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 247ebf90b226e826c96a85d3912688ccd6cd643a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Thu, 22 Jun 2023 11:22:18 +0000 (11:22 +0000)]
Bug 33270: Attempt to recover from invalid metadata exception
This patch uses the new record_strip_nonxml routine to attempt to display
the record when it contains invalid characters
Rather than silently strippg these, we warn in the logs, then add an 'about'
container to the response. It is displayed nicely in the web view or sent as "INVALID_METADATA" in
the xml response
The 'error' codes for OAI seem to be at the request level, and the offered codes don't have a match
for a bad record. Adding the about when we can recover seems the most generous response
To test:
Test plan, assumes using KTD default data - otherwise you need to find and import a record with encoding issues:
1 - Enable OAI-PMH system preference
2 - Browse to:
http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&resumptionToken=marcxml/350////0/0/352
3 - 500 error:
Invalid data, cannot decode metadata object (biblio_metadata.id=368, biblionumber=369, format=marcxml, schema=MARC21, decoding_error=':8: parser error : PCDATA invalid Char value 31...
4 - Apply patch, restart all
5 - Reload the page
6 - It loads!
7 - Click 'Metadata' for record 369 - it succeeds!
8 - Check the logs - confirm you see a warning of the record problem
9 - Confirm 369 has an about section
10 - Check the individul 'GetRecord' response as well
http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=oai_dc&identifier=KOHA-OAI-TEST:369
Signed-off-by: Sam Lau <samalau@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 c71468537b4fa589e91e7fd5823ddd4f54379e21) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e23ed06b7d6abbb3b27f0b0728bba10532d6c63) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Fri, 23 Jun 2023 13:08:31 +0000 (13:08 +0000)]
Bug 33270: Add record_strip_nonxml routine to Koha::Biblio::Metadata
This adds a routine that can strip non xml characters form a record.
It is intended for cases where we do not wish to throw an exception,
but rather need to process a record to allow other work to continue
To test:
prove -v t/db_dependent/Koha/Biblio/Metadata.t
Signed-off-by: Sam Lau <samalau@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 4997d59c83ec1c63a3dc2c089fed79e3ad5fa764) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9544bd25a2b3c4811abb941b67a5684952a78da6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jan Kissig [Wed, 12 Jul 2023 08:40:32 +0000 (10:40 +0200)]
Bug 34251: When using the fast add framework in addbiblio.pl there is thrown a JS error in selectTab( "#tab0XX_panel" );
This is because no nav tabs are build in addbiblio.tt as BIG_LOOP has a
length(size) of 1
To test:
1) go to More>Cataloging
2) click +New record
3) Click Settings> Fast add framework
4) take a look on console
5) try selecting a different framework now, will have no effect
6) apply patch and redo steps 1 to 5
7) there should be no error in console and a change in settings works a
expected
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 e3ff3a62048731c130e7185f7ac81e07f41f6ff9) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 05f5c83140860a292916a522ae042c2dbf69dc58) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fbc21148e73547c0e557f106c02dcedbdcc67807) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e7c83d93cf7f59019c7245930522dc47f72487de) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e545cff7523b1930702b9de0eaff0b246a0ef1e) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7a77ea698589f5d98269878f13ef54c0fabdf123) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34288: Allow access to the cataloguing module with `tools` permission
Bug 31162 moved the cataloguing tools to a new cataloguing module home
page. This prevents people without cataloguing permissions, but with
some tools permissions to access things like the labels creator tool.
I tracked all permissions on the cataloging-home.tt template, including
the Stock Rotation ones which I initially missed because I was focusing
on tools.
This patch makes the cataloging-home.pl page require either
'cataloguing' or any relevant 'tools' permission to allow access. the
page.
The staff interface main page and the top bar dropdown are updated using
the same logic to display the cataloguing module link.
For that purpose, I wrapped the permissions on a sub in `C4::Auth`.
To test:
1. Have a patron with only 'catalogue' and some of this permissions:
2. Log in
=> FAIL: No link to the cataloguing module, neither in the dropdown
3. Apply this patch
4. Repeat 2
=> SUCCESS: You have the link!
5. Play with the different combinations and notice things are sound and
correct
6. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0db60995a8dd093210ffa772f56b7d5bac28d197) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit afacad6a2d5477870c55d8f0c56dec66bce64b9d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Wed, 19 Jul 2023 09:02:01 +0000 (09:02 +0000)]
Bug 34029: (RMAINT fix) Update DBIC file
Commit fb202cc3eaa12b5764fd91e2320ab82c7739bc72 was missed when cherry-picking and xt/author/podcorrectness.t was failing. This commit adds the updated DBIC file that fixes the test
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 12956d3e8a1a929da3c0944fe637d9511e5a2621) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fb202cc3eaa12b5764fd91e2320ab82c7739bc72) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Sun, 9 Jul 2023 14:08:51 +0000 (14:08 +0000)]
Bug 29762: (follow-up) Change field names from phone to primary phone
This change is made in order to make sure that the labels on the
normal patron form and the batch patron edit tool match up.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3f80a0fcf74be12bb12f249d79139df29455f4a5) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 853ced5fa1f2a9d203e977de318b51407f121323) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Philip Orr [Fri, 7 Jul 2023 13:21:46 +0000 (13:21 +0000)]
Bug 29762: Change field names from "Mobile" to "Other phone"
This Patch changes the field name for "Mobile" to "Other phone"
in Patron batch modification.
To test:
1. Apply the patch
2. Go to Tools -> Batch Patron Modification and add some patrons
3. Hit "continue"
4. Verify that in the list of patrons you selected, the field
"Mobile" has been replaced by the field "Other phone"
5. Verify that down below in the fields to be batch modified,
the field "Mobile" has also been replaced by the field "Other
phone"
6. Add some data into the field "Other phone" (e.g. 12345 or
some other number) and hit save
7. Confirm that the field was correctly modified and is still
named "Other phone"
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 782bb4acf96e9263fabcd6d3b3d1637f890aa9f1) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cd56fda58d34bce90306fa6b3e58703653afb17f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Mon, 10 Jul 2023 21:30:41 +0000 (21:30 +0000)]
Bug 34232: (QA follow-up) Remove superfluous "Use:" from each list entry
We do have a heading "Use existing item groups" above the
entries. The added "Use:" in front of each entry is not requires and
makes entries longer and harder to scan.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c0ea36a0072f0398c896bc6f3280cf7bfea48e8) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 19e79589c20fa228a61747f3b9a72a9e9d961454) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Lucas Gass [Fri, 7 Jul 2023 19:31:15 +0000 (19:31 +0000)]
Bug 34232: Make dropdown on additem page rescept display order
To test:
1. EnableItemGroups
2. Find a record and add some new item groups with different display orders
3. Now edit an item on the record and scroll down to the dropdown underneath "+ Add to item group"
4. Notice that the values in the dropdown do not respect the display order.
5. Apply patch and restart_all
6. The display order should now be respected
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8065e3515abb79317f7c2dcddcb794529ffc9348) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ebe3637a25fac20869acf72b23ef021dc2c185a1) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Michael Hafen [Wed, 5 Jul 2023 17:17:09 +0000 (11:17 -0600)]
Bug 34209: Follow up on Bug 28726 - move whole 'select all ...' header into condition
Move the whole search header div into the checkbox column condition, so
that other patron search popups don't have an empty div.
To test:
* Activate the ERM module
* Create a new agreement
* Search for a user using the pop-up search
* Verify there is an empty div showing as grey box above the table
* Go to tools > label creator > new batch
* Search for patrons
* Verify the box isn't empty and shows the select all ... options
* Apply patch
* Repeat steps, verify the empty div is gone and the options remain
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 c2e5a3242529a417d75585af113f6b50e2e690f0) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6d1748ed4c7951040c0aa8ae0489cbdabcf7b732) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Phil Ringnalda [Sat, 1 Jul 2023 15:41:15 +0000 (08:41 -0700)]
Bug 34182: Don't set biblio.serial based on biblio.seriestitle in AddBiblio
A misunderstanding of the intention of some dead code that probably wanted
to set biblio.series (which doesn't exist) left us setting biblio.serial
if biblio.seriestitle was set. The only thing series and serial have in
common is the first four letters. We shouldn't set serial on something
with a series (unless someone also sets serial on it, of course).
Test plan:
1. Administration - MARC bibliographic framework - Actions button next to
Default framework - MARC structure
2. In the Search for tag input type 942 and click search
3. Actions button next to 942 - Edit subfields
4. Tab s - check the checkbox for Editor, uncheck the checkbox for
Collapsed - Save changes
5. Cataloging - New record
6. Click in the input for 000 and hold down Tab until you get past 008
to fill in mandatory default values, then type any character in 040
subfield c
7. Tab 2 - In 245 subfield a type Series not serial
8. Tab 4 - In 490 subfield a type any character
9. Tab 9 - Set the value of subfield c to Books
10. Click save and leave the tab open to keep the biblionumber
11. Cataloging - New record - repeat step 6
12. Tab 2 - In 245 subfield a type Serial not series
13. Tab 9 - Set the value of subfield c to Books - Type 1 in subfield s
14. Click save, the biblionumber should be one higher than the first one
15. Reports - Create from SQL
16. Type something in Report name, paste in the SQL
SELECT biblio.serial, biblio.seriestitle, biblio.title FROM biblio WHERE
biblionumber IN ("","")
and put your first biblionumber in the first "", your second in the
second.
17. Save report - Run report
18. Series not serial should have a blank in the serial column and the
character you typed in the seriestitle column; Serial not series
should have a 1 in the serial column and a blank in the seriestitle
column.
Signed-off-by: Martin Renvoize <martin.renvoize@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 65b7c6731933f4b7d284ac07b9adab0d2ada60ca) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a25c9e637bbf7f053d5d65d21d9b7f139c316524) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Wed, 5 Jul 2023 10:41:09 +0000 (12:41 +0200)]
Bug 34184: Add empty option for suggestion "document type"
Currently when editing a suggestion, the document type will preselect to the
first entry as we don't have an empty entry.
This can lead to data errors easily.
Test plan:
Create a new suggestion
=> Notice that "document type" is empty by default, pick one
Edit it again
=> Notice that the value is kept and empty can be picked, pick empty
Edit again
=> Empty is selected and saved in DB
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 6485f244e085fe48b796dd64178659c2f4a5e4ba) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cb07de6a981eab80c5764beb35c774e2910359ca) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Pedro Amorim [Fri, 14 Jul 2023 08:37:27 +0000 (08:37 +0000)]
Bug 34256: Fix regression from 34092
It appears search_fields variable got lost somewhere in my own rebases.
search_fields variable was not being considered as it should, in the function.
I think this patch fixes it.
This showed in the borrowernumer no longer being searchable:
* Use search filters in patron search
* Set 'Search field' to borrowernumber
* Search for 19 (Henry) or 41 (koha) in sample data
* No results :(
* Apply patch
* Search leads to the patron record again
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcabb5d24712b23963c4616efae19e940cf2c544) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 681c635024146ec4f4ca670207f19f6c033b6053) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Wed, 12 Jul 2023 13:22:54 +0000 (13:22 +0000)]
Bug 34261: Add missing argument to show_account
This patch fixes a missing $crypt in the show_account function when deleting an edifact ordering account.
Test plan:
1) In system preferences search for EDIFACT and change EDIFACT to Enable
2) Navigate to Administration > EDI accounts
3) Create a dummy account
4) Try deleting the account using the delete button in the actions column on the far right
5) An error should be thrown - "Can't call method "decrypt_hex" on an undefined value"
6) Apply patch
7) Try deleting the account again
8) This time it should work and show the confirmation dialog box
9) Sign off
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 0992769f6ee935d7f12c127ab5df827768361585) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 86c15fca16170eacadce4ab3fd6473cee5643fdb) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Nick Clemens [Wed, 7 Jun 2023 13:20:40 +0000 (13:20 +0000)]
Bug 33939: Preserve order budget dropdowns and default budget dropdowns seperately
The dropdowns have different hints after bug 22802. We need to preserve those when adding
or hiding inactive budgets
To test:
1 - Add some inactive budgets to Koha
2 - Use the settings and file from bug 22802 to stage a file and begin adding to basket
3 - When adding to basket test the 'Show inactive funds' on both the 'Select to import' tab and the 'Default accounting details' tab
4 - Ensure the dropdown hints/defaults don't change when hiding/showing budgets
5 - Confirm inactive budgets are correctly shown/hidden
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 80eb5ac35be44afd5547e1fa75da475d88f95612) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a2a8cb86b0d73f11514158a29e1b0780f89a04a6) 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 c0f2a47d3ce78a23aa1b6253188108ce3b0047b7) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8ecb70b338d0456a73af92d50baf765bcff4f9a7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Sat, 13 May 2023 12:18:02 +0000 (12:18 +0000)]
Bug 33727: Merge both Calendar tests
The old t tests become part of the first subtest.
Test plan:
Run the new t/db_dependent/Calendar.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eb6c36c4ddec644619486dea5520e89ef9af56b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6052f0ec174fb313998cbe38d17af4d9390ee319) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Sat, 13 May 2023 12:06:55 +0000 (12:06 +0000)]
Bug 33727: Groundwork for Calendar.t
Update test while removing need for Test::DBIx::Class.
Test plan:
Run t/Calendar.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6e736a5d5f342325651944772b74c5ace1b8814f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d77d59fcaa5cb9fbbf92777282101a64ef285df7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 34243: Fix copy/pasted city references in api tests
Two occurrences.
Just comments.
Test plan:
Read the patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 308d75d05d105a5829c98617b5229fae587c32f3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ef77656e85fc959ad7f769a8dbdec8e97cc23c4e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Sun, 9 Jul 2023 15:33:01 +0000 (15:33 +0000)]
Bug 31082: (QA follow-up) Fix translation - we are in a .tt not in a .js file
Just changing from two to one underscore.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c7a0a31a79d09b985f0fd8dd4166f7ee825bc561) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a0a0c81df2fad545461ae2de70a10f7175f2d640) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Fri, 7 Jul 2023 09:40:32 +0000 (11:40 +0200)]
Bug 31082: Make the string translatable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4c21e6a3e2e97fd8fc481d84c437fefaac4bccf8) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 64348926b14bc5a480e9db824f43a204f96d9d51) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 31082: (follow-up) same for "remove" action button on bundle item list
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 826db3092bc59a5ea2f8b37b6d542973a13bca94) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eb9ba1f875f8c32674a2f87000fdc580dc4e69b6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Thu, 25 May 2023 09:46:39 +0000 (11:46 +0200)]
Bug 31082: Add tooltip to buttons when item bundles cannot be changed while checked out
Signed-off-by: Martin Renvoize <martin.renvoize@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 cbc46793415a531ae0041a9857520bb4f0b9b90b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3b37423d82a6a6caacd71a468b1346c976c9609c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This patch fixes some reported tidyness issues with the patches.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 927c5a891352e5c63fe7baa0ecb7c9eca001865b) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6c381c20e202e693bc01b13e6ef532161dd6a60c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Martin Renvoize [Tue, 27 Jun 2023 11:03:58 +0000 (12:03 +0100)]
Bug 33817: (follow-up) Fix spec and messages
This patch should resolve the issues highlighted at signoff time by
Victor.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 34b704fb0b9da3d279c4169920d39b286d17fb39) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ba57a9aa58c4588c603d6ffb7613271b3f662a6c) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Thu, 25 May 2023 09:37:38 +0000 (11:37 +0200)]
Bug 33817: Enforce server-side
Signed-off-by: Martin Renvoize <martin.renvoize@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 384de4a74adb6af1296ee2ad53f1c9ad1dd0c2eb) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e4ef4c5e3d3d328479677b586a0e5c3f1b423b20) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Wed, 24 May 2023 11:16:14 +0000 (13:16 +0200)]
Bug 33817: Prevent item bundle that is checked out to be modified
While an item bundle is checked out, we don't want any items to be
added or removed from the bundle.
To test:
* Create a record with LDR Pos. 7 = c
* Add an item for your bundle
* Add one or more existing items from other records to the bundle
* Check out the bundle item
* Verify it appears correctly on the patron account
* Verify you can still add/remove items from the bundle
* Apply patch set
* Verify that the add/remove links are now disabled (greyed out)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8cb2dd4e3077f95528ffffaa4a825aae314d034f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a29fec1b4e9de007c7a833cea3df788c3e5cac29) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Phil Ringnalda [Tue, 27 Jun 2023 22:34:59 +0000 (15:34 -0700)]
Bug 34097: Prevent clicking ellipsis for dateaccessioned plugin from scrolling up
Test plan:
1. Find a record with several items (in ktd "MacLaren's Gaelic
self-taught" will do nicely
2. Click the Edit button next to one of the items
3. Click the "..." to the right of "d - Date acquired" and verify that the
page doesn't scroll up to the top, and that the current date is
inserted in the field
4. Click the "..." to the right of "w - Price effective from" and verify
that the page doesn't scroll up and the current date is inserted
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 3824547e5c92328ae0bf54939ec0315b1cbfd98f) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2d24f269f5692ca333d55381e337a5a90a1d1eff) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 23 May 2023 14:01:40 +0000 (14:01 +0000)]
Bug 33808: Add aria-labels in reports-toolbar.inc
This patch adds an aria-label and an aria-haspopup to Download buttons
identified as non-descriptive in accessibility testing
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8fac9067b2494cca29a2b2147b78366c6a53bcf6) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eba9d136604c6f2e4847d4d71396b08b22e6b4d5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 23 May 2023 14:00:59 +0000 (14:00 +0000)]
Bug 33808: Add aria-labels in basket.tt
This patch adds an aria-label and an aria-haspopup to Download buttons
identified as non-descriptive in accessibility testing
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e0813a3b3dc68f8498ec83cd7df2b0ebad099378) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12ee1fde0de083d3519cee46259a3f2c8848c64b) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 23 May 2023 14:00:11 +0000 (14:00 +0000)]
Bug 33808: Add aria-labels in opac-basket.tt
This patch adds an aria-label and an aria-haspopup to Download buttons
identified as non-descriptive in accessibility testing
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa0f113f97c1b79b69fc7f3999ced00d3ac2b3c3) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b1ddaa0b15124afefcfde8ff1e010d79eaa2ead3) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Matt Blenkinsop [Tue, 23 May 2023 13:58:13 +0000 (13:58 +0000)]
Bug 33808: Add aria-labels in opac-shelves.tt
This patch adds an aria-label and an aria-haspopup to Download buttons
identified as non-descriptive in accessibility testing
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 429f0d6dce8e28fee5e63f06f63552775aadc543) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c7ab9be9b0f74468b40fa322238bdffc1dcf9410) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
In order to reduce the technical debt carried on the orders controller,
and to highlight the decisions made on the prior patch, I adapted the
list() orders controller using the new tools in town.
The result is this endpoint can now embed bibio, without needing to have
a custom piece of code.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass :-D
Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c07e43cf2afecfa6df0ba259187b90f567bc2603) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 944c6939251906542f2d8aeebb01a3af210173f6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 33974: (follow-up) _order_by is not always an arrayref
The loop through the `_order_by` query parameter occurences introduced
by this patchset was naive regarding the possible scenarios.
When there's only one parameter passed, it shouldn't be expecting an
arrayref, but a scalar. This patch deals with that in the simplest way.
To test:
1. Run:
$ ktd --shell
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests are failing
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d90d264253134a1c6fa7dbb64b959bd7d3789fce) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a16356ae2846a76b2a226d44f5498d0389f87ae9) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 33974: (follow-up) biblionumber column needs special handling
This patch makes a particular use case be handled correctly: i.e. no
context is passed (e.g. 'biblio' explicitly) and the query is done
against the `biblio_id` attribute. This results in the following DBIC
error:
[ERROR] GET /api/v1/biblios: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 394>>
With this patch, this is no longuer the case :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba80c71e63549e60fcdd5666bd2484b75e5a174d) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35d1f812778dcd8d538f1781b224d41a09be3e79) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>