]> git.koha-community.org Git - koha.git/log
koha.git
20 months agoBug 32503: Use first cancellation for date ordering
Martin Renvoize [Wed, 4 Jan 2023 10:59:55 +0000 (10:59 +0000)]
Bug 32503: Use first cancellation for date ordering

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37530b445fe3abad2861c02cc191bb6095f218c0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32503: (follow-up) Move data-order attributes
Martin Renvoize [Thu, 29 Dec 2022 11:33:47 +0000 (11:33 +0000)]
Bug 32503: (follow-up) Move data-order attributes

It looks like the data-order attributes were at the wrong level to me,
i.e. not part of the 'td' but instead part of the cell content.

This patch moves those data-order attributes where possible and drops
the data-type definitions on the headers.

However, for the cancellation case, this isn't as clear cut as we may
well display more than one cancellation request date in the same cell.
For this case I've left Katrins data-type="@data-order" trick.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d76a6cb1049107af77efc4f642f754d98c9821d8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32503: Fix date sorting for holds awaiting pickup tables
Katrin Fischer [Wed, 28 Dec 2022 22:39:43 +0000 (22:39 +0000)]
Bug 32503: Fix date sorting for holds awaiting pickup tables

This patch is a little experimental, but seems to do the trick.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 208de0c37160c2dc055072b167d901525e7eb94f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33032: Remove alternateholdings_count
Jonathan Druart [Thu, 23 Feb 2023 14:46:48 +0000 (15:46 +0100)]
Bug 33032: Remove alternateholdings_count

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e36e393c7d05fc6e2af6391b908807655f6841e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33032: Fix alternate holdings in staff interface search results
Fridolin Somers [Tue, 21 Feb 2023 20:03:25 +0000 (10:03 -1000)]
Bug 33032: Fix alternate holdings in staff interface search results

If system preference AlternateHoldingsField is used, one can see a display in OPAC search results.
This display does not appear in staff interface search results anymore.

Test plan :
1) Enable feature with system preference 'AlternateHoldingsField', ie 852abc
2) Edit a record to add some datas in field 852
3) Perform a search in staff interface
=> You see the alternate holdings datas

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 ae1aeaac0715da95b65b9374ac8eba704e5d2409)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32685: Correct authority match display on import
Nick Clemens [Thu, 19 Jan 2023 20:47:31 +0000 (20:47 +0000)]
Bug 32685: Correct authority match display on import

Bug 22785 updated the import records table, but mixed javascript variables and template toolkit, this means all matches are treated as biblios

To test:
1 - Export some authority records form Koha
2 - Create a matching rule based on 'Local-number' and field 001
3 - Stage the records for import using above rule
4 - Note the match links point to authorities, but the citations point to biblios
5 - Apply patch
6 - Reload the page
7 - Confirm the links have the correct text

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9d7cca8b4dcdda09e5134bcd57731346285c9fc2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33020: (QA follow-up) POD and chmod
Nick Clemens [Fri, 24 Feb 2023 21:01:43 +0000 (21:01 +0000)]
Bug 33020: (QA follow-up) POD and chmod

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d599694ef5d9d7a8798d16815d839c9c286d6476)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33020: Add missing Koha::Logger->history
Jonathan Druart [Wed, 22 Feb 2023 10:02:39 +0000 (11:02 +0100)]
Bug 33020: Add missing Koha::Logger->history

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 28fd57d78a69a9bb7963597ddc8ec7a70883c7e1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33020: Add test
Jonathan Druart [Wed, 22 Feb 2023 09:20:56 +0000 (10:20 +0100)]
Bug 33020: Add test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8098dfbe3a9763c96ffdcc0c75417b1f5abb552f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Rename isSubmitting with submitting
Jonathan Druart [Wed, 15 Feb 2023 13:17:16 +0000 (14:17 +0100)]
Bug 32925: Rename isSubmitting with submitting

Asking to do somthing, not asking if it's being done

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 228b9ec2e92c65083c304868286cc9ed4b2c3ba5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Add test
Jonathan Druart [Wed, 15 Feb 2023 11:26:39 +0000 (12:26 +0100)]
Bug 32925: Add test

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b312b6313671852cea3b8e352317a87824f999c4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Handle submission notification at fetch level
Jonathan Druart [Wed, 15 Feb 2023 11:02:31 +0000 (12:02 +0100)]
Bug 32925: Handle submission notification at fetch level

This is done in a single place now!

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2e9ed49df2babaf18f46806a37ff3d76dbee02d5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Use a new state for this message
Jonathan Druart [Thu, 9 Feb 2023 15:17:09 +0000 (16:17 +0100)]
Bug 32925: Use a new state for this message

The previous patch didn't work, there is a validation step that make the
form non-accessible after it's greyed out.

This patch is using a new state is_submitting, like the other messages.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit daeccd0b8c2ae9e3d16f32db379a39994433b69d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32925: Display loading info when a form is submitted
Jonathan Druart [Thu, 9 Feb 2023 13:56:43 +0000 (14:56 +0100)]
Bug 32925: Display loading info when a form is submitted

With this new ButtonSubmit component all our submit buttons will look
and behave identically.
Here we need a "submitting" information to be displayed, and the form to
be "deactivated".

This patch is a POC and use the new component on the add agreement and
delete agreement forms

