koha.git
13 months agoBug 33416: Fix Agreements.ts
Jonathan Druart [Wed, 5 Apr 2023 08:29:01 +0000 (10:29 +0200)]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 216702802567adf67b0768beb6b43ad6b2c62bd8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity...
Caroline Cyr La Rose [Thu, 13 Apr 2023 18:55:25 +0000 (14:55 -0400)]
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt

This patch corrects the HTML markup in order to reunite "Patron
identity" or "Organization identity" for translatability.

To test:
1. Apply patch
2. Update translation files
./misc/translator/translate update xx-XX
3. Check the xx-XX-staff-prog.po file, the line for memberentrygen.tt:275
   should look like

\#: koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:275
\#, c-format
msgid "Organization %sPatron %sidentity"
msgstr "Identité de l'organisme %sIdentité de l'utilisateur %s"

4. Optionally, translate the string, install translation and check the
   page (Patrons > New patron), trying a institutional patron and a
   regular patron
./misc/translator/translate install xx-XX

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 360963c95975ff50f4d84239f2e0360236106bd4)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33447: (QA follow-up) Add comment for flushing cache
Marcel de Rooy [Tue, 18 Apr 2023 11:28:45 +0000 (11:28 +0000)]
Bug 33447: (QA follow-up) Add comment for flushing cache

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1518569eaa0de0eaaf5e92d74dbd3acddc841cfc)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33447: Adjust tests
Nick Clemens [Fri, 7 Apr 2023 21:46:24 +0000 (21:46 +0000)]
Bug 33447: Adjust tests

Signed-off-by: emlam <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 89fb8f31aba8ee43ed42b8963eb6ec843130f8d2)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33447: Add Cache to Biblio->pickup_locations
Nick Clemens [Fri, 7 Apr 2023 21:08:30 +0000 (21:08 +0000)]
Bug 33447: Add Cache to Biblio->pickup_locations

This is going to have the most effect on records with large numbers of items
held by the same library, serial records and the like

To test:
1 - Add 500 items to a biblio by select myltiple copies on the add item page
2 - Place a hold via the API and note response time, I found ~3-5 seconds
3 - Apply patch
4 - Restart all
5 - Place hold using api again
6 - Note improved response time, less than 1/2 a second in my tests

Signed-off-by: emlam <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 55dc8573c709493f52bf7a2c87f82900fa926d1a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements
Jonathan Druart [Tue, 11 Apr 2023 19:39:02 +0000 (21:39 +0200)]
Bug 33491: Fix UI issues in EHoldingsEBSCOPackageAgreements

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a0ec93d84f8b00e7b8b583d9fcbe7a564cba2a42)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33354: Show all form error messages in the warning dialog
Pedro Amorim [Wed, 29 Mar 2023 15:11:43 +0000 (15:11 +0000)]
Bug 33354: Show all form error messages in the warning dialog

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 98adcf957b9f20de9a51373c181c65f55a7ff794)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33354: Add error if related user open but user is missing
Pedro Amorim [Wed, 29 Mar 2023 15:09:37 +0000 (15:09 +0000)]
Bug 33354: Add error if related user open but user is missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 816b1a3e3f36cb110f14dfcd5fcd7f17ebf0b71e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33354: Add 'required' UI elements
Pedro Amorim [Wed, 29 Mar 2023 15:07:25 +0000 (15:07 +0000)]
Bug 33354: Add 'required' UI elements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 823fa8517d095257e603f4293477e601b834d323)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33216: Catch and handle RegisterRequired exceptions for SIP fee paid messages
Kyle Hall [Tue, 14 Mar 2023 11:06:21 +0000 (07:06 -0400)]
Bug 33216: Catch and handle RegisterRequired exceptions for SIP fee paid messages

If registers are being used in Koha, they are required. If a SIP account has no register and a fee paid message is sent, the SIP server crashes and the client never gets a response. It would be much better if Koha would response with 38 response where "payment accepted" is N, and an AF field stating that the SIP account needs to be associated with a register.

Test Plan:
1) Enable UseCashRegisters, set RequireCashRegister to "always require a
   cash register". Do *not* set a cash register for the SIP account you
   will be testing with.
2) Using the SIP cli tester, send a fee paid message for a patron owing
   fees.
3) Note the lack of a SIP response
4) Apply this patch
5) Restart the SIP server
6) Repeat step 2, you should now get a SIP response with the error
   message in it!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0411bf0573708327a9c0271f4d01c2996641bb3f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33402: (follow-up) Move Searchbar_spec.ts
Tomas Cohen Arazi [Wed, 12 Apr 2023 13:54:10 +0000 (10:54 -0300)]
Bug 33402: (follow-up) Move Searchbar_spec.ts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c8c98379536fe6d18fbf4c0108bdfdf4bebee1e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 33402: Move ERM Cypress tests to their own directory
Jonathan Druart [Tue, 4 Apr 2023 11:27:13 +0000 (13:27 +0200)]
Bug 33402: Move ERM Cypress tests to their own directory

