koha.git
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 months agoBug 32452: Link basket group on basket summary to basket groups page
Katrin Fischer [Fri, 10 Feb 2023 21:59:40 +0000 (21:59 +0000)]
Bug 32452: Link basket group on basket summary to basket groups page

In most places we already link the basket group name to the
basket group page, but not on the basket summary page.

To test:
* Create a basket/order with some order lines
* Close the basket and check the checkbox for creating a basket group
* Go back to the basket/order page
* There will be a link 'Manage basket group', but the basket group name
  is only text
* Apply patch
* Reload the page, the basket group name should now be linked

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32665: Fix typo in template condition
David Cook [Wed, 18 Jan 2023 04:38:36 +0000 (04:38 +0000)]
Bug 32665: Fix typo in template condition

This patch fixes a typo in a template condition so that
the about.pl warning about RequireChoosingExistingAuthority is
shown when it's the only warning to display

Test plan:
0. Don't apply the patch yet
1. Go to http://localhost:8081/cgi-bin/koha/about.pl
2. Note that "No warnings" is shown
3. Apply the patch
4. Go to http://localhost:8081/cgi-bin/koha/about.pl
5. Note that there is a heading for "Warnings regarding the
system configuration" and a specific warning about the
"RequireChoosingExistingAuthority" system preference

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 23656: Add cataloguing search bar to addbiblio
Nick Clemens [Wed, 26 May 2021 10:35:02 +0000 (10:35 +0000)]
Bug 23656: Add cataloguing search bar to addbiblio

This patch adds the search header to the cataloging editor page. With
the staff redesign, this takes up very little space, so I think can be
added and visible by default

To test:
1 - Apply patch
2 - Load the basic cataloging editor for a bib
3 - Note lack of search bar
4 - Apply patch
5 - Reload the page
6 - You have a search bar

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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 months agoBug 32967: DBRev 22.12.00.007
Tomas Cohen Arazi [Fri, 24 Feb 2023 20:28:41 +0000 (17:28 -0300)]
Bug 32967: DBRev 22.12.00.007

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices
Aleisha Amohia [Wed, 15 Feb 2023 02:15:15 +0000 (15:15 +1300)]
Bug 32967: Fix PICKUP_RECALLED_ITEM and RECALL_REQUESTER_DET notices

This patch fixes two recalls notices which are referencing old column
names, so they leave empty fields when the notices are generated.

To test:

1) Apply database updates and restart services
2) Go to Tools -> Notices
3) Find the RECALL_REQUESTER_DET notice, open the Print tab
4) Confirm there are no references to recalls.waitingdate or
recalls.recallnotes. Confirm the reference is fixed to
recalls.waiting_date and recalls.notes
5) Find the PICKUP_RECALLED_ITEM notice, open the Email tab
6) Confirm there are no references to recalls.branchcode or
recalls.expirationdate. Confirm the reference is fixed to
recalls.pickup_library_id and recalls.expiration_date

Sponsored-by: Catalyst IT
https://bugs.koha-community.org/show_bug.cgi?id=32697
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>
16 months agoBug 30869: Add the ability to delete stock rotation rotas
Pedro Amorim [Fri, 13 Jan 2023 13:23:17 +0000 (13:23 +0000)]
Bug 30869: Add the ability to delete stock rotation rotas

'At the moment, it isn't possible to delete any rotas that have 0 items linked to it. The only way to do it is in MySQL - it would be good if this was possible from the staff client.'
This patch implements this, and also implements the possibility of deleting a rota with items linked to it, providing a warning that the item(s) currently in rotation will remain at its/their current stage library.

Test plan:
1) Enable StockRotation system preference
2) Cataloging > Stock rotation > New rota
3) Enter Name, save
4) Verify 'Delete' button shows on the right
5) Click 'Delete' -> Confirm 'Yes'
6) Repeat steps 1-3 and click 'Manage'->'Stages'
7) Add a new stage, enter Library and Duration, click 'Save'
8) Return to rotas, click 'Manage'->'Items'
9) Add item, enter barcode, click 'Save' (optional: add more than 1 item)
10) Optional: Click 'Move to next stage' and verify that item is now in different branch
11) Click 'return to rotas' and press 'Delete'
12) Verify the warning now shows, because items are attached, with the attached items count
13) Click 'Delete' -> Deletion is successful
14) If you did step 10, verify the item is still in the branch that it was at the time the rota was deleted

Sponsored-by: PTFS-Europe
Signed-off-by: David Nind <david@davidnind.com>
JD Amended patch:
* Fix QA failures
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 150)
                forbidden pattern: tab char (line 151)