Test plan:
It's easier to test if you add a sleep in the relevant place
(Koha/REST/V1/ERM/Agreements.pm for list and add/update)
Confirm that you see a "Submitting..." in the middle of the screen

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 35dd04e9cb1d8b881b75504a55a253c5cd74f3cd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: (follow-up) Use APIClient to fetch vendors
Jonathan Druart [Fri, 24 Feb 2023 12:23:32 +0000 (13:23 +0100)]
Bug 32939: (follow-up) Use APIClient to fetch vendors

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2540ba19cb26a9d4f288086213891fdfe7561ab5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to replace PATCH requests
Jonathan Druart [Tue, 21 Feb 2023 12:09:23 +0000 (13:09 +0100)]
Bug 32939: Use APIClient to replace PATCH requests

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 821808ec31176d662e518418c9ff8a71948e1a4b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to replace some more fetch calls
Jonathan Druart [Tue, 21 Feb 2023 11:50:02 +0000 (12:50 +0100)]
Bug 32939: Use APIClient to replace some more fetch calls

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d95acb40280bd5c3cc4f248b14cb138db5393cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Remove fetch/erm.js
Jonathan Druart [Tue, 21 Feb 2023 11:42:29 +0000 (12:42 +0100)]
Bug 32939: Remove fetch/erm.js

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b30a5a21d12e94171e4226b5f06eeb5117993847)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch EBSCO eHoldings
Jonathan Druart [Tue, 21 Feb 2023 11:42:15 +0000 (12:42 +0100)]
Bug 32939: Use APIClient to fetch EBSCO eHoldings

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50aab456bc37fefa74149e85f2dfa9d6d308ab6c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch local eHoldings
Jonathan Druart [Tue, 21 Feb 2023 10:59:01 +0000 (11:59 +0100)]
Bug 32939: Use APIClient to fetch local eHoldings

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e58b6d74cc7f98d261b58e9a32cc7eb31d2f8f6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch vendors
Jonathan Druart [Tue, 21 Feb 2023 09:50:02 +0000 (10:50 +0100)]
Bug 32939: Use APIClient to fetch vendors

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d86a671f2e4ae42bfaba2b69642a5cae3707655)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch patrons
Jonathan Druart [Tue, 21 Feb 2023 09:14:55 +0000 (10:14 +0100)]
Bug 32939: Use APIClient to fetch patrons

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 66dd767813fb59cfa1d6b976365df9172198e0e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch licenses
Jonathan Druart [Tue, 21 Feb 2023 09:04:53 +0000 (10:04 +0100)]
Bug 32939: Use APIClient to fetch licenses

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 23266f7b002f8d99b3201de72766b8c06d5c2844)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Use APIClient to fetch agreements
Jonathan Druart [Tue, 21 Feb 2023 08:46:28 +0000 (09:46 +0100)]
Bug 32939: Use APIClient to fetch agreements

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b8dac5b1e296a56187990edca2193fba0e0360ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Uniformize api calls
Jonathan Druart [Wed, 15 Feb 2023 10:38:08 +0000 (11:38 +0100)]
Bug 32939: Uniformize api calls

We want to make the call easier and without less errors possible.
Here, no need to async keyword, try-catch, etc.
Only call the method and use the common then with the 2 success and
error Promise arguments.

We will certainly want to add later a parameter to prevent the display
of the error in fetchJSON, in case the failure does not require a message
for the end user.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 545e568b9f243d3347ee7770f752e23d0af851ac)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Fix delete
Jonathan Druart [Wed, 15 Feb 2023 11:52:10 +0000 (12:52 +0100)]
Bug 32939: Fix delete

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 225f2c664b9549e05a9c98a4fd91df08bcc55c65)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Introduce count
Jonathan Druart [Wed, 15 Feb 2023 09:43:46 +0000 (10:43 +0100)]
Bug 32939: Introduce count

Not used yet, will replace myFetchTotal

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c34c60951a5d7aaa1862a6a5d667bf17edef0f9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Restore checkError
Jonathan Druart [Wed, 15 Feb 2023 09:36:38 +0000 (10:36 +0100)]
Bug 32939: Restore checkError

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 929f5a2199fc3e5ee84ad71c86d00ed4bfd6a530)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Set the default header at lower level
Jonathan Druart [Wed, 15 Feb 2023 09:13:58 +0000 (10:13 +0100)]
Bug 32939: Set the default header at lower level

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5871db79587436bc28eb04f0558f2423ecfcac8c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Have a generic APIClient object
Jonathan Druart [Wed, 15 Feb 2023 08:35:19 +0000 (09:35 +0100)]
Bug 32939: Have a generic APIClient object

You always import the same, only once, and you can access other
resources from the same object.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10322566d40fd31cdf7ee554cbd7f9a0ac33d0a6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32939: Have a generic fetch function for POST and PUT requests in vue modules
Pedro Amorim [Fri, 10 Feb 2023 12:19:08 +0000 (11:19 -0100)]
Bug 32939: Have a generic fetch function for POST and PUT requests in vue modules

Rebase to 32806 and prior to 32925. Squash
More updates. Ready for review, for now.

JD amended patch:
* prettier
* remove changes to AgreementRelationships.vue and EHoldingsLocalPackageAgreements.vue to have less files to update in upcoming patches

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 866cc641d924496b9d201a3996843eb8787d618f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Move main-erm.ts to modules/erm.ts
Jonathan Druart [Tue, 7 Feb 2023 19:54:47 +0000 (20:54 +0100)]
Bug 32806: Move main-erm.ts to modules/erm.ts

Looks fine.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 a8847a0d1dfaeb44b838f713f595d8fbb5067423)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: (follow-up) Rename main.js to erm.js
Jonathan Druart [Tue, 7 Feb 2023 15:55:05 +0000 (16:55 +0100)]
Bug 32806: (follow-up) Rename main.js to erm.js

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 710a3198932f89d2e3432e14175cd496f7276603)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Move routes.js to routes/erm.js
Jonathan Druart [Thu, 2 Feb 2023 20:23:13 +0000 (21:23 +0100)]
Bug 32806: Move routes.js to routes/erm.js

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 4f3ecedfde7698c444aa59d0fa86f8730145ecfe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Rename ERMHome and ERMMain to Home and Main
Jonathan Druart [Thu, 2 Feb 2023 20:16:58 +0000 (21:16 +0100)]
Bug 32806: Rename ERMHome and ERMMain to Home and Main

We don't need to repeat "ERM"

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 998289850f373a6b83d1ee4387161575fd6d3def)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Rename main.js to erm.js
Jonathan Druart [Thu, 2 Feb 2023 20:13:00 +0000 (21:13 +0100)]
Bug 32806: Rename main.js to erm.js

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 bb3459cabc01acfdb118074fde4fe4ac1ee8e02c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32806: Move Vue files for reusability
Jonathan Druart [Thu, 2 Feb 2023 19:53:14 +0000 (20:53 +0100)]
Bug 32806: Move Vue files for reusability

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
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 1edd4d45890b06c8c5604ae0e6ba847799b76ad9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32923: Fix x-koha-embed from EHoldings/*/*
Jonathan Druart [Tue, 14 Feb 2023 14:07:46 +0000 (15:07 +0100)]
Bug 32923: Fix x-koha-embed from EHoldings/*/*