We need to move the existing Cypress tests (that are ERM only, t/cypress/integration/*.ts )
to their own subdirectory, eg t/cypress/integration/ERM

Test plan:
Confirm that the cypress tests are still passing after this change:
  perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3143549403defc64f8f55f6e38e2327be45cc38e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 32164: Add link to MARC modification templates from batch record modification...
Owen Leonard [Mon, 13 Feb 2023 19:34:45 +0000 (19:34 +0000)]
Bug 32164: Add link to MARC modification templates from batch record modification page

This patch adds a more visible link from the batch record modification
page in the event that there are no MARC modification templates defined.
The template checks that the user has permission.

The patch also modifies the same message on the MARC modification
templates page so that the interfaces are more unified, and tweaks the
operation of the "New action" button.

To test you should have no MARC modification templates defined.

- Apply the patch and go to Tools -> Batch record modification.
- If you're logged in as a user with permission you should see a message
  dialog containing a button, "Create a new MARC modification template."
- Clicking it should take you to the MARC modification templates page,
  where you'll see a similar message and a button, "Create a new
  template." Clicking this button should trigger a modal form, just like
  clicking the "New template" button in the toolbar should.
- Submit the form to create a new template. You should see message on
  the following page that says "New action." Clicking the button should
  display the entry form, and then clicking "Cancel" should hide the
  form and redisplay the message.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df8aca0252750d8d660007a1d1eeaf1f483a3e84)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 18398: (follow-up) Update POD & Unit tests
Martin Renvoize [Tue, 28 Mar 2023 11:35:05 +0000 (12:35 +0100)]
Bug 18398: (follow-up) Update POD & Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 488e67656ffa3016a32f39eb68c5a3aa7fb8a68e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
13 months agoBug 18398: Update C4::Message enqueue to use $patron->notice_email_address
Martin Renvoize [Fri, 10 Mar 2023 10:02:19 +0000 (10:02 +0000)]
Bug 18398: Update C4::Message enqueue to use $patron->notice_email_address

This patch updates the enque method in C4::Message to expect a
Koha::Patron object in the parameters and then uses that patron object
to select the correct email address for notices as defined by
AutoEmailPrimaryAddress.

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>
(cherry picked from commit f7cfe3a705b4c594e1e9b70c1e7e1ffa0b39a073)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33108: (follow-up) Don't let restart die if ES indexer not running
Nick Clemens [Fri, 3 Mar 2023 15:31:21 +0000 (15:31 +0000)]
Bug 33108: (follow-up) Don't let restart die if ES indexer not running

This fixes the restart action in koha-common to continue with starting
services even if the last service cannot be stopped (because it may not
be running)

This needs a larger fix, to ensure all stopped services return a
warning, for now 'do_stop' simply returns the last success/failure

To test:
1 - Apply patch
2 - reset_all
3 - sudo koha-es-indexer --stop kohadev
4 - restart_all
5 - You are notified that ES indexer was not running
6 - You are notified that soem services could not be stopped
7 - The services are started

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 02392b0c2ba2a43036ee1ecefe08692a76cbf267)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33108: (follow-up) Don't die, only warn if not using ES
Nick Clemens [Thu, 2 Mar 2023 13:44:34 +0000 (13:44 +0000)]
Bug 33108: (follow-up) Don't die, only warn if not using ES

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8e0074609543a46110bbaf786aa760c20531840f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33108: Make init handle koha-es-indexer
Tomas Cohen Arazi [Wed, 1 Mar 2023 19:04:25 +0000 (16:04 -0300)]
Bug 33108: Make init handle koha-es-indexer

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 33108: (follow-up) Fix typo

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 84460798f0b064086cf805549eaca1007c656128)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33108: Teach koha-list filter elasticsearch
Tomas Cohen Arazi [Wed, 1 Mar 2023 18:46:26 +0000 (15:46 -0300)]
Bug 33108: Teach koha-list filter elasticsearch

Signed-off-by: Nick Clemens <nick@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 a4b88d556848585afada1885bda04221792490c6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33108: koha-es-indexer added
Tomas Cohen Arazi [Wed, 1 Mar 2023 13:22:22 +0000 (10:22 -0300)]
Bug 33108: koha-es-indexer added

Signed-off-by: Nick Clemens <nick@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 37d832da31356c057a98aaab649f02b7bdce3f85)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33486: POD fix
Tomas Cohen Arazi [Thu, 13 Apr 2023 14:32:52 +0000 (11:32 -0300)]
Bug 33486: POD fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8fcc61e82eef585ad79220eadcace9c35613580f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process
Nick Clemens [Tue, 11 Apr 2023 13:43:51 +0000 (13:43 +0000)]
Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 42c1059d1dd2821e61010f3f6ea0d8d52a699d05)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 32594: Mark jobs as started and finished
Jonathan Druart [Fri, 17 Mar 2023 14:22:24 +0000 (14:22 +0000)]
Bug 32594: Mark jobs as started and finished

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d8721bbc3687b13cd95abdcb73b3b7f9576e8190)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 32594: (QA follow-up) Fix POD
Tomas Cohen Arazi [Wed, 1 Mar 2023 13:55:03 +0000 (10:55 -0300)]
Bug 32594: (QA follow-up) Fix POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3087d76bd31f59ac437e63d7031b2202cb64e5c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 32594: (QA follow-up) Adjust tests
Tomas Cohen Arazi [Mon, 27 Feb 2023 16:11:54 +0000 (13:11 -0300)]
Bug 32594: (QA follow-up) Adjust tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 66e9bc71e423dea1b54ab397456caf8a3e820cae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 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>
(cherry picked from commit aba2453ad65f8cb4cc9ea609dbf5bb3ed6f241db)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 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>
(cherry picked from commit 4c51596a4b3a514adc4b6eccb3fd2c1fa4660a61)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoRevert "Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process" v22.11.05-1
Martin Renvoize [Wed, 3 May 2023 11:54:39 +0000 (12:54 +0100)]
Revert "Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process"

This reverts commit aa9645f546469c8a11d46af01e4994ec7ecc8119.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoRevert "Bug 33486: POD fix"
Martin Renvoize [Wed, 3 May 2023 11:54:29 +0000 (12:54 +0100)]
Revert "Bug 33486: POD fix"

This reverts commit 7ca40d6cec8457987386b64679b8ca05f04ac5a3.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33648: (bug 32991 follow-up) fix bad resolution conflict
Jonathan Druart [Wed, 3 May 2023 06:46:58 +0000 (08:46 +0200)]
Bug 33648: (bug 32991 follow-up) fix bad resolution conflict

Wrong resolution conflict on AgreementsList.vue in commit
  Bug 32991: Improve our Dialog component

in master
             logged_in_user,
+            setWarning,
+            setMessage,

in 22.11.x

+            logged_in_user,
+            setWarning,
+            setMessage,

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoUpdate release notes for 22.11.05 release v22.11.05
Martin Renvoize [Tue, 2 May 2023 14:58:16 +0000 (15:58 +0100)]
Update release notes for 22.11.05 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoIncrement version for 22.11.05 release
Martin Renvoize [Tue, 2 May 2023 14:17:47 +0000 (15:17 +0100)]
Increment version for 22.11.05 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoFix translations for Koha 22.11.05
Martin Renvoize [Wed, 21 Dec 2022 11:10:57 +0000 (11:10 +0000)]
Fix translations for Koha 22.11.05

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoTranslation updates for Koha 22.11.05
Koha translators [Tue, 2 May 2023 12:14:11 +0000 (09:14 -0300)]
Translation updates for Koha 22.11.05

(cherry picked from commit 37a43043625712d0ada425f9cba5d942e61bb28a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33229: (RMaint follow-up) Remove errant test from bug 31051
Martin Renvoize [Thu, 27 Apr 2023 12:29:03 +0000 (13:29 +0100)]
Bug 33229: (RMaint follow-up) Remove errant test from bug 31051

The backport braught in more than expected in the tests ;P

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
14 months agoBug 33574: Correct pointer for restrict_type.code
Martin Renvoize [Thu, 20 Apr 2023 16:09:50 +0000 (17:09 +0100)]
Bug 33574: Correct pointer for restrict_type.code

Somehow this was missed during QA of bug 31095.. likely during a rebase.

Test plan:
1) Check that manual restriction types are now saved.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1879136a2e85f756a19a79fe86e10e22bac9b16)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32634: (follow-up) Restructure page headings
Owen Leonard [Wed, 18 Jan 2023 13:12:08 +0000 (13:12 +0000)]
Bug 32634: (follow-up) Restructure page headings

An error in template logic is preventing the page's h1 from displaying.
Rather than fixing this I have changed the h1 to display a generic
"Transaction details" h1. The h2 shows the transaction type (credit or
debit).

The h2 is now inside the .page-section.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Checked all the places mentioned in the commit message, and they
all have .page-section now.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 32e5fa26e4965a425cd6ed96cb591e1a2164fe6b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32634: Add 'page-section' to various pages
Owen Leonard [Fri, 13 Jan 2023 20:15:13 +0000 (20:15 +0000)]
Bug 32634: Add 'page-section' to various pages

This patch adds a "page-section" container div around the main section
of various pages which lack it.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

Apply the patch and view the following pages to confirm that the main
content is contained in a white box:

- Locate a patron who has one or more account transactions.
  - Go to the Accounting tab -> Transactions. Click "Details" on one of
      the lines.
    - The "Details of debit" and "History" sections should be wrapped in
      .page-section.
- Go to Tools -> Patron card creator -> Manage -> Batches
  - If there is not a list of batches you will need to create at least
    one to see the page-section container.
- Go to Reports -> View dictionary.
  - If necessary, add a definition.
  - The "Current terms" table should be wrapped in .page-section.
- Go to Lists and view the contents of a list with one or more titles on
  it. The table of titles should be wrapped in .page-section.
- Go to Circulation -> Upload offline circulation file (.koc)
  - Upload a .koc file and click the "Add to offline circulation queue."
  - On the confirmation page the "Your file was uploaded" message should
    be wrapped in .page-section.
  - Click "View pending offline circulation actions"
    - The list of pending actions should be wrapped in .page-section

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4573e5ff917f4e9df6becb2e7f70514a26ebde95)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32954: Standardize action fieldsets in rotating collections, suggestions, tools
Owen Leonard [Wed, 1 Feb 2023 11:59:53 +0000 (11:59 +0000)]
Bug 32954: Standardize action fieldsets in rotating collections, suggestions, tools

As per Bug 32744: Fieldsets with the class "action" should be placed
outside of the fieldset containing the main body of the form. This
report covers a few templates in rotating collections, suggestions, and
tools.

To test, apply the patch and check the following pages to confirm that
changes to form structure look correct:

- Tools -> Rotating collections. Create a collection if necessary, then
  click "Action" -> "Manage items." Check the form on the manage items
  page.
- Suggestions -> Sidebar filter. Check that different sets of filters
  expand and collapse correctly.
- Tools -> Batch item modification (initial form)
- Tools -> Inventory (initial form)
- Cataloging -> Stage records for import (initial form)
- Tools -> Upload (upload and search forms)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 508ad15cb789b4b190f8172fcf58265b8a957a66)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron...
Nick Clemens [Mon, 17 Apr 2023 12:52:34 +0000 (12:52 +0000)]
Bug 33229: (follow-up) Adjust tests to set anonymous patron before setting patron privacy to 2

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cf83ec866c5abc7ec9ff2752a24cf9cfb38e1523)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33229: Remove unecessary txn
Jonathan Druart [Wed, 22 Mar 2023 13:34:28 +0000 (14:34 +0100)]
Bug 33229: Remove unecessary txn

We don't need a transaction here.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 942b07a0cecc9f63d956beafe55027b02d7b9aa3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33229: Clear patron reading history when privacy is set to never
Nick Clemens [Tue, 14 Mar 2023 20:02:10 +0000 (20:02 +0000)]
Bug 33229: Clear patron reading history when privacy is set to never

This patch adds a check to patron store routine. When privacy is changed
to 'Never' we should immediately clear their history

To test:
1 - Set system preferences:
   AnonymousPatron - to a valid borrowernumber
   OPACPrivacy - Allow
2 - Checkout some items to a patron with priacy set to default, return them
3 - Log in to opac as patron
4 - Confirm you can see your history
5 - Change history to Never
6 - Confirm history still viewable
7 - Apply patch, restart all
8 - Set privacy to Default
9 - Confirm you can still see history, not deleted when not set as Never
10 - Set privacy to 'Never'
11 - Confirm history is anonymized

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 7c45fc8bdfefb27a1d6f214c2906190bca1d628a)

14 months agoBug 33238: Fix bad suggestions query (Bug 29886 follow-up)
Janusz Kaczmarek [Wed, 15 Mar 2023 19:25:53 +0000 (20:25 +0100)]
Bug 33238: Fix bad suggestions query (Bug 29886 follow-up)

With IndependentBranches Koha explodes with Error 500 when a non
superlibrarian tries to add to basket from suggestions.  In errorlog you
would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Column 'branchcode' in where clause is
ambiguous".

Test plan:
==========
1. Have a Koha instance with IndependentBranches, some accepted
   suggestions, and a vendor defined.
2. Be a non superlibrarian librarian with permissions to
   manage acquisitions.
3. Create a new basket and try to add an item to the basket
   "From a suggestion".
4. Koha would generate error 500.
5. Apply the patch.
6. Try to add an item to the basket "From a suggestion".
7. You should succeed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68b2f29d483290d5dfd859dce9b9fe7a387f3ab1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33181: Use template wrapper for tabs on record merge pages
Owen Leonard [Thu, 9 Mar 2023 15:43:24 +0000 (15:43 +0000)]
Bug 33181: Use template wrapper for tabs on record merge pages

This patch updates the include file which is used by both the
bibliographic and authority recrd merge pages. The markup is updated to
use the new tab WRAPPER directives.

To test, apply the patch and perform a catalog search which will return
more than one record.

 - Select two or more records and choose "Merge records" from the edit
   menu at the top of the search results.
 - On the following page you should see one tab for each record you
   selected from the search results.
 - Clicking each tab should show you the correct bibliographic details.

Perform the same tests from the authority search results page.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f46948ad6387c2d960cb39ed8903a654faf57072)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33187: Use template wrapper for tabs article requests and holds awaiting pickup...
Owen Leonard [Thu, 9 Mar 2023 19:28:47 +0000 (19:28 +0000)]
Bug 33187: Use template wrapper for tabs article requests and holds awaiting pickup pages

This patch updates the article requests management and holds awaiting
pickup templates in the staff interface so that they use the new WRAPPER
directive for building tabs.

To test, apply the patch and make sure the ArticleRequests system
preference is enabled.

- Go to Circulation -> Article requests
- You should see three tabs, "New," "Pending," and "Processing."
- The tabs should look correct and work correctly.
- Go to Circulation -> Holds awaiting pickup
- You should see three tabs, "Holds waiting", "Holds waiting over X
  days," and "Holds with cancellation requests." ("X" is the value in
  the ReservesMaxPickUpDelay system preference)

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8a4e971ad311662033ba7386bc0048040b4db26a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33129: Use template wrapper for breadcrumbs: Administration part 6
Owen Leonard [Fri, 3 Mar 2023 16:01:41 +0000 (16:01 +0000)]
Bug 33129: Use template wrapper for breadcrumbs: Administration part 6

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
 - Search engine configuration (Elasticsearch)
 - Share content with Mana KB
 - Circulation and fine rules
 - SMS cellular providers (SMSSendDriver preference must be set)
 - System preferences -> Local use (list, add, edit, confirm delete)
 - Library transfer limits (Advanced editor)
 - Transport cost matrix
 - Usage statistics
 - Z39.50/SRU servers administration (list, add, edit, both Z39.50 and
   SRU servers)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 99db0a904d32bb0a6acea6b214f7050184d94e06)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33509: Don't show Other holdings when there are no alternate holdings
Katrin Fischer [Wed, 12 Apr 2023 19:58:03 +0000 (19:58 +0000)]
Bug 33509: Don't show Other holdings when there are no alternate holdings

With bug 33509 alternate holdings defined in AlternateHoldingsField
are shown in the staff interface result list. This works greatly
when there are items or when there is are alternate holdings (the
configured field/subfields exist in the record), but not when there
are no items and no alternate holdings.

To test:
* Add 100a to AlternateHoldingsField
* Make a search with some records without items
  Sample data: perl
* Make sure the alternate holdings show when there are no items
  and 100a exists
* Change to 100z
* Verify the result list now shows "Other holdings:" with nothing below
* Apply patch
* Repeat
  * Alternate holdings should still show nicely
  * Without alternate holdings 'no items' is displayed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2ce97da0e77812300bbfaa7fe579732da80364dd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33231: (QA follow-up) Simplify conditional for date display
Nick Clemens [Thu, 13 Apr 2023 16:27:57 +0000 (16:27 +0000)]
Bug 33231: (QA follow-up) Simplify conditional for date display

This patch simply checks if we have a value for copyrighydate and
displays publicationyear if not. Even if copyrightdate is requested (MARC21)
but isn't populated, the publicatoinyear won't replace it because we
haven't transformed that field.

I think this read a bit easier, but RM can weigh in

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f08d5b53256f5e5db309657a7c3c48b274e379e2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33231: (Bug 30813 follow-up) No publication date nor edition statements in Z39...
Janusz Kaczmarek [Tue, 14 Mar 2023 21:30:31 +0000 (22:30 +0100)]
Bug 33231: (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results

After executing Z39.50 search, the result table is not populated
with publication dates.  This is the result of code refactoring
made by Bug 30813.  The removed function _add_rowdata treated
in special way the publication date putting it in $row in under
special, non MARC variant dependent key 'date'--since
the z3950_search.tt looks under breeding_loo.date.

Same effect (no data in the result table) with edition statement.
Reason: editionstatement coming from TransformMarcToKoha vs edition
expected by z3950_search.tt.

Test plan:
==========
1. Have a Koha instance with some Z39.50 servers defined.
2. In Cataloging, perform a Z39.50 search for any term.
3. In the result table you would not get the publication dates nor
   edition statement (if present in the record).
4. Apply the patch.
5. Repeat the search.
6. You should see the publication dates (according to the current
   mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield)
   and edition statements from the records found.

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 7849a7e75f3df51b362f84e083899c99781feb58)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 31695: Type standard number is missing field ci_raw in field_config.yaml
Fridolin Somers [Wed, 5 Oct 2022 20:21:14 +0000 (10:21 -1000)]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) In the staff interface, go to Administration, and search for SearchEngine
2) Make sure that the SearchEngine preference is set to Elasticsearch and save
3) Return to Administration and select "Search engine configuration"
4) Change the type of "Heading-Main" to "Std. Number" and save
5) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
6) Go to the main staff page and select Authorities
7) Search for a heading (e.g. "A Dual-language book")
=> Result is found with or without patch
8) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch
9) Apply the patch
10) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
11) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 106adb320ca0c3dbee3b43cf0afff7b41bb67a96)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32956: Use template wrapper for HTML customizations tabs
Owen Leonard [Wed, 8 Feb 2023 17:46:48 +0000 (17:46 +0000)]
Bug 32956: Use template wrapper for HTML customizations tabs

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

- Apply the patch and go to Tools -> HTML customizations.
- Create or edit an entry.
- 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.

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc44f6e8ecd7decacb44bc3b18ba749a14503e53)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32955: Standardize structure around action fieldsets in various templates
Owen Leonard [Wed, 1 Feb 2023 11:59:09 +0000 (11:59 +0000)]
Bug 32955: Standardize structure around action fieldsets in various templates

This patch updates various templates so that fieldsets with the
"action" class are placed outside the form's main fieldset.

To test, apply the patch and check the following pages to confirm that
changes to form structure look correct:

- Cataloging -> Quick spine label creator
- Patrons -> Patron details -> Files
- Patrons -> Patron details -> Housebound
- Circulation -> Upload offline circulation file
- Tools -> Patron card creator -> Manage -> Images
- Point of sale -> Transaction history -> "Older transactions" form

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 790ac29bd37e108a732fc6273a98ff24e2015e68)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 31722: Fixed EDIFACT message to only display if EDIFACT is turned on
Philip Orr [Thu, 30 Mar 2023 10:09:32 +0000 (10:09 +0000)]
Bug 31722: Fixed EDIFACT message to only display if EDIFACT is turned on

This patch makes a small change to the display of the note
"No EDIFACT configuration for..." on the basket group page to
only display if the system preference EDIFACT is set to "Enable".

To Test:
1. apply patch
2. navigate to a vendor over Acquisitions -> Vendor e.g. My Vendor
3. create a basket group (doesn't have to have any baskets, an empty one will do)
4. close the basket group
5. set system preference "EDIFACT" to "Enable"
6. navigate to Administration -> EDI Accounts and make sure the vendor doesn't have
   an EDI account configured
7. navigate to your vendor's closed basket groups
   over Acquisitions -> Vendor -> Basket groups (left panel) -> Tab "Closed"
8. you should see a message "No EDIFACT configuration for (name of vendor)" in the
   Action column
9. set system preference "EDIFACT" to "Disable"
10. go back to your vendor's closed basket groups
11. you shouldn't see the message "No EDIFACT configuration for (name of vendor)"

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2626d8a07ff4a39c2e47b88b1ab853c68d114f10)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33375: Quote reserved keyword 'rank' in advanced editor
David Cook [Fri, 31 Mar 2023 00:55:56 +0000 (00:55 +0000)]
Bug 33375: Quote reserved keyword 'rank' in advanced editor

This change quotes the 'rank' keyword in the advanced editor,
so that it doesn't cause fatal crashes when using MySQL 8

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Enable advanced editor
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EnableAdvancedCatalogingEditor
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl#new/
3. Click on "Advanced" on the left nav
4. Note that "LIBRARY OF CONGRESS" is ordered before "NATIONAL LIBRARY OF FRANCE"
5. Rejoice!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 99f8273673b7e2189fff5846bdeacff70e0a48ed)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33088: Remove background-job-progressbar.js in batch_record_modification.tt
Fridolin Somers [Sat, 18 Mar 2023 03:08:56 +0000 (17:08 -1000)]
Bug 33088: Remove background-job-progressbar.js in batch_record_modification.tt

It must be removed, we don't need it since bug 22417

Test plan :
Play with batch record modification and check there is no JS error

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 668252503d3893391d0399537fd6f787cce507c4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32127: Add unit test
Fridolin Somers [Wed, 29 Mar 2023 08:52:08 +0000 (22:52 -1000)]
Bug 32127: Add unit test

Run prove t/db_dependent/Template/Plugin/Categories.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c101afb0a036a460b1a585574151de80e2afd43a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32127: Sort by description in Koha::Template::Plugin::Categories
Fridolin Somers [Mon, 7 Nov 2022 21:42:49 +0000 (11:42 -1000)]
Bug 32127: Sort by description in Koha::Template::Plugin::Categories

Like in Koha::Template::Plugin::Branches, methods in
Koha::Template::Plugin::Categories must return categories sorted by
description.

Test plan :
1) Create a new patron category with code ZZZ and description AAAAAA
2) Go to patron search /cgi-bin/koha/members/members-home.pl
3) Look at filter by category :
=> Without patch the value AAAAAA is last
=> With patch the value AAAAAA is first
4) Click on 'New patron'
=> Without patch the value AAAAAA is last
=> With patch the value AAAAAA is first

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4f37c5bc7710619f297c356a7b19aa1767de7071)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33345: On-site checkout checkbox does not work since issue date using flatpickr
Fridolin Somers [Mon, 27 Mar 2023 21:29:01 +0000 (11:29 -1000)]
Bug 33345: On-site checkout checkbox does not work since issue date using flatpickr

Since Bug 30718, date due uses flatpickr.
The JavaScript code setting due date via on-site checkout checkbox needs to be adapted.
Sort of like Bug 30717.

This patch renames the variable sent to template
'today_due_date_and_time' to avoid confusion with variable 'todaysdate'
used in other templates.

Test plan :
1) Enable system preference 'OnSiteCheckouts'
2) Go to a patron circulation page /cgi-bin/koha/circ/circulation.pl
3) Click on settings icon inside barcode input
=> Check due date input is empty
4) Click on 'On-site checkout'
=> Check due date input is filled with today date at 23:59
5) Fill barcode input and do check-out
6) Check due date is correct

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dae97fd2b70da860cced08e572a402ce477b5285)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32418: Remove useless statement
Jonathan Druart [Fri, 14 Apr 2023 06:24:07 +0000 (08:24 +0200)]
Bug 32418: Remove useless statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74dd4dc28157c4848539ae2a334af1f89d33a43d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32418: (follow-up) Remove jQuery, Fix typos in url, add biblio as template param
Paul Derscheid [Thu, 13 Apr 2023 09:27:31 +0000 (09:27 +0000)]
Bug 32418: (follow-up) Remove jQuery, Fix typos in url, add biblio as template param

To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

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 40d014ec45a581e432fae6a30c9d048b342c987e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl
Paul Derscheid [Mon, 20 Feb 2023 10:06:32 +0000 (11:06 +0100)]
Bug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl

Check whether the current op is edititem or dupeitem and if so check
whether the itemnumber supplied as a query param actually exists.

If it doesn't, redirect to the additem op and hide all UI elements except
for a dialog that gives options to add a new item to the record or to
view the records holdings.

This behaviour was adapted from the addbiblio view, as suggested by
Fridolin.

To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

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 ef803755f5892ab811a65a55fbb77d7d3d66f551)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33485: (bug 32939 follow-up) Fix title endpoint
Jonathan Druart [Tue, 11 Apr 2023 12:57:47 +0000 (14:57 +0200)]
Bug 33485: (bug 32939 follow-up) Fix title endpoint

The change is obvious, we shoulf call the title endpoint, not package.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a509d341826f9057edc29480ee425c9230b10081)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32716: larger proxy_buffer_size in NGINX example config
Galen Charlton [Tue, 24 Jan 2023 19:10:32 +0000 (14:10 -0500)]
Bug 32716: larger proxy_buffer_size in NGINX example config

This patch updates the example NGINX config to increase the
proxy_buffer_size to 16k. The default value of 4k (on some platforms)
has empirically been shown to be a bit too small for the Link
headers emitted by the REST API when pagination is requested.

To test
-------
[1] Set up a Koha system with NGINX as a reverse proxy in
    front of it (either in front of Apache or in front of
    of Starman).
[2] Perform a patron search that returns at least two pages
    of results and navigate to the second page.
[3] Note that the navigation can fail with a 502 HTTP error
    and an "upstream sent too big header while reading response
    header from upstream" error in the NGINX log.

    The problem is most likely when the pagesize of the server
    running NGINX is 4096 bytes.
[4] Update the NGINX configuration per this patch and restart
    NGINX.
[5] This time, repeating step 2 should work.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Brendan Gallagher <brendan@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 a29964778a44ef6f7f4a8400df4ef12ab80f5ed6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33481: Pass content-type when requesting EBSCO's webservice
Jonathan Druart [Tue, 11 Apr 2023 11:37:14 +0000 (13:37 +0200)]
Bug 33481: Pass content-type when requesting EBSCO's webservice

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1b4481fe474053df47d6779727f95a553631856)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33289: Add API client class to interact with svc/config/systempreferences
Jonathan Druart [Tue, 21 Mar 2023 08:00:10 +0000 (09:00 +0100)]
Bug 33289: Add API client class to interact with svc/config/systempreferences

On bug 30708 we will need to modify sysprefs from the UI (Vue app), it
could be useful for other developments as well and so it is moved on its
own bug report.

Test plan:
It can be tested independently of bug 30708 using the following code:

const client = APIClient.sysprefs
client.sysprefs
    .update(
        "CardnumberLength",
        "42"
    )

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9597b88ed259470f2dc5d0a2be206cad6e0f3605)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33154: Tab WRAPPER follow-up: label text must be translatable
Owen Leonard [Tue, 7 Mar 2023 11:15:07 +0000 (11:15 +0000)]
Bug 33154: Tab WRAPPER follow-up: label text must be translatable

This patch updates templates which have already been updated to use the
new tab WRAPPER system for generating tab markup. Templates are changed
so that tab label strings are wrapped in <span> to make them
translatable.

The html_helpers include file is also updated so that the example code
in comments shows the right pattern (the breadcrumb example is similarly
corrected).

To test apply the patch and run the translation script to update the .po
files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files for some of the lines modified in the patch:

 - koha-tmpl/intranet-tmpl/prog/en/modules/about.tt:31
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt:69
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt:330
 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt:141
 - koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt:118
 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt:259
 - koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:455
 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt:98

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca80bf67cea41613248d8e932e4dbdb5b232b5ca)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33486: POD fix
Tomas Cohen Arazi [Thu, 13 Apr 2023 14:32:52 +0000 (11:32 -0300)]
Bug 33486: POD fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8fcc61e82eef585ad79220eadcace9c35613580f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process
Nick Clemens [Tue, 11 Apr 2023 13:43:51 +0000 (13:43 +0000)]
Bug 33486: Remove Koha::BackgroundJob::UpdateElasticIndex->process

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 42c1059d1dd2821e61010f3f6ea0d8d52a699d05)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33077: Improve ease of translating template title tags
Owen Leonard [Mon, 27 Feb 2023 11:33:22 +0000 (11:33 +0000)]
Bug 33077: Improve ease of translating template title tags

This patch uses the cities administration page as a proof-of-concept for
using the [% t() %] construction to wrap translatable string in template
<title> tags. This should result in a significant improvement in
translatability.

To test, apply the patch and run the translation script to update the
.po files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:

 - In fr-FR-staff-prog.po you should no longer see a reference to
   cities.tt line 6, "#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt:6"
 - In fr-FR-messages.po you should see several strings which have been
   pulled individually from the <title> tag:
   - cities.tt:9, msgid "Modify city"
   - cities.tt:11, msgid "New city"
   - cities.tt:15, msgid "Confirm deletion of city"
   - cities.tt:19, msgid "Administration", msgid "Cities", msgid "Koha",
     and msgid "Administration"

Translate the strings in fr-FR-messages.po and install the updated
translation:

perl misc/translator/translate install fr-FR

Swith to the update language in the staff interface and confirm that the
Cities page title is translated correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7020b90f305fbdf584b57f61e39d259d3f9e0d22)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33323: Select button in patron search modal is not translatable
Owen Leonard [Thu, 23 Mar 2023 17:42:46 +0000 (17:42 +0000)]
Bug 33323: Select button in patron search modal is not translatable

This patch modifies the JS which generates some markup during some kinds
of patron searches so that the strings labeling submit buttons can be
translated.

To test, apply the patch and go to Administration -> Funds.
- Add a fund or edit an existing one.
- Test the "Select owner" link
  - A popup should appear, and after performing a patron search which
    returns results you should see a "Select" column in the last column
    of the patron search results table.
- Test the "Add users" link
  - Perform the same test as above. The button in the last column should
    be "Add"
- The template accommodates two other cases, "Edit" and "Check out" but
  I was unable to find a place where they were used.

- To test translatability, run the translation tool for any language,
  e.g.

  perl misc/translator/translate update fr-FR

  Search the regenerated po file (in this example
  misc/translator/po/fr-FR-staff-prog.po) to confirm that the
  correct strings are there: "Select", "Add", "Edit, and "Check out"
  should each have entries for line 234, e.g.

  koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc:234
  c-format
  msgid "Select"
  msgstr "Sélectionner"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9d736ba74aadbc409597b58608ae33120efb368)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33265: Clean up serial links on serial edit page
Lucas Gass [Fri, 17 Mar 2023 20:47:09 +0000 (20:47 +0000)]
Bug 33265: Clean up serial links on serial edit page

To test:
1. Reviece a serial
2. Notice the unstyled links:
    * Serial collection #1
    * Subscription #1
    * Show biblio
3. Apply pacth
4. The links should now be styled.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c5f3312eafd5aa02638b812882e249e794271b36)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33261: Format dates in subscription_issues table
Lucas Gass [Fri, 17 Mar 2023 14:30:37 +0000 (14:30 +0000)]
Bug 33261: Format dates in subscription_issues table

To test:
* Add a subscription
* Receive some issues
* Go to the subscription detail page, issues tab
* Verify the dates there display as YYYY-MM-DD
* Change DateFormat system preference setting, nothing changes.
* Apply patch
* Date should now be formatted in the way specified in the DateFormat system preference

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7574626f2c33fb22f1c2467d364842edf4217195)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33414: Add the data-order class
Jonathan Druart [Wed, 5 Apr 2023 07:11:41 +0000 (09:11 +0200)]
Bug 33414: Add the data-order class

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 bb4e59f888e5c1e292dfa37c65b644b3993736c6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33414: Fix dates display in orders by fund
Fridolin Somers [Wed, 5 Apr 2023 02:55:49 +0000 (16:55 -1000)]
Bug 33414: Fix dates display in orders by fund

Since Bug 30718, dates are displayed in ISO format in orders by fund.
It removed dates formating in perl, this must be added in template.

Test plan :
1) Create some fresh orders on a fund F1
2) Go to Acquisitions > Orders by fund
3) Select fund F1 and 'To screen into the browser'
4) Submit
5) Check you see a formatted date in 'Entry date' column
6) Recieve some order from fund F1
Repeat 2 to 4
7) Check you see formatted date in 'Date received' column

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 2ea8bf53834e9bfcf5962efe81ebf4e7515965cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33332: Fix formatting of TT comments to improve translations
Owen Leonard [Fri, 24 Mar 2023 12:52:28 +0000 (12:52 +0000)]
Bug 33332: Fix formatting of TT comments to improve translations

This patch reformats some Template::Toolkit multi-line comments in
html_helpers.inc so that each line is commented separately. This seems
to prevent the translation tool from putting the comments into the po
file.

To test, apply the patch and confirm that pages which use the
breadcrumbs and tabs WRAPPER directives still work correctly:

- Breadcrumbs: staff client home page, about page, error page.
- Tabs: Administration -> Library transfer limits or circulation alerts.
- To test translatability, run the translation tool for any language,
  e.g.

  perl misc/translator/translate update fr-FR

Search the regenerated po file (in this example
misc/translator/po/fr-FR-staff-prog.po) to confirm that there is no
instance of something like "[%%# BOOTSTRAP BREADCRUMBS WRAPPER USAGE"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 95aaf4269601592baf660ecdd3b90ec12590250c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33367: Remove tmp/modified_authorities/README.txt
Jonathan Druart [Thu, 30 Mar 2023 07:19:40 +0000 (09:19 +0200)]
Bug 33367: Remove tmp/modified_authorities/README.txt

This does not seem to be useful anymore.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c3a40d3801d8f70fa865e22962f7ae7e9cc18bee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32301: Fix default search sorting in advanced search when not editing a search
Nick Clemens [Fri, 17 Mar 2023 11:20:31 +0000 (11:20 +0000)]
Bug 32301: Fix default search sorting in advanced search when not editing a search

Bug 22605 changed the sorting to expect the passed parameter from the
previous search, this broke default when the search page was loaded
fresh.

We should simply fallback from the edited search to the default if it is
not set

To test:
1) Go to staff client
2) Go to Advanced Search
3) Notice the default Sort By value is "Relevance"
4) Go to system preferences
5) Go to "defaultSortField"
6) Change the value of the system preference
7) Go back to Advanced Search and refresh the page
8) Notice that there are no changes, the default Sort By is still
"Relevance"
9) Apply patch
10) Notice that changing the system preference now changes the default
Sort By in Advanced Search
11) Perform a search, change the sorting, then edit the search
12) Confirm the correct sorting from the search is preserved

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3489cdca1fd77272deca0ff6bda90e1cc40dddb1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 32800: Don't embed items for deleted records
Nick Clemens [Thu, 2 Feb 2023 15:58:10 +0000 (15:58 +0000)]
Bug 32800: Don't embed items for deleted records

To test:
1 - Delete a biblio
2 - perl /kohadevbox/koha/misc/migration_tools/build_oai_sets.pl -v -i -r
3 - Error:
    Can't call method "items" on an undefined value at /kohadevbox/koha/Koha/Biblio/Metadata.pm line 163.
4 - Apply patch
5 - Repeat
6 - Success!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37bf88d252c7efda0301b8f3624dcf02ebb7e187)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
14 months agoBug 33111: (QA follow-up) Add more context to breadcrumb parts for easier translation
Katrin Fischer [Sat, 8 Apr 2023 22:46:26 +0000 (22:46 +0000)]
Bug 33111: (QA follow-up) Add more context to breadcrumb parts for easier translation

With the new wrappers we will translate every part of the
breadcrumb as a separate string and only once. So single words
like 'new' can be problematic in translation.

This changes:
* New > New identity provider
* Edit > Edit identity provider
* (Item search fields) <name of search field> > Edit <name of search field>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 27474b9e9e4d38e5353cfaccc3d363e57005fc0e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33111: Use template wrapper for breadcrumbs: Administration part 4
Owen Leonard [Fri, 6 Jan 2023 16:43:38 +0000 (16:43 +0000)]
Bug 33111: Use template wrapper for breadcrumbs: Administration part 4

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
  - Library EANs (list, new, edit, confirm delete)
  - Identity providers (list, new, edit)
    - Manage domains (list, new, edit)
  - Item circulation alerts
  - Item search fields (list, new, edit)
  - Item types (list, new, edit, delete confirm)
  - Koha to MARC mapping
  - Library groups
  - MARC frameworks ->
    -> Actions -> MARC structure (list, new, edit, delete confirm)
       -> View, edit, and delete confirm
  - Record matching rules (list, new, edit, delete confirm)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c5261f4f1fce30affc790142aaf9027199a84f0)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33007: Use template wrapper for breadcrumbs: Administration part 2
Owen Leonard [Fri, 6 Jan 2023 15:44:55 +0000 (15:44 +0000)]
Bug 33007: Use template wrapper for breadcrumbs: Administration part 2

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration ->
  - Authorized values
    - New category
    - View category
      - Add authorized value
      - Edit authorized value
 - Authority types
   - New authority type
   - Edit authority type
   - Confirm deletion of authority type
 - Manage jobs
   - Details of job
 - MARC bibliographic framework
   - New framework
   - Edit framework
   - Confirm deletion of framework
 - Library transfer limits
 - Libraries
   - New library
   - Edit library
   - Confirm deletion of library
 - Cash registers
   - New cash register
   - Edit cash register
 - Patron categories
   - New category
   - Edit category
   - Confirm deletion of category
 - MARC bibliographic framework test
 - Classification configuration
   - Modify classification source
   - Add classification source
   - Modify filing rule
   - Add filing rule
   - Modify splitting rule
   - Add splitting rule

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad53b3b538d8763f2a22a76b826e13e893fe7b52)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33006: (follow-up) Add spans for translatability
Owen Leonard [Fri, 24 Feb 2023 13:09:56 +0000 (13:09 +0000)]
Bug 33006: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

This patch also modifies some of the templates to simplify
the logic controlling how different elements of the breadcrumbs are
shown or not.

This patch also modifies another problematic set of strings in
auth_tag_structure.tt outside the breadcrumbs.

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f24771ad2e8009530cc0273562342265a3a9592c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33006: Use template wrapper for breadcrumbs: Administration part 1
Owen Leonard [Sat, 18 Feb 2023 15:54:24 +0000 (15:54 +0000)]
Bug 33006: Use template wrapper for breadcrumbs: Administration part 1

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

Note: The patch includes indentation changes, so ignore whitespace
when viewing the diff.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

Administration
  -> Administration home page
     - Under "Additional parameters"
       -> Additional fields
          -> View, create, edit
       -> Advanced editor shortcuts
       -> Audio alerts
     - Under "Acquisition parameters"
       -> Budgets
          -> Add fund
          -> Close fund
          -> Budget details
             -> Planning
          -> Create, edit, duplicate
     - Under "Catalog"
       -> Authority types -> MARC structure
          -> New, edit, delete
          -> "Actions" -> Subfields
            -> Edit, delete
Acquisitions -> Vendor -> Contracts
  - View, edit, delete

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 695b0aaa618908fc3017077faf3c6d6d13252156)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33130: Use template wrapper for breadcrumbs: Authorities
Owen Leonard [Wed, 1 Mar 2023 20:06:31 +0000 (20:06 +0000)]
Bug 33130: Use template wrapper for breadcrumbs: Authorities

This patch updates several administration templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Authorities home page
  - Authority search results
  - Authority detail
  - Authority add/edit
  - Authority merge

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 61114e032f74a6b688fed2ff49a6140dbeefff75)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33131: Use template wrapper for breadcrumbs: Catalog part 1
Owen Leonard [Fri, 3 Mar 2023 19:13:18 +0000 (19:13 +0000)]
Bug 33131: Use template wrapper for breadcrumbs: Catalog part 1

This patch updates several catalog templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Advanced search
- Bibliographic detail page
- Labeled MARC detail page
- MARC detail page
- ISBD detail page
- Item detail page
- Image detail view (with LocalCoverImages enabled and a custom cover
  added)
- Checkout history
- Item search

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6faf64eb3b0b2cd78a497614d45f543e1c661a33)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33147: Use template wrapper for breadcrumbs: Catalog part 2
Owen Leonard [Mon, 6 Mar 2023 13:23:23 +0000 (13:23 +0000)]
Bug 33147: Use template wrapper for breadcrumbs: Catalog part 2

This patch updates several catalog templates so that they use the new
WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Catalog search results
- Search history (from the user menu in the header)
- Bibliographic detail page -> Rota (must have StockRotation enabled).

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cf9efa3b6a1bf4d830017053bb54d544d3c00ac)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33324: Use template wrapper for tabs: Tools
Owen Leonard [Thu, 23 Mar 2023 16:12:15 +0000 (16:12 +0000)]
Bug 33324: Use template wrapper for tabs: Tools

This patch updates templates in the tools directory so that they use
the new WRAPPER directive to build tabbed navigation.

To test, apply the patch and test each page to confirm that tabs still
work as before:

- Cataloging -> Export
  - This page by default will have two tabs, "Export bibliographic
    records" and "Export authority records." You can edit koha-conf.xml
    to enable two additional options: backup_db_via_tools and
    backup_conf_via_tools
- Tools -> Batch patron modification
  - "By card number" and "By borrowernumber," and "By patron list" if
    you have any patron lists defined.
- Tools -> Overdue notice/status triggers

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa22e9fb485c5a3c77858f6137afcc8a405db214)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33333: Use template wrapper for tabs: SQL reports
Owen Leonard [Thu, 23 Mar 2023 16:45:00 +0000 (16:45 +0000)]
Bug 33333: Use template wrapper for tabs: SQL reports

This patch updates the saved SQL reports template so that it uses the
new WRAPPER directive to build tab markup.

To test, apply the patch and go to Reports -> Use saved. In order to
properly test the patch you should have multiple reports defined with
multiple categories ("Accounts", "Acquisitions", "Catalog", etc.).

Clicking each tab should filter the table of reports correctly.
After navigating away from the page and back to it, your selected tab
should be remembered.

Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6884b73a71cafbe82f4ee8ba19d978781ff72bf7)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33307: Use template wrapper for tabs: Lists
Owen Leonard [Thu, 9 Mar 2023 18:14:04 +0000 (18:14 +0000)]
Bug 33307: Use template wrapper for tabs: Lists

This patch updates the lists template so that it uses the new WRAPPER
directive to build tabbed navigation.

To test, apply the patch and go to the lists page in the staff
interface.

- Confirm that the two tabs, "Your lists" and "Public lists" look
  correct and work correctly.
- Test that the correct tab is selected when you add the "public" or
  "private" parameter to the url:

  /cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1
  /cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4a52bc9a7a600e60b69405c59fb912fc9c74c83e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33294: Use template wrapper for tabs: Checkout history
Owen Leonard [Tue, 21 Mar 2023 16:43:06 +0000 (16:43 +0000)]
Bug 33294: Use template wrapper for tabs: Checkout history

This patch updates the checkout history template so that it uses the new
WRAPPER directive to build tabbed navigation.

In order to make the template logic a little easier to parse I moved the
table of checkouts into its own BLOCK to be used when on-site checkouts
are enabled or disabled.

To test, apply the patch and locate a patron who has a checkout history.

- If you have on-site checkouts enabled you will see three tabs: All,
  Checkouts, and On-site checkouts.
- Each tab should work correctly: The checkouts tab showing only regular
  checkouts, the on-site checkouts tab showing only on-site checkouts.
- If you have on-site checkouts disabled there should be no tabs, the
  table of checkouts should be displayed inside a "page-section" div
  instead.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 84cdc74ba72163495d431ba93682f8fc8c024f1f)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33293: Use template wrapper for tabs: Holds
Owen Leonard [Tue, 21 Mar 2023 16:25:48 +0000 (16:25 +0000)]
Bug 33293: Use template wrapper for tabs: Holds

This patch updates the holds template so that it uses the new WRAPPER
directive to build tabbed navigation.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test, apply the patch and locate a bibliographic record which
can be placed on hold.

- Start the process of placing a hold.
- If you have any patron clubs defined, there should be two tabs:
  Patrons and Clubs. Both should look correct and work correctly.
- If you have no patron clubs you should see only the Patrons tab.

Works as advertised.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d289cc0a3d7ec640513d2749fff255f0567f2631)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33186: Use template wrapper for tabs on search history and advanced search
Owen Leonard [Thu, 9 Mar 2023 18:47:04 +0000 (18:47 +0000)]
Bug 33186: Use template wrapper for tabs on search history and advanced search

This patch updates the search history and advanced search templates in
the staff interface so that they use the new WRAPPER directive for
building tabs.

The patch also makes a minor change to CSS in order to accommodate the
different markup.

To test, apply the patch and rebuild the staff interface CSS.

- Go to the catalog's advanced search page. You should see tabs for each
  of the selections defined in the AdvancedSearchTypes system
  preference.
- The tabs should look correct and work correctly.
- If necessary, enable the EnableSearchHistory system preference.
- Click the logged-in user name in the header menu and choose "Search
  history."
- On this page you should see two tabs, catalog and authority. Both tabs
  should look correct and work correctly.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 78f037382ddb111e707b42d0c1b2c125fff81c1e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33185: Use template wrapper for tabs on authority and biblio MARC details
Owen Leonard [Thu, 9 Mar 2023 17:47:54 +0000 (17:47 +0000)]
Bug 33185: Use template wrapper for tabs on authority and biblio MARC details

This patch updates the MARC detail views of bibliographic and authority
records so that they use the new WRAPPER directives to build tabs.

To test, apply the patch and locate a bibliographic record in the
catalog.

- Click the "MARC" menu item in the left-hand sidebar.
- Confirm that all tabs work correctly.

Perform the same test by going to Authorities and doing a search for
authorities. Clicking one of the results should take you to a
tabbed MARC view.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6230b0817e7cf257c515cb320597ac790eca544)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33001: (follow-up) Add spans for translatability
Owen Leonard [Thu, 23 Feb 2023 22:53:02 +0000 (22:53 +0000)]
Bug 33001: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e2871c2859e2c7453e1175aee7eafc60a5e1937)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2
Owen Leonard [Fri, 6 Jan 2023 11:49:32 +0000 (11:49 +0000)]
Bug 33001: Use template wrapper for breadcrumbs: Acquisitions part 2

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  - Late orders,
    - moddeliverydate.tt
    - modordernotes.tt
    -- These two templates aren't linked to from anywhere, but
       you can navigate directly to:
       http://127.0.0.1:8081/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=X and
       http://127.0.0.1:8081/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=1

  - Order search, order search results
  - Invoice search,
    - Invoice details,
      - Invoice files
  - Vendor -> Basket -> Add to basket ->
    - From a new (empty) record
    - From existing orders (copy)
    - From a subscription

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=33005
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4535efa4aaae5c70ac9d75b4749585db51bcd874)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33005: (QA follow-up) Update breadcrumb when editing a vendor
Katrin Fischer [Sun, 9 Apr 2023 00:26:22 +0000 (00:26 +0000)]
Bug 33005: (QA follow-up) Update breadcrumb when editing a vendor

When editing a vendor the last part of the breadcrumbs read:
Update: <vendor>

This is very unusual, so updated to the standard wording:
Modify <vendor>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 51ceac07dff0508932d80d9d582a60bc26e9709a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33005: (follow-up) Add spans for translatability
Owen Leonard [Fri, 24 Feb 2023 12:44:31 +0000 (12:44 +0000)]
Bug 33005: (follow-up) Add spans for translatability

This patch finds places in the updated breadcrumbs markup where a
translatable string is isolated in a way that makes it hard for the
translation script to find it, and wraps these strings with <span>

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 129a01af5ab0ab11bb0afd13d1117ac7510b29be)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3
Owen Leonard [Fri, 6 Jan 2023 11:50:00 +0000 (11:50 +0000)]
Bug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3

This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  -> All available funds table
     -> Ordered
     -> Spent
  -> Vendor
     -> Vendor details
     -> Uncertain prices
     -> Receive shipments (must have at least one open basket)
        -> If necessary, receive a new shipment. Or click an
           invoice number to reach the "receive orders" page.
           -> Click "Receive" in the table listing baskets.
     -> Basket -> Add to basket
        -> From a suggestion
        -> From an external source

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 21e88a1aec58211011c6a8914e3eb2a85dad3c74)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33382: Use template wrapper for breadcrumbs: Patron clubs
Owen Leonard [Fri, 31 Mar 2023 13:34:54 +0000 (13:34 +0000)]
Bug 33382: Use template wrapper for breadcrumbs: Patron clubs

This patch updates patron club templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Tools ->
  - Patron clubs
    - New club template
    - Edit club template
    - New club
    - Edit club
    - Club enrollments (from the "Actions" menu in the list of clubs)

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 90dfcc7506cbaeaff21692a60dad453454f5ba2c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
14 months agoBug 33373: Use template wrapper for breadcrumbs: Circulation part 3
Owen Leonard [Thu, 30 Mar 2023 19:15:10 +0000 (19:15 +0000)]
Bug 33373: Use template wrapper for breadcrumbs: Circulation part 3

This patch updates several circulation templates so that they use the
new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Circulation ->
  - Article requests -> Article request detail
  - Check in
  - Hold ratios
  - Transfers to send
  - Transfers to receive
  - Holds queue
  - Holds awaiting pickup
  - Set library

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1baeb95a32057d29f0a6eb30e2a6332e613c8385)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>