* Adjust commit message to describe what the patch does
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 22428: DBIC schema
Tomas Cohen Arazi [Fri, 24 Feb 2023 20:18:37 +0000 (17:18 -0300)]
Bug 22428: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 22428: DBRev 22.12.00.006
Tomas Cohen Arazi [Fri, 24 Feb 2023 20:17:37 +0000 (17:17 -0300)]
Bug 22428: DBRev 22.12.00.006

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 22428: Change datatype of field_value to text
Matt Blenkinsop [Tue, 21 Feb 2023 10:31:13 +0000 (10:31 +0000)]
Bug 22428: Change datatype of field_value to text

This patch changes the datatype of the field_value column in
marc_modification_template_actions to "text". This is to stop text
strings longer than 100 characters from being chopped short and allow
longer strings up to 65,000 characters.

Test plan:
1) Follow the same steps outlined by Caroline in the problem statement
2) Apply patch
3) Follow the steps again and this time the text should upload with no
   problem

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32594: Add a dedicated Elasticsearch biblio indexing background queue
Nick Clemens [Mon, 9 Jan 2023 13:43:43 +0000 (13:43 +0000)]
Bug 32594: Add a dedicated Elasticsearch biblio indexing background queue

Currently we generate large numebrs if single record reindex for circulation and other
actions. It can take a long time to process these as we need to load the ES settings for each.

This patch updates the Elasticsearch background jobs to throw records into a new queue
that can be processed by it's own worker and adds a dedicated worker that batches the jobs
every 1 second.

To test:
1 - Apply patches, set SearchEngine system preference to 'Elasticsearch'
2 - perl misc/search_tools/es_indexer_daemon.pl
3 - Leave the running in terminal and perform actions in staff interface:
    - Checking out a bib
    - Returning a bib
    - Editing a single bib
    - Editing a single item
    - Batch editing bibs
    - Batch editing items
4 - Confirm for each action that records are updated in search/search results
5 - Stop the script
6 - set SearchEngine system preference to 'Zebra'
7 - perl misc/search_tools/es_indexer_daemon.pl
8 - Script dies as Elasticsearch not enabled

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Bug 32594: (follow-up) Adjust logging per bug 32612

JD amended patch: tidy! There were tabs here...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 32992: Move background_jobs_worker to misc/workers
Nick Clemens [Fri, 17 Feb 2023 12:00:49 +0000 (12:00 +0000)]
Bug 32992: Move background_jobs_worker to misc/workers

On bug 32594 we are adding a new worker, dedicated to Elastic indexing.
We should have a common place for workers, and we agreed on misc/workers

To test:
1 - Apply patch
2 - reset_all in koha testing docker
3 - ps aux | grep background
4 - Confirm the workers are running, and running in the new directory
5 - Perform a batch item modification
6 - Ensure the job is processed by the worker

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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 months agoBug 32495: Mis-matched required fields in UI and api
Matt Blenkinsop [Mon, 9 Jan 2023 15:12:18 +0000 (15:12 +0000)]
Bug 32495: Mis-matched required fields in UI and api

The "description" field is marked as required in the UI when creating a new Agreement. This flag has been removed to match the API where it is not a required field. Is Perpetual has not been marked as required as it is a checkbox with a default selection so will always provide a value.

Test plan:
1) In the ERM module, add a new agreement and observe that the Description field is required
2) Apply patch
3) Repeat step 1 but this time the Required flag will not be visible.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 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>
16 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>
16 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>
16 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>
16 months agoBug 32824: Fix cataloguing/value_builder/unimarc_field_100.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32824: Fix cataloguing/value_builder/unimarc_field_100.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>
16 months agoBug 32835: Fix cataloguing/value_builder/unimarc_field_122.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32835: Fix cataloguing/value_builder/unimarc_field_122.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>
https://bugs.koha-community.org/show_bug.cgi?id=32825
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 months agoBug 31051: Generate items correctly in test
Jonathan Druart [Thu, 23 Feb 2023 08:20:25 +0000 (09:20 +0100)]
Bug 31051: Generate items correctly in test

There was a misplaced bracket in build_object.
To generate item you should need build_sample_item anyway.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 months agoBug 31051: Fix test
Jonathan Druart [Thu, 23 Feb 2023 08:12:04 +0000 (09:12 +0100)]
Bug 31051: Fix test

When savings ends with a "0"

koha_1       |     #   Failed test 'Savings correctly calculated from current issues'
koha_1       |     #   at t/db_dependent/Koha/Patron.t line 1380.
koha_1       |     #          got: '34583.70'
koha_1       |     #     expected: '34583.7'
koha_1       |
koha_1       |     #   Failed test 'Savings correctly calculated from current and old issues'
koha_1       |     #   at t/db_dependent/Koha/Patron.t line 1385.
koha_1       |     #          got: '34583.70'
koha_1       |     #     expected: '34583.7'
koha_1       |     # Looks like you failed 2 tests of 4.
koha_1       |
koha_1       | #   Failed test 'get_savings tests'
koha_1       | #   at t/db_dependent/Koha/Patron.t line 1388.
koha_1       | # Looks like you failed 1 test of 20.
koha_1       | [00:07:57] t/db_dependent/Koha/Patron.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>