We were validating twice the input and it broke the x-koha-embed header.
I don't really know what's happening, but here is how to recreate the
problem:
1. Edit Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm
2. Add the following lines in Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm, in the list method
    warn $c->req->headers->header('x-koha-embed');
3. curl -v -s -u koha:koha --request GET http://kohadev-intra.mydnsname.org:8081/api/v1/erm/eholdings/ebsco/packages --header "x-koha-embed: resources+count,vendor"

=> There is no vendor in the response
=> The warn displays "resources+count"

If you apply this patch you will notice that "vendor" is part of the
response and the warn displays "resources+count, vendor"

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 855e09163a4f92192756d1f783ab07cb8c00a972)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32923: Add 'vendor' for local packages
Jonathan Druart [Thu, 9 Feb 2023 16:46:02 +0000 (17:46 +0100)]
Bug 32923: Add 'vendor' for local packages

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 b68a9a3596b093167927e8312e4245abff5f413e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32923: Some fixes in ERM specs
Jonathan Druart [Thu, 9 Feb 2023 09:55:56 +0000 (10:55 +0100)]
Bug 32923: Some fixes in ERM specs

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 b7ae86a13486142aa08ad5d141b1610532e4db47)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32923: Fix new occurrences of x-koha-embed at top level
Jonathan Druart [Thu, 9 Feb 2023 09:38:28 +0000 (10:38 +0100)]
Bug 32923: Fix new occurrences of x-koha-embed at top level

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 423ea2632776a8b30d727c68c827c35046601e8a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31563: (follow-up) Add missing TT filters
Katrin Fischer [Fri, 24 Feb 2023 21:48:11 +0000 (21:48 +0000)]
Bug 31563: (follow-up) Add missing TT filters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be8e06ebbda8d508f31014c5e73c1d828bd04f2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32935: (bug 13614 follow-up) Remove unused basketgroup.js
Jonathan Druart [Thu, 23 Feb 2023 08:56:03 +0000 (09:56 +0100)]
Bug 32935: (bug 13614 follow-up) Remove unused basketgroup.js

Bug 13614 removed it. On bug 31056 we noticed that one function was
still needed but we copied it in the corresponding .tt

Now this JS file is no longer used and should be removed from the
codebase

Test plan:
  git grep basketgroup.js
must not return anything

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a48bce7c3bd26a52b85384d725101929b3981c5c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32926: Fix selenium tests
Jonathan Druart [Thu, 23 Feb 2023 09:05:38 +0000 (10:05 +0100)]
Bug 32926: Fix selenium tests

We should not rely on existing data, and we should remove data at the end.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f16baef8794870d12272cf173e5396a86aa7673c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32926: Assign unique ids to <h3> elements
Andreas Roussos [Fri, 17 Feb 2023 15:05:20 +0000 (16:05 +0100)]
Bug 32926: Assign unique ids to <h3> elements

If you perform a System preferences search for a common word
such as "type", you lose the ability to expand or collapse some
sections. In particular, you cannot expand/collapse the sections
with names that appear more than once in the results page.
All sections except the first one in each group of duplicates
are affected by this. See https://imgur.com/a/NSslIcV for a demo.

This patch fixes that by prepending the <h3> ids with the
top-level System preference section name to make them unique.

Test plan:

1) Perform a System preferences search for a common word such
   as "type" or "log". In the results page, the "Policy" section
   will appear more than once. Now try to expand/collapse any
   "Policy" section but the first one. It won't work, only the
   first "Policy" section is toggled.
2) Apply this patch and refresh the page.
3) This time you should be able to expand or collapse all of
   the available system preference sections.
4) Clicking on the "View all xxx preferences" links on the
   right hand side should take you to the correct System
   preferences tab *and* automatically scroll the appropriate
   section into view at the top of the page.

Signed-off-by: Fridolin <fridolin.somers@biblibre.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 28a0c039fe9dec3ac97f069f30638ca24bcbf338)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32926: Add Selenium tests
Andreas Roussos [Thu, 9 Feb 2023 19:11:33 +0000 (20:11 +0100)]
Bug 32926: Add Selenium tests

This adds a new Selenium test to automatically test the correct
behaviour when expanding/collapsing System preferences sections
after a System preferences search.

Test plan:

1) Apply the other patch from this bug report, then run the
   new Selenium unit test which should pass without failures:

   prove -v t/db_dependent/selenium/system_preferences_search.t

Signed-off-by: Fridolin <fridolin.somers@biblibre.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 14d65264afacc69389849a193e82e3694ee11d25)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32687: Get server version in Context::get_versions
Marcel de Rooy [Fri, 20 Jan 2023 09:34:57 +0000 (09:34 +0000)]
Bug 32687: Get server version in Context::get_versions

Test plan:
Run t/db_dependent/Context.t
Check About/Server information/MySQL version.

Signed-off-by: David Nind <david@davidnind.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 d9d473d3399c85d1705ec18c7c85e17b7f30b366)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31413: Set focus for cursor to Selector when adding a new audio alert
Owen Leonard [Mon, 6 Feb 2023 13:10:30 +0000 (13:10 +0000)]
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

This patch adds a step to the process of displaying the new audio alert
form so that focus will be set to the first field when the form has
finished appearing. The typical "focus" class only works on elements
which are present in the initial DOM when the page is displayed.

To test, apply the patch and go to Administration -> Audio alerts.

Click the "New alert" button. When the form appears cursor focus should
be on the "Selector" field.

Also test the edit process: When editing an existing alert there should
not be automatic cursor focus.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c8434553a29b177b879f958c59487cf854c3c13)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32568: Add page-section to checkedin table
Lucas Gass [Wed, 4 Jan 2023 17:43:14 +0000 (17:43 +0000)]
Bug 32568: Add page-section to checkedin table

To test:
1. Apply patch
2. Checkin some items that are checked out/
3. Make sure the page-section looks right.

Note: There are some indentation changes.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.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 3eea589ca10956fb18ec53f32c93cfe5defb9756)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33014: (QA follow-up) Move filters before navigation in sidebar
Katrin Fischer [Thu, 23 Feb 2023 22:07:09 +0000 (22:07 +0000)]
Bug 33014: (QA follow-up) Move filters before navigation in sidebar

This follows the pattern we have on other pages like suggestions,
tags and invoices by putting the filters on top of the navigation
in the sidebar on the left.

To test:
* Search subscriptions
* Verify that on the left it's navigation - search options
* Apply patch
* Verify it's now: search options - navigation

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b35e6e0cea424144d56c3a5fae7911b06ead905)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33014: Improve serial searches
Lucas Gass [Thu, 23 Feb 2023 16:42:36 +0000 (16:42 +0000)]
Bug 33014: Improve serial searches

This patch adds a new include for the serials 'advanced search' and
uses that include on the serials home and serials search pages. It also
adds some extra options ( Call number, publisher, vendor ) to the
search included in the header.

To test:
1. Apply patch
2. Go to the serials module and notice the main page now has an
   'advanced search' form. Make sure it works.
3. After doing a search you'll be taken to serials-search.pl. Make sure
   the search forms in the side bar and in the header look good and work
   right.

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 9e61dc8009b899eb3e6b25c4e303f8bab9b068a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32805: Add tests
Lucas Gass [Thu, 23 Feb 2023 14:51:30 +0000 (14:51 +0000)]
Bug 32805: Add tests

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 b26d2fa578bce10e4060ab625c53bae9debe780f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32805: Update location when recording a localuse in statistics table
Lucas Gass [Thu, 2 Feb 2023 19:08:08 +0000 (19:08 +0000)]
Bug 32805: Update location when recording a localuse in statistics table

To test:
1. Create a statistical patron and checkout, checkin to them.
2. Notice in the statistics table that the location is NULL
3. Apply patch
4. Try steps 1-2 again
5. The location should be correctly recorded in statistics.location

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 14b2c2f0b27a728772920dfe97afae7ddc2fa412)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32982: Add primary button to libary group modals
Martin Renvoize [Thu, 16 Feb 2023 15:25:12 +0000 (15:25 +0000)]
Bug 32982: Add primary button to libary group modals

This patch updates the New and Edit group modals in the library groups
admin page to have a primary 'Save'/'Update' button and a default
'Cancel' button.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.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 9729621c1d8bf2573e7b7d08a69e6ef572b3388d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32829: Fix cataloguing/value_builder/unimarc_field_115b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32829: Fix cataloguing/value_builder/unimarc_field_115b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2edbc0529cece0e0cca0f3f2540132d19a5ebb3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32828: Fix cataloguing/value_builder/unimarc_field_115a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32828: Fix cataloguing/value_builder/unimarc_field_115a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0117e26d9e099256567d2e97bbdb5ec7b2f61e77)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32827: Fix cataloguing/value_builder/unimarc_field_110.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32827: Fix cataloguing/value_builder/unimarc_field_110.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7ff8277b9bb700a172d769e1912b16dafdb754a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32826: (QA follow-up) Remove tab
Nick Clemens [Fri, 24 Feb 2023 16:47:46 +0000 (16:47 +0000)]
Bug 32826: (QA follow-up) Remove tab

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3df31967a8d05a3c7074a1afd2fed939462050ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32825: Fix cataloguing/value_builder/unimarc_field_105.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32825: Fix cataloguing/value_builder/unimarc_field_105.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec85d23949b97dd0eea3efbd7acdf4abf3a068e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32826: Fix cataloguing/value_builder/unimarc_field_106.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32826: Fix cataloguing/value_builder/unimarc_field_106.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c948b933e3991bc8ec17022cf87ad4e37ce1dd2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32823: Fix cataloguing/value_builder/unimarc_field_100_authorities.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32823: Fix cataloguing/value_builder/unimarc_field_100_authorities.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 19c26fcc5a5ae72a2d6cd85d6586b82b154cbd08)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32768: Autocomplete suggestions container should always be on top of other UI...
Pedro Amorim [Tue, 31 Jan 2023 12:38:45 +0000 (12:38 +0000)]
Bug 32768: Autocomplete suggestions container should always be on top of other UI elements

This patch moves the z-index setting of .ui-autocomplete from
addbiblio.css to staff-global.scss for wider use

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fe0e47da22aac747014a0743d2edbb5af4a1f4a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32525: Standardize labels on list of ILL requests and ILL request details page
Katrin Fischer [Fri, 10 Feb 2023 22:57:44 +0000 (23:57 +0100)]
Bug 32525: Standardize labels on list of ILL requests and ILL request details page

This changes some labels so they match up between the
ILL requests list and the detail page of a request:

* 'View biblio details' to 'View bibliographic record'
* 'View borrower details' to 'View patron details'
* 'Branch' table heading to 'Library' in list view
* 'Request number' to 'Request ID' in list view
* 'Type' to 'Request type' in detail view
* 'Bibliographic record' to 'Bibliographic record ID"

To test:
*  Install a backend and activate the ILL module, see:
   https://wiki.koha-community.org/wiki/ILL_backends
*  Add a new request
*  Compare the table headings with the labels on the detail page
*  Apply patch
*  Verify listed changes from above

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2dfafa5b9d3c8440d0f823d34661fbeeb0291b60)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33011: Fix capitalization for "Show in Staff interface?"
Katrin Fischer [Mon, 20 Feb 2023 20:57:43 +0000 (20:57 +0000)]
Bug 33011: Fix capitalization for "Show in Staff interface?"

This fixes another previously missed occurence.

To test:
* Activate SavedSearchFilters system preference
* Search anything and save your search as a filter from
  the staff interface results page
* Go to Administration > search filters
* Click 'Edit search' for your saved filter
* Confirm you are taken to advanced search page
* On top of the page, you'll see: Show in Staff interface?
* Apply patch
* Verify the string was corrected

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 8f1ce6c40e61065d444755dee32e695ad8232ecb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32822: Fix cataloguing/value_builder/unimarc_field_010.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32822: Fix cataloguing/value_builder/unimarc_field_010.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba84c41a88db57773716ffa40fb35a529db26e02)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32820: Fix cataloguing/value_builder/stocknumberAV.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32820: Fix cataloguing/value_builder/stocknumberAV.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a672aed3d45b3741169565b17432e42c962c7d3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32912: Use template wrapper for notices tabs
Owen Leonard [Fri, 20 Jan 2023 15:21:21 +0000 (15:21 +0000)]
Bug 32912: Use template wrapper for notices tabs

This patch updates the notices template to replace tab markup with
the use of WRAPPERs.

This patch also makes a minor correction to the color of Bootstrap
panels.

To test you must have more than one translation installed, and the
TranslateNotices preference should be enabled.

- Apply the patch and go to Tools -> Notices.
- Edit a notice.
- You should see tabs for each available language, for example
  Default, English, French.
- Test adding content to each language to confirm that the correct
  information is saved under the correct tab.
- Disable the TranslateNotices preference to confirm that the
  display is still correct without the tabbed interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96afaeb36d654e556e16ad8e0265947df789f962)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33016: Change breadcrumbs and page title on MARC diff view to cataloging
Katrin Fischer [Mon, 20 Feb 2023 22:22:08 +0000 (22:22 +0000)]
Bug 33016: Change breadcrumbs and page title on MARC diff view to cataloging

Some remaining to dos of us moving the staged import tools from
tools to cataloging.

To test:
* Export a record from your Koha catalog
* Import it using the staged MARC import tool, matching on biblionumber
  (the diff view is only visible if the record matched an existing one)
* View the staged records
* Click on the 'Diff' link
* Verify that the page title and breadcrumbs still read 'Tools'
* Apply patch
* Not these should read 'Cataloging'

Signed-off-by: Lucas Gass <lucas@bywatersolutions.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 b19128eca15cecfe60fea21dc4bb9f686943c448)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31563: Make zero claims show correctly for translations
Katrin Fischer [Thu, 9 Feb 2023 23:29:55 +0000 (00:29 +0100)]
Bug 31563: Make zero claims show correctly for translations

A tag that only contains 0 is turned into an empty tag by
the translation scripts. This turns "Claims ( 0 0 )" into
"Claims (   )" in translated templates.

To test:
* Install an additional language (fr-FR, es-ES) and activate
  it in the system preferences
* Look at the checkouts and details tabs in any patron account
  in the staff interface
* Verify the claims tab shows without the zeros as described above
* Apply the patch
* Update the translation so the templates are recreated with the change
* Verify that the 0 0 now show correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 f4029d7b71edc6472f330a7f8c8c60005205154b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31248: (follow-up) Add fix to checkout history page
Lucas Gass [Tue, 17 Jan 2023 22:56:40 +0000 (22:56 +0000)]
Bug 31248: (follow-up) Add fix to checkout history page

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 274d3d45b0eda1b43efa55d76633931b28c25b2e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 31248: Fix responsiveness of tables on OPAC summary page
Lucas Gass [Wed, 28 Dec 2022 18:42:15 +0000 (18:42 +0000)]
Bug 31248: Fix responsiveness of tables on OPAC summary page

This patch adds back the responsive styles of the tables on the OPAC summary page. This includes all of the following tables that may appear:

opac-user-checkouts
opac-user-relative-issues
opac-user-overdues
opac-user-fines
opac-user-relative-fines
opac-user-clubs
opac-user-holds
opac-user-recalls
opac-user-article-requests
opac-user-overdrive
opac-user-recordedbooks

To test:
1) Make sure you have checkouts in your account
2) Log into the OPAC
--> In 'Your summary' current checkouts are in a table
3) Go to 'You checkout history'
--> Current and previous checkouts are in a table
4) Switch to mobile view (in Firefox, Ctrl + Shift + M)
--> Checkout history is still in a table and the last column is not entirely visible (depending on the content of the columns, I suppose)
5) Go to 'Your summary'
--> Current checkouts are presented in list form instead of a table
6) Apply patch and rebuild the OPAC CSS ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface )
7) Try the tables again, they should appear in a list form when the screen is smaller than 608px.

Signed-off-by: David Nind <david@davidnind.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 16ce0e420ead91609892de839cae07a661f198c7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 33054: Fix unit tests
Tomas Cohen Arazi [Fri, 24 Feb 2023 17:43:18 +0000 (14:43 -0300)]
Bug 33054: Fix unit tests

This patch fixes the tests by making sure:
- The branch in userenv matches the home/holding branch so there are no
  circ rules getting in the middle
- Gives the user superlibrarian permissions for the same reasons above.

To test:
1. Run:
   $ ktd --shell
  k$ for i in $(seq 1 20 ); do prove t/db_dependent/Koha/Acquisition/Order.t ; done
=> FAIL: Notice it fails quite often. You can ctrl+c to interrupt once
it has failed at least once.
2. Apply this patch
3. Repeat 1
=> SUCCESS: it doesn't fail a single time
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c4dbb7c1e0e8837e54ed44f453ac27473cd0c45)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 22490: Some strings in JavaScript files are untranslatable
Jérémy Breuillard [Mon, 25 Apr 2022 13:03:32 +0000 (15:03 +0200)]
Bug 22490: Some strings in JavaScript files are untranslatable

Javascript function `_` works only if used in template file (.tt or
.inc).
In .js files we should use `__`

This patch updates .js files to use `__` instead of `_`

Test Plan:
1. Do not apply the patch yet
2. Run `npx gulp po:update --lang fr-FR` (choose another language
   if you prefer)
3. Open misc/translator/po/fr-FR-messages-js.po and search "Please
   select a CSV (.csv) or ODS (.ods) spreadsheet file"
4. Notice that the references above only mention biblio_framework.js
5. If not already translated, translate it
6. Run misc/translator/translate install fr-FR
7. Go to staff interface and change language to fr-FR
8. Go to Administration Â» Authority types and click on "Actions ->
   Import"
9. In the modal window, click on "Import" without selecting a file. You
   should see an alert with the non-translated text
10. Apply the patch
11. Run `npx gulp po:update --lang fr-FR`
12. Open misc/translator/po/fr-FR-messages-js.po and search "Please
    select a CSV (.csv) or ODS (.ods) spreadsheet file"
13. Notice that the references above now also mention authtype.js
14. If the translation is marked as fuzzy, remove the fuzzy flag
15. Run misc/translator/translate install fr-FR
16. Go to staff interface again
17. Go to Administration Â» Authority types and click on "Actions ->
    Import"
18. In the modal window, click on "Import" without selecting a file. You
    should see an alert, this time with the translated text

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6498c5835c99bfc628ae87bbc43808dfd89f0d87)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
20 months agoBug 32728: ERM - Update search header depending on navigation
Jonathan Druart [Tue, 31 Jan 2023 16:20:14 +0000 (17:20 +0100)]
Bug 32728: ERM - Update search header depending on navigation

Search header should change to match the section you are in.

Default is "agreement". If you are in "local titles" or "local
packages", the header will be positionned on the relevant tab.

To replicate:

1. Enable the ERM module: ERMModule system preference.
2. Go to the ERM module: Home > E-resource management.
3. Select the options from the sidebar menu (Agreements, Packages and Titles),
   and note that the ERM search header options don't change.
4. Add a minimal agreement, package and title.
5. Change the search header to another option, for example 'Search titles',
   then perform a search. Note that:
   - the appropriate sidebar menu option is highlighted, for example: 'Titles'
   - the search header changes back to 'Agreement search'
6. Apply patch, run yarn build
7. Verify the search options are now switched when moving between pages

Signed-off-by: Jonathan Field <jonathan.field@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 c564c8a69614b7f43584d7cdd9f5ffbdfff9a935)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 33051: Make 22600075.pl idempotent
Tomas Cohen Arazi [Thu, 23 Feb 2023 10:56:31 +0000 (07:56 -0300)]
Bug 33051: Make 22600075.pl idempotent

As there is no check, this dbrev could cause trouble if run twice. It
doesn't look like it is going to get backported to 22.05, but just in
case...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4a28d4295956e077c833b1bc91a12fb4a1c26ad7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32307: Fix local cover images
Jonathan Druart [Thu, 23 Feb 2023 11:09:42 +0000 (12:09 +0100)]
Bug 32307: Fix local cover images

We were not calling the function here!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 77b3e01ca04d41be5b95222c84a223f9751dfe99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32770: Restore phone
Jonathan Druart [Wed, 22 Feb 2023 13:43:02 +0000 (14:43 +0100)]
Bug 32770: Restore phone

all_phone vs all_phones
That was caught by Selenium tests t/db_dependent/selenium/patrons_search.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c500fd3c61f3ef5527c31d1904c3174f784452e2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32918: (follow-up) Add new lines for formatting consistency
Katrin Fischer [Mon, 20 Feb 2023 22:59:34 +0000 (22:59 +0000)]
Bug 32918: (follow-up) Add new lines for formatting consistency

This adds new lines between each authorised value for better
readability and to match the formatting of the rest of the file.

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 18f3b7619bc6b648bb074b2be836e01a35c52b99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_...
Caroline Cyr La Rose [Wed, 8 Feb 2023 22:11:40 +0000 (17:11 -0500)]
Bug 32918: ERM authorized values should be in installer/data/mysql/en/mandatory/auth_values.yml

This patch moves the authorized value insertions for ERM categories into
the language-specific auth_values.yml file.

To test:
1. Count the number of authorized values in the mandatory categories

select count(*) from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif');

--> There should be 929

2. Delete the authorized values from these categories

delete from authorised_values where category in ('YES_NO', 'PAYMENT_TYPE', 'HSBND_FREQ', 'ERM_AGREEMENT_STATUS', 'ERM_AGREEMENT_CLOSURE_REASON', 'ERM_AGREEMENT_RENEWAL_PRIORITY', 'ERM_USER_ROLES', 'ERM_LICENSE_TYPE', 'ERM_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_STATUS', 'ERM_AGREEMENT_LICENSE_LOCATION', 'ERM_PACKAGE_TYPE', 'ERM_PACKAGE_CONTENT_TYPE', 'ERM_TITLE_PUBLICATION_TYPE', 'COUNTRY', 'LANG', 'qualif');

3. Apply patch
4. Load the mandatory authorized values

./misc/load_yaml.pl --file installer/data/mysql/en/mandatory/auth_values.yml --load

5. Redo step 1
   --> There should be the same number (929)
6. Update translations

cd misc/translator
./translate update xx-XX

7. Search the po/xx-XX-installer.po file for any of the loaded
   authorized values

   For example,

   grep "Abstract and index" po/xx-XX-installer.po

   --> descriptions should be translatable

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 ff18e46ca64bc729704668ca231b04fecc55551e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32353: Fix erm_agreements.t
Jonathan Druart [Thu, 23 Feb 2023 08:39:42 +0000 (09:39 +0100)]
Bug 32353: Fix erm_agreements.t

Agreement.vendor_id has a default value defined in TestBuilder, but here
we were assuming there was one.
We should then generate it and pass the value when building the
agreement objects.

The failure was:
koha_1       |     #   Failed test '200 OK'
koha_1       |     #   at t/db_dependent/api/v1/erm_agreements.t line 95.
koha_1       |     #          got: '400'
koha_1       |     #     expected: '200'
koha_1       |
koha_1       |     #   Failed test 'exact match for JSON Pointer ""'
koha_1       |     #   at t/db_dependent/api/v1/erm_agreements.t line 95.
koha_1       |     #     Structures begin differing at:
koha_1       |     #          $got = HASH(0x55cde781a480)
koha_1       |     #     $expected = ARRAY(0x55cde75af9c8)
koha_1       |     # Looks like you failed 2 tests of 32.

400 because we were calling
http://localhost:8081/api/v1/erm/agreements?vendor_id='
which returns {"errors":[{"message":"Expected integer - got string.","path":"\/vendor_id"}],"status":400}%

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7d40b7a99c6ad8df8f91307560bb6021143c73f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32353: Don't generate item group for holds in tests
Jonathan Druart [Fri, 25 Nov 2022 12:06:40 +0000 (13:06 +0100)]
Bug 32353: Don't generate item group for holds in tests

See bug 31447, we don't want the tests to deal with potential failures
because of some item groups.

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 813bd47b4c6052da7f320096e226ab013a054c5f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32353: Pick the default value for FK
Jonathan Druart [Fri, 25 Nov 2022 12:17:46 +0000 (13:17 +0100)]
Bug 32353: Pick the default value for FK

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 d766992f2b9b077753a285b18f59b74c17b92e53)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoRMaint: Release follow-up - Fix db_rev permissions
Martin Renvoize [Mon, 27 Feb 2023 08:18:27 +0000 (08:18 +0000)]
RMaint: Release follow-up - Fix db_rev permissions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20 months agoBug 32994: Remove breaking css/maps/*.map files from Makefile.PL
Mason James [Tue, 21 Feb 2023 02:01:21 +0000 (15:01 +1300)]
Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  $ make
  $ make install
  webpack 5.74.0 compiled with 3 warnings in 20831 ms
  Done in 36.01s.
  make: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.

 - apply patch
 - run makefile, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 587ab3ddb850398cd1ba26b8ff2b9369651b7a67)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32994: Remove compiled files from src (2)
Mason James [Fri, 17 Feb 2023 12:21:16 +0000 (01:21 +1300)]
Bug 32994: Remove compiled files from src (2)

this patch adds 2 files that stops dpkg-source from including ./node_modules dir into koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fdc27672a5f2742fbd3a391146885a6c8a90c19)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32978: Updated yarn.lock
Tomas Cohen Arazi [Wed, 22 Feb 2023 13:03:20 +0000 (10:03 -0300)]
Bug 32978: Updated yarn.lock

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4bf5bcc940f25a254543332a6ee4359bdb77a404)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32978: Replace node-sass with dart-sass
Owen Leonard [Wed, 15 Feb 2023 17:36:57 +0000 (17:36 +0000)]
Bug 32978: Replace node-sass with dart-sass

'npm install' fails in ktd on aarch64, giving unsupported architecture error for node-sass.

This patch addresses this by replacing node-sass with dart-sass, updating our gulpfile
accordingly. Some corrections have been made to SCSS to fix warnings
raised during the build process.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Works like a charm. Great work oleonard! Tested on Apple M1, e.g. aarch64.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I removed some useless formatting changes in the gulpfile, and the
yarn.lock changes as well.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e5b28d9c40cab651079eadc1b64d2479a34cbbeb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32338: OPAC - Mobile - Selection toolbar in search result is shifted and not...
Hammat Wele [Wed, 14 Dec 2022 13:08:38 +0000 (13:08 +0000)]
Bug 32338: OPAC - Mobile - Selection toolbar in search result is shifted and not adjusted

To reproduce:
1- Go to the OPAC
2- Inspect the webpage and switch to mobile view
3- Perform a search
4- Check the top of the results table
5- Notice that options are not displayed correctly, there is a blank space between 'Unhighlight' and 'Select All'
6- Apply the patch
7- compile the .scss file 'yarn build --view opac'
8- Clear your navigator caches
9- repeat step 1, 2, 3, 4
10- The options are now displayed correctly

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 967c61a190cd0da395e8acf8e8cbf4ee3f12eb37)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32941: Sys prefs side menu styling applying where not intended
Pedro Amorim [Fri, 10 Feb 2023 15:03:11 +0000 (15:03 +0000)]
Bug 32941: Sys prefs side menu styling applying where not intended

In bug 32881 I introduced changes to make system preferences sub menu items easier to read. At the time, I couldn't find other instances of ul ul in the templates code, but turns out the ERM module has a <ul> inside a <ul>, and possibly other places.
The original selector was too loose and was applying where not intended, this patch rolls back 32881 changes and puts the changes in a tighter selector.

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 e11646eb618df03528a4f70c560c23ab9b622083)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32460: Add missing columns to table configuration for patron categories
Katrin Fischer [Wed, 28 Dec 2022 21:33:27 +0000 (21:33 +0000)]
Bug 32460: Add missing columns to table configuration for patron categories

The table settings were missing the recently added columns, resulting
in strange behaviour using the column visibility settings:

* patron expiration
* can be guarantee
* exclude from local holds priority

To test:
* Go to administration > patron categories
* Verify some columns are missing from the Columns selection
* Apply patch
* Verify the missing columns are now present and all columns
  can be hidden/unhidden as expected
* Change settings for the table in administration > table settings
* Verify the settings have the desired effect

Signed-off-by: Laura Escamilla <laura.escamilla@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 0f042b02c72e7f751b07d5a53be94d982119a17e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32798: Update parameter passed to Koha::Biblio::Metadata->record
Nick Clemens [Thu, 2 Feb 2023 15:03:39 +0000 (15:03 +0000)]
Bug 32798: Update parameter passed to Koha::Biblio::Metadata->record

To test:
1 - Enable OAI sets, and define a set with mapping 952 y = BK
2 - perl misc/migration_tools/build_oai_sets.pl -v -i -r
3 - The script dies:
    Koha::Biblio::Metadata->record must be called on an instantiated object or like a class method with a record passed in parameter
4 - Apply patch
5 - Repeat
6 - Success!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tcohen updated indentation
(cherry picked from commit d6433ff71eba75eea9cd7d5e7da8cac62e7ade01)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32891: (QA follow-up) Fix perlcritic error
Tomas Cohen Arazi [Tue, 21 Feb 2023 13:02:20 +0000 (10:02 -0300)]
Bug 32891: (QA follow-up) Fix perlcritic error

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1d3159922070059cf55c71f31a1297dbb9bfe4ed)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32891: Fix slot selection in last hour
Jonathan Druart [Tue, 7 Feb 2023 07:48:29 +0000 (08:48 +0100)]
Bug 32891: Fix slot selection in last hour

If the curbside pickup module is configured with slot not on the hour
(minutes=00), the slots in the last (not complete) hour won't be
selectable.

Test plan:
Create the following configuration:
pickup interval: 10
Opening hours: 08:00 to 11:30
Create a pickup and select 11:10 or 11:20
=> Without this patch the pickup is not created and the UI displays "Wrong slot selected"
=> With this patch you are able to create the pickup

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f2f288a8c409ae32fb15e764bfd980d022315ff8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32653: Fix curbside pickup if configured on more than 1 branch
Jonathan Druart [Tue, 17 Jan 2023 16:25:39 +0000 (17:25 +0100)]
Bug 32653: Fix curbside pickup if configured on more than 1 branch

If curbside pickup is configured on more than 1 branch, the calendar
will not display the correct day.

We are always selecting the days for the last branch.

Test plan:
Configure curbside pickup for
CPL Monday 8:12
FPL Tuesday 12:15

Login at the opac, select CPL, notice Tuesday are available

Apply the patch and confirm all is working correctly now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64e14f90b5c180b561bfe9c07e30f1456ef49a2e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32933: Use val() instead of attr("value") when getting field values with jQuery
Owen Leonard [Thu, 9 Feb 2023 16:50:38 +0000 (16:50 +0000)]
Bug 32933: Use val() instead of attr("value") when getting field values with jQuery

This patch replaces instances in Koha's templates where "attr('value')" is
used to get the value of a form field, using "val()" instead. This
ensures that we get the current value of the field, not just the
value of the field when the page first loaded.

To test, apply the patch and test the following pages:

- Tools -> Tags. Use the "Check lists" form in the right-hand sidebar
  to test the approval status of some approved and rejected tags. It
  should correctly respond with the tag's status.
- Cataloging -> Label creator.
  - New -> Printer profile. Each offset and creep field should correctly
    reflect the selected value in the "Units" dropdown. Changing the
    dropdown should make the units change accordingly.
  - New -> Label template. Perform the same tests as above.
- Tools -> Patron card creator.
  - New -> Layout. If necessary, check the "Field 1" checkbox. The
    units should be displayed correctly and change as you change the
    "Units" dropdown.
  - New -> Printer profile,
  - New -> Card template: Perform the same tests as above.
- Lists -> List contents.
  - Check that the "Add to" dropdown menu works for adding selected
    titles to a cart or another list.
- Back record modification. Submit a batch of records for modification
  and go to Administration -> Manage jobs.
  - View the details of the job you just submitted.
  - Confirm that the "Add modified records to the following list"
    dropdown works correctly.
- Cataloging -> Find a bibliographic record -> Edit items.
  - Confirm that clicking a cell in the table of existing items
    triggers the "Edit item/Delete item" menu, and that these links
    work correctly.

Works as described.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9863c18cc87e0e49923eeb585319f6e6c46172b0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 33002: Restore "Archive selected" for archiving multiple suggestions
Katrin Fischer [Sat, 18 Feb 2023 10:04:07 +0000 (10:04 +0000)]
Bug 33002: Restore "Archive selected" for archiving multiple suggestions

It looks like this button, added by bug 30599 was later
accidentally removed again. This is giving it a comeback.

To test:
1 - Apply patch
2 - Create some purchase suggestions
3 - Select several suggestions
4 - Click 'Archive selected'
5 - Suggestions are archived
6 - You can view archived suggestions by selecting 'Suggestion information'->'Include archived'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.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 956ae915b0619e93ab3513b9ad6a4b53add640a7)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32898: Avoid hardcoding user/pass in tests
Tomas Cohen Arazi [Mon, 20 Feb 2023 14:07:44 +0000 (11:07 -0300)]
Bug 32898: Avoid hardcoding user/pass in tests

This patch makes the authentication parameters be configurable through
env. Before this, it was hardcoded to koha/koha, which only works if the
ktd defaults haven't been tweaked.

If no env is defined, it fallsback to koha/koha.

In order to pass the ktd configured params, the tests need to be run
like:

$ yarn cypress run --env KOHA_USER=$KOHA_USER,KOHA_PASS=$KOHA_PASS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 53bebb413aec3796ce66311b0e66c872e01fee19)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32898: Remove unecessary async/await
Jonathan Druart [Tue, 14 Feb 2023 16:16:34 +0000 (17:16 +0100)]
Bug 32898: Remove unecessary async/await

myFetch awaits already

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a36f3ed7fe60e14129f2b4b66db1b61ebabe1f9a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32898: ERM - Improve fetch
Jonathan Druart [Wed, 8 Feb 2023 10:59:11 +0000 (11:59 +0100)]
Bug 32898: ERM - Improve fetch

... and fix cypress tests

The main problem was that there were no more checkError call for fetchLocalTitleCount
and the error was not displayed on the UI.

This commit is doing several things:
- Refactor fetch.js to call the same fetch method (myFetch) in order to
deal with the error in a single place
- Have a new myFetchTotal JS function to get the X-Total-Count header
from the response and get the benefit of the previous refactoring
- Rename fetchCountLocalPackages with fetchLocalPackagesCount to match fetchLocalTitleCount
- Use fetchLocalPackagesCount on the Package list view
- Use checkError from components using fetch directly. Ideally the could
should be moved to fetch.js and myFetch should be used.
- checkError get a new flag in parameter to ask for the response instead
of the result (ie. the JSON of the response). That's useful when we need
the response status or the headers
- Make checkError throw a proper exception to stop propation. This
modify the error we display on the UI, it's why we have the following
changes in cypress tests:
-            "Something went wrong: Internal Server Error"
+            "Something went wrong: Error: Internal Server Error"
That's not ideal, we should have our own JS exception to avoid that
"Error" (coming from the toString call on the error)

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a294c5e901e56f05dc80b7b5993ffd4394349104)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
20 months agoBug 32898: Fix Cypress tests
Jonathan Druart [Tue, 7 Feb 2023 16:54:21 +0000 (17:54 +0100)]
Bug 32898: Fix Cypress tests

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 61656983f250d8c3275e83e7924951a62bde473f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>