]> git.koha-community.org Git - koha.git/log
koha.git
19 months agoBug 3150: DBRev 22.12.00.015
Tomas Cohen Arazi [Mon, 27 Mar 2023 10:29:55 +0000 (12:29 +0200)]
Bug 3150: DBRev 22.12.00.015

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: Adapt reporting to skeleton.pl
Tomas Cohen Arazi [Mon, 27 Mar 2023 10:28:19 +0000 (12:28 +0200)]
Bug 3150: Adapt reporting to skeleton.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Tidy scripts
Kyle Hall [Tue, 14 Mar 2023 17:04:14 +0000 (13:04 -0400)]
Bug 3150: (QA follow-up) Tidy scripts

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Don't load unused and deleted tt files
Kyle M Hall [Tue, 14 Mar 2023 17:01:50 +0000 (17:01 +0000)]
Bug 3150: (QA follow-up) Don't load unused and deleted tt files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Remove unused variables
Kyle Hall [Tue, 14 Mar 2023 16:32:22 +0000 (12:32 -0400)]
Bug 3150: (QA follow-up) Remove unused variables

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Make sure host information displays for unlinked records
Katrin Fischer [Tue, 7 Mar 2023 17:51:09 +0000 (17:51 +0000)]
Bug 3150: (follow-up) Make sure host information displays for unlinked records

When the 773 entry is not linked to a record using $w or
Easyanalytics we still want to display the information
about the source/host item in the emails.

To test:
1. Activate the UseControlNumber system preference
2. Search for a record and make sure it has 001 set to some value.
3. Use Edit > Add child record to create an analytical record from this record.
4. Make sure 773$w was filled in and finish by adding any mandatory fields, save.
5. Add this record to your cart. Also add a 773$g with the pages or similar.
6. Create another record with 773$t and $g, but without $w.
7. Also add this record to your cart.
8. Add a few other records to the cart.
9. Host item information (In: ) should display for all entries with 773 in the record.

This also makes use of the biblio-title include to display the
different parts of the title (245$abnp), if the record is linked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Make subs to get host/related parts for notices
Aleisha Amohia [Mon, 27 Feb 2023 00:26:09 +0000 (00:26 +0000)]
Bug 3150: (follow-up) Make subs to get host/related parts for notices

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: Include host item entries in LIST and CART notices
Aleisha Amohia [Mon, 20 Feb 2023 23:17:56 +0000 (23:17 +0000)]
Bug 3150: Include host item entries in LIST and CART notices

Incorporating fixes from Bug 16522

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Improve and fix new notice templates
Katrin Fischer [Fri, 17 Feb 2023 15:55:53 +0000 (15:55 +0000)]
Bug 3150: (follow-up) Improve and fix new notice templates

This fixes several issues found and improves formatting:

* Add missing line breaks <br> where required as we are now using HTML
* Add missing USE statements to show
  * library
  * location
  * Link to the OPAC (Preference was not resolved)
* Make sure there is a comma between library and location
* Make sure Author(s): only displays when there is content after
* The comment field allows multi-line comments, formatting is now preserved

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (follow-up) Send list and cart emails immediately again
Katrin Fischer [Fri, 17 Feb 2023 15:52:58 +0000 (15:52 +0000)]
Bug 3150: (follow-up) Send list and cart emails immediately again

With this patch set the cart and list emails are sent via
the message_queue instead of bypassing it and being sent
immediately. This patch keeps them in message_queue, but
also sends them immediately, restoring the previous behavior.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: (QA follow-up) Remove borrowernumber from EnqueueLetter
Martin Renvoize [Wed, 7 Sep 2022 07:08:07 +0000 (08:08 +0100)]
Bug 3150: (QA follow-up) Remove borrowernumber from EnqueueLetter

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 3150: Move emails for sending cart and list contents to notices
Aleisha Amohia [Mon, 21 Sep 2020 21:30:32 +0000 (09:30 +1200)]
Bug 3150: Move emails for sending cart and list contents to notices

This patch creates notices using Template Toolkit syntax for sending
emails containing cart and list contents.

To test:
1. Apply Bug 27266
2. Run update database and restart services
3. In the staff client, add multiple items to your cart and to a list
4. Go to your cart and click Send to email the contents
5. Add an email and a comment and click Send
6. Confirm the information shown in the success message is correct
7. In your terminal, log into the database. View the message queue ( i.e. select * from message_queue; ). Confirm that your email has been queued and the content is all correct. Confirm the cart contents has been included as an attachment.
8. Go to your list and click Send list to email the contents
9. Repeat steps 5-7
10. Log into the OPAC
11. Add multiple items to your cart and to a list
12. Repeat steps 4-9
13. By the end, you should have four emails in your message queue. All
of the data about the items should be correct, they should all have
attachments, and be addressed to the correct email address.

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 14251: Add weasyprint dependency
Tomas Cohen Arazi [Wed, 28 Dec 2022 14:18:26 +0000 (11:18 -0300)]
Bug 14251: Add weasyprint dependency

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
19 months agoBug 14251: Add warning in about.pl for missing weasyprint
Tomas Cohen Arazi [Fri, 3 Feb 2023 18:18:13 +0000 (15:18 -0300)]
Bug 14251: Add warning in about.pl for missing weasyprint

To test:
1. Have weasyprint installed
2. Go to the About > System information page
=> SUCCESS: No warning about weasyprint
3. Uninstall weasyprint
4. Repeat 2
=> SUCCESS: A warning is displayed and makes sense
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
19 months agoBug 14251: Allow use of CSS in discharge letter
Tomas Cohen Arazi [Wed, 28 Dec 2022 13:43:16 +0000 (10:43 -0300)]
Bug 14251: Allow use of CSS in discharge letter

The discharge feature relies PDF::FromHTML which explicitly doesn't
handle CSS [1].

This patch makes it use the `weasyprint` command-line tool to generate
the PDF. This tool handles CSS correctly.

To test:
1. Install weasyprint:
   $ apt install weasyprint
2. Add some style to your DISCHARGE letter. I used:
<<today>>
<h1>Discharge confirmation</h1>
<p style="background-color: yellow;"><<branches.branchname>> certifies that the following borrower:<br>
<<borrowers.firstname>> <<borrowers.surname>> (cardnumber: <<borrowers.cardnumber>>)<br>
has returned all items.</p>
3. Have some non-latin chars on the patron name. I picked 'Henry
   Acevedo' and added 'Δοκιμή' as picked from bug 23589. Only to check no
   regressions.
4. Enable the 'UseDischarge' syspref
5. Go to Henry's detail page
6. Choose More > Discharge and Generate the discharge
=> SUCCESS:
   - Style is applied to the PDF
   - Greek characters are displayed correctly
7. Run the tests:
   $ kshell
  k$ prove -v t/db_dependent/Patron/Borrower_Discharge.t
=> SUCCESS: The rewritten tests pass!
8. Remove weasyprint:
   $ apt remove weasyprint
9. Repeat 7
=> SUCCESS: Tests pass, relevant test is skipped because of missing
            weasyprint
10. Sign off :-D

[1] https://metacpan.org/pod/PDF::FromHTML#CAVEATS

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>
19 months agoBug 32945: (QA follow-up) Fix capitalization of id in even more places
Katrin Fischer [Thu, 23 Feb 2023 22:31:09 +0000 (22:31 +0000)]
Bug 32945: (QA follow-up) Fix capitalization of id in even more places

This fixes additional strings pointed out by QA.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32945: Fix capitalization of id in more places
Katrin Fischer [Fri, 10 Feb 2023 20:49:19 +0000 (21:49 +0100)]
Bug 32945: Fix capitalization of id in more places

id should be spelled ID, ids should be IDs as it's
an abbreviation according to:

https://www.oxfordlearnersdictionaries.com/definition/english/identification

To test:
* Some of these are hard to make happen or require specific
  data, easiest will be to review the patch itself closely.

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>
19 months agoBug 32969: (follow-up) Remove obsolete inline CSS
Owen Leonard [Thu, 23 Feb 2023 20:36:38 +0000 (20:36 +0000)]
Bug 32969: (follow-up) Remove obsolete inline CSS

A couple of templates have some inline CSS intended to style jQueryUI
tabs. These instances can be removed:

- opac-readingrecord.tt: Tabs have been replaced with Bootstrap.
- opac-idref.tt: There doens't appear to be any tab-related markup in
  the template at all.

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>
19 months agoBug 32969: Remove references to jQueryUI assets and style in the OPAC
Owen Leonard [Wed, 15 Feb 2023 15:36:23 +0000 (15:36 +0000)]
Bug 32969: Remove references to jQueryUI assets and style in the OPAC

This patch removes the jQueryUI assets from Bootstrap OPAC files and
removes the links to those assets from the templates. References in CSS
to jQueryUI-related elements are also removed.

To test, apply the patch and rebuild the OPAC CSS.

Test various pages in the OPAC to confirm that there are no visible
changes. The browser console should not warn of missing files.

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>
19 months agoBug 33278: Correct JS for activating default tab on various pages
Owen Leonard [Mon, 20 Mar 2023 15:43:39 +0000 (15:43 +0000)]
Bug 33278: Correct JS for activating default tab on various pages

The conversion of the header search tabs to Bootstrap resulted in a bug
on several staff interface pages: The first tab isn't selected by
default. The jQuery selector isn't specific enough.

The patch also corrects a template error which was introduced to
merge-record.inc by Bug 32683.

To test, apply the patch and test the following pages to confirm that
the first tab on each page is selected by default:

- Catalog -> Advanced search
- Catalog -> MARC details
- Catalog -> Search results -> Merge
- Administration -> Authorized values -> Edit
- Administratoin -> Library transfer limits
- Administration -> Item types -> Edit
- Authorities -> Authority details
- Authorities -> Search -> Merge

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>
19 months agoBug 33198: Don't calculate pickup locations per bib unless placing multiple holds
Nick Clemens [Fri, 10 Mar 2023 18:44:21 +0000 (18:44 +0000)]
Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds

For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32883: (QA follow-up) Adjust ordering for pickups
Nick Clemens [Tue, 14 Mar 2023 13:04:35 +0000 (13:04 +0000)]
Bug 32883: (QA follow-up) Adjust ordering for pickups

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32883: Correct cubside pickups ordering
Jonathan Druart [Mon, 6 Feb 2023 15:48:54 +0000 (16:48 +0100)]
Bug 32883: Correct cubside pickups ordering

They are displayed by date of creation, it's not what we want for "to be
staged" for instance, where it needs to be ordered by date/time of
scheduled pickup.

Test plan:
Create several curbside pickups, to have some in the different tabs
Confirm that the order is the one you expect.
=> to be staged ordered by pickup date/time
=> stage and ready ordered by pickup date/time
=> patron is outside ordered by arrival date/time
=> delivered today ordered by *desc* delivered date/time

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>
19 months agoBug 30966: Record Overlay Rules - can't use Z39.50 filter
Johanna Raisa [Fri, 29 Jul 2022 05:37:50 +0000 (08:37 +0300)]
Bug 30966: Record Overlay Rules - can't use Z39.50 filter

This patch fixes overlay rules on z39.50 import

Test plan:
1) Create protection overlay rule to some fields for z39.50.
2) Import a record via z39.50.
3) See that the protected fields are replaced on the editor.
4) Apply the patch.
5) Import a record again.
6) See that the protected fields are in place on the editor.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33309: Index items after renewal transaction completes
Nick Clemens [Wed, 22 Mar 2023 19:12:01 +0000 (19:12 +0000)]
Bug 33309: Index items after renewal transaction completes

This patch ensures a record is indexed only after the renewal transaction
has completed successfully. Otherwise the job cannot be found by the background process
worker, becaue it was not yet in the DB

To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Issue an item to a patron and renew it
4 - Note error in es-indexer-output.log like:
    [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Renew again
7  There should be no error
8 - Search for the record and confirm items info displays correctly
9 - View the background jobs in admin, confirm the most recent job has completed

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33137: Make column names match
Lucas Gass [Thu, 9 Mar 2023 13:17:05 +0000 (13:17 +0000)]
Bug 33137: Make column names match

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33137: Add call number to pay-fines-table and table settings
Lucas Gass [Wed, 8 Mar 2023 16:40:24 +0000 (16:40 +0000)]
Bug 33137: Add call number to pay-fines-table and table settings

To test:
1. Apply patch and restart_all
2. From a patron's Accounting tab add some invoices that are related to an item.
3. From the 'Make a payemnt' notice the new Call number column.
4. Using Table settings, make sure you can properly hide the column.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33137: Add Home library to pay-fines-table and table settings
Lucas Gass [Wed, 8 Mar 2023 16:24:26 +0000 (16:24 +0000)]
Bug 33137: Add Home library to pay-fines-table and table settings

To test:
1. Apply patch and restart_All
2. From a patron's Accounting tab add some invoices that are related to an item.
3. From the 'Make a payemnt' notice the new Home library column. Make sure it displays correctly and is the same as what you see on the 'Transactions' tab.
4. Using Table settings, make sure you can properly hide the column.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33019: Make sure ES records are indexed the first time
Nick Clemens [Wed, 15 Feb 2023 10:50:33 +0000 (23:50 +1300)]
Bug 33019: Make sure ES records are indexed the first time

This patch ensures records are indexed when they are created.
Previously, we were launching the indexer inside of of a transaction.
This meant that the job was being enqueued, but not being found by the
worker, becaue it was not yet in the DB

This patch skips record indexing in the transaction, and moves the indexing
command after

To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Create a new record
4 - Note error in es-indexer-output.log like:
    [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Create another record
7  There should be no error
8 - Search for the record and confirm it can be found
9 - View the background jobs in admin, confirm the most recent job has completed

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33290: Fix incorrect variable in http-client.js
Jonathan Druart [Tue, 21 Mar 2023 07:52:42 +0000 (08:52 +0100)]
Bug 33290: Fix incorrect variable in http-client.js

Silly error from
  commit 821808ec31176d662e518418c9ff8a71948e1a4b
  Bug 32939: Use APIClient to replace PATCH requests

+        const body = params.body
+            ? typeof str === "string"
+                ? params.body
+                : JSON.stringify(params.body)
+            : undefined;

  typeof str === "string"
must be
  typeof params.body === "string"

Test plan:
With this patch, bug 33289 is not working properly. The body contains
  "pref_var=value"
instead of
  pref_var=value
and the syspref `var` contains `value"`

Sponsored-by: BULAC - http://www.bulac.fr/
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>
19 months agoBug 32833: Fix cataloguing/value_builder/unimarc_field_121a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32833: Fix cataloguing/value_builder/unimarc_field_121a.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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32832: Fix cataloguing/value_builder/unimarc_field_120.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32832: Fix cataloguing/value_builder/unimarc_field_120.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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32831: Fix cataloguing/value_builder/unimarc_field_117.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32831: Fix cataloguing/value_builder/unimarc_field_117.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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32830: Fix cataloguing/value_builder/unimarc_field_116.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32830: Fix cataloguing/value_builder/unimarc_field_116.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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=32831

19 months agoBug 33282: Feed an array of titles so that no dialog message appears
Pedro Amorim [Mon, 20 Mar 2023 18:21:06 +0000 (17:21 -0100)]
Bug 33282: Feed an array of titles so that no dialog message appears

Including but not limited to the one we're testing for

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
19 months agoBug 33282: Move get_title to index.js to be invoked by different specs
Pedro Amorim [Mon, 20 Mar 2023 18:19:53 +0000 (17:19 -0100)]
Bug 33282: Move get_title to index.js to be invoked by different specs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
19 months agoBug 33282: Remove useless intercept
Pedro Amorim [Mon, 20 Mar 2023 18:07:27 +0000 (17:07 -0100)]
Bug 33282: Remove useless intercept

JD amended patch: replace "redundant" with "useless". It's not the same
intercept, but we don't need the one removed by this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
19 months agoBug 33282: Rename Dialog.spec.ts to Dialog_spec.ts
Pedro Amorim [Mon, 20 Mar 2023 18:05:52 +0000 (17:05 -0100)]
Bug 33282: Rename Dialog.spec.ts to Dialog_spec.ts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
19 months agoBug 32923: Allow to embed user_roles for agreements
Jonathan Druart [Wed, 22 Mar 2023 09:25:56 +0000 (10:25 +0100)]
Bug 32923: Allow to embed user_roles for agreements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
19 months agoBug 32923: Fix licenses spec
Pedro Amorim [Mon, 20 Mar 2023 13:25:19 +0000 (13:25 +0000)]
Bug 32923: Fix licenses spec

Bug 32713 is now validating embed and brought this flaw to light.
Before this patch, listing licenses on ERM would result in a 400 bad request

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30555: (follow-up) Add messages about the introduced changes
Tomas Cohen Arazi [Mon, 20 Mar 2023 12:37:44 +0000 (09:37 -0300)]
Bug 30555: (follow-up) Add messages about the introduced changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30555: DBRev 22.12.00.014
Tomas Cohen Arazi [Mon, 20 Mar 2023 12:37:10 +0000 (09:37 -0300)]
Bug 30555: DBRev 22.12.00.014

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30555: Add more sample notice for sms messages
Shi Yao Wang [Fri, 15 Apr 2022 15:42:29 +0000 (11:42 -0400)]
Bug 30555: Add more sample notice for sms messages

Adds sms sample notice for due, hold, checkin and checkout

Test plan:
1. Check that there are no SMS messages for these notices (Tools > Notices & slips):
   . CHECKIN - Item check-in (digest)
   . CHECKOUT - Item check-out (digest)
   . DUE - Item due reminder
   . DUEDGST - Item due reminder (digest)
   . PREDUE - Advance notice of item due
   . PREDUEDGST - Advance notice of item due (digest)
   . HOLD - Hold available for pickup
2. Apply the patch.
3. Update the database (./installer/data/mysql/updatedatabase.pl)
4. Refresh page
5. Check that there are now SMS notices for the notices listed in step 1.
6. Sign-off!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 19361: (QA follow-up) Make sure "Not an authorised value" appears in the pull...
Katrin Fischer [Fri, 17 Mar 2023 17:43:18 +0000 (17:43 +0000)]
Bug 19361: (QA follow-up) Make sure "Not an authorised value" appears in the pull down

This is to make sure that the small icon with the additional tooltip
style explanation is not as easily missed.

Also updates text slightly:
* Pull downs: "X (Not an authorised value)"
* Tooltip: "The current value X is not configured for the authorised value category controlling this subfield"

Switches from exclamation triangle to the more "alerting" exclamation-triangle :)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 19361: (QA follow-up) Make sure translatable string is wrapped in double quotes
Katrin Fischer [Fri, 17 Mar 2023 16:10:26 +0000 (16:10 +0000)]
Bug 19361: (QA follow-up) Make sure translatable string is wrapped in double quotes

This fixes the QA script complaint:

 FAIL koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc
   FAIL   forbidden patterns
forbidden pattern: simple-quote string (line 125)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 19361: Fix advanced cataloging editor dropdowns
Nick Clemens [Wed, 19 Oct 2022 14:37:34 +0000 (14:37 +0000)]
Bug 19361: Fix advanced cataloging editor dropdowns

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 19361: Display unauthorized values when cataloging and add a warning
Nick Clemens [Wed, 19 Oct 2022 13:56:51 +0000 (13:56 +0000)]
Bug 19361: Display unauthorized values when cataloging and add a warning

This patch adds a warning and tool tip when an unauthorised vlaue is encountered during item
or biblio editing, and adds the value to the list to allow preserving the value (in case the
librarian is only editing another part of the record, or there is some reason to retain)

To test:
1 - Edit a record in advanced cataloging editor
2 - Under settings click 'Show fields verbatim'
3 - Edit 942$c to 'HAM' or some other invalid itemtype
4 - Save record
5 - sudo koha-mysql kohadev
    UPDATE items SET location = 'HAM' WHERE biblionumber = {biblionumber from above}
6 - Edit the biblio and items, confirm the HAM value shows in dropdowns

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33266: Fix missing space in patron title
Matt Blenkinsop [Fri, 17 Mar 2023 17:48:22 +0000 (17:48 +0000)]
Bug 33266: Fix missing space in patron title

This patch fixes the missing space in patron-title.inc

Test plan:
1) Visit a patron's detail page and observe that there should be a
   missing space between the first name and the surname
2) Apply patch
3) The name should now be correctly formatted

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33060: Fix yes/no setting to 1/0 in system preference YAML files
Katrin Fischer [Thu, 23 Feb 2023 22:16:56 +0000 (22:16 +0000)]
Bug 33060: Fix yes/no setting to 1/0 in system preference YAML files

Boolean system preferences need to use 1 and 0 for true and false,
not yes and no now. This fixes a few occurences that have
been added in the last release:

* EnableItemGroups
* EnableItemGroupHolds
* ArticleRequestsOpacHostRedirection
* UseLocationAsAQInSIP

To test:
* Make sure these preferences save to the db as 0/1 as expected.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33227: (follow-up) Improve docs
Tomas Cohen Arazi [Mon, 20 Mar 2023 11:48:22 +0000 (08:48 -0300)]
Bug 33227: (follow-up) Improve docs

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33227: Remove invalid spec and adjust the code accordingly
Tomas Cohen Arazi [Thu, 16 Mar 2023 13:50:33 +0000 (10:50 -0300)]
Bug 33227: Remove invalid spec and adjust the code accordingly

The spec contains a non-standard definition for the body param. Removing
it from the spec makes us need to handle the 'body' manually in the case
of JSON data.

This patch basically does that. It also changes the uses of
$c->validation, which are discouraged by the
Mojolicious::Plugin::OpenAPI dev/maintainer. I do it to highlight what
we must do in other places and the fact that there's no behavior change.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t \
           xt/api.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33227: Unit tests
Tomas Cohen Arazi [Wed, 15 Mar 2023 14:14:19 +0000 (11:14 -0300)]
Bug 33227: Unit tests

This patch adds a unit test that launches the swagger-cli validator
against our spec.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 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>
19 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>
19 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>
19 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>
19 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>
19 months agoBug 33076: (QA follow-up) Update context hint to "EDIFACT message QUOTE"
Katrin Fischer [Fri, 17 Mar 2023 21:46:21 +0000 (21:46 +0000)]
Bug 33076: (QA follow-up) Update context hint to "EDIFACT message QUOTE"

As discussed on the bug, this updates the hint to make it
easier for translators to decide on the correct translation.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32713: (QA follow-up) Tests now require more complex structures
Tomas Cohen Arazi [Fri, 17 Mar 2023 21:27:09 +0000 (18:27 -0300)]
Bug 32713: (QA follow-up) Tests now require more complex structures

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32923: (follow-up) Fix x-koha-embed from EHoldings/*/*
Jonathan Druart [Fri, 17 Mar 2023 14:07:37 +0000 (15:07 +0100)]
Bug 32923: (follow-up) Fix x-koha-embed from EHoldings/*/*

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33151: Improve translation of string in cities.tt and desks.tt
Owen Leonard [Mon, 6 Mar 2023 18:02:28 +0000 (18:02 +0000)]
Bug 33151: Improve translation of string in cities.tt and desks.tt

This patch adds a <span> tag around a string in both cities.tt and
desks.tt in order to improve 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:
 - Before the patch you would have found 'msgid "%s Searching: %s %s %s'
 - After the patch you should find 'msgid "Searching: %s'

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>
19 months agoBug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t
Marcel de Rooy [Fri, 17 Mar 2023 08:43:32 +0000 (08:43 +0000)]
Bug 32804: (QA follow-up) Typo ahs and fix ImportBatch.t

Resolve:
    #   Failed test 'Item's biblioitemnumber has not changed'
    #   at t/db_dependent/ImportBatch.t line 407.
    #
    #          got: '4261'
    #     expected: '2371'

Do not compare $item1->biblionumber with $original_biblioitemnumber :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32804: (follow-up) Test that id's have not changed
Nick Clemens [Fri, 3 Mar 2023 12:18:40 +0000 (12:18 +0000)]
Bug 32804: (follow-up) Test that id's have not changed

Rather than assuming biblionumber and biblioitemnumber are the same, we
should test that they have not changed form their original values

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32804: Do not adjust biblionumber when replacing items during import
Nick Clemens [Thu, 2 Feb 2023 20:16:49 +0000 (20:16 +0000)]
Bug 32804: Do not adjust biblionumber when replacing items during import

This patch adjust the item matching at import to confirm that for a duplicate itemnumber or barcode
matches an existing item in the DB and uses the original biblionumber when updating the item.

When ordering in a consortium the items may be moved around, duplicate biblios added, and various matches found.
We should not allow importing of items to move them from 1 biblio to another, but  we should allow the imports
to succeed and assume itemnumber or barcode matches are authoritative. The responsibility for correct matching of items to biblio should fall on the creator of the files

To test:
 1 - Be using the sample data in koha testing docker
 2 - Stage the sample file on this report
 3 - Match on KohaBiblio(999$c) / Item processing: replace
 4 - Note the biblio match is "The complete novels / Austen, Jane"
 5 - View the staged marc, note the barcode 39999000004090 in an item
 6 - Search for that barcode
 7 - You find biblio "Five novels : complete and unabridged / Gustave Flaubert"
 8 - Import the file
 9 - Check the db:
     SELECT * FROM items WHERE biblionumber != biblioitemnumber;
10 - Note the mismatch
11 - Fix the item and set it as 'Music' type
     UPDATE items SET biblionumber = biblioitemnumber, itype='MU' WHERE biblionumber != biblioitemnumber;
12 - Apply patch, restart all
13 - Stage and import the file with the same settings
14 - Confirm the item is modified on its original biblio (99) and that item type is Book again
15 - Change itemnumber to avoid itemnumber match and reset type
     UPDATE items SET itype='MU', itemnumber=999 WHERE itemnumber=212;
16 - Stage and import with the same setttings
17 - Confirm the marcode match worked and item is updated to book on original record
18 - Delete the original item
19 - Stage and import the file with the same settings
20 - The item is successfully created
21 - Stage and import, but item processing option is 'add'
22 - Confirm 1 item ignored
23 - Check the db
     SELECT * FROM import_items WHERE barcode=39999000004090
24 - Confirm there is a line with 'error' and duplicate_barcode

JD amended patch
-        # We assume that when replaicing tiems we do not want to move them - the onus is on the importer to
+        # We assume that when replacing items we do not want to move them - the onus is on the importer to

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>
19 months agoBug 32804: Add unit tests
Kyle Hall [Mon, 6 Feb 2023 16:55:48 +0000 (11:55 -0500)]
Bug 32804: Add unit tests

JD amended patch
-    is( $item1->homebranch, $library->branchcode, "Item was overlayed succesfully" );
+    is( $item1->homebranch, $library->branchcode, "Item was overlaid successfully" );

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>
19 months agoBug 33059: Fix capitalizatoin of AV sample category descriptions
Katrin Fischer [Thu, 23 Feb 2023 21:21:02 +0000 (21:21 +0000)]
Bug 33059: Fix capitalizatoin of AV sample category descriptions

* Fixes capitalization
* Standardizes on e-book (see https://www.oxfordlearnersdictionaries.com/definition/english/e-book)
* Standardizes on audiobook (see https://www.oxfordlearnersdictionaries.com/definition/english/audiobook)

To test:
* This is a little difficult to test. What you'd need to do:
* Apply the patch
* Drop your database, recreate it, run the web installer
* Make sure to select the optional AV along with the mandatory to install
* Log into Koha after finishing the installer and go to administration >
  authorised values
* Review the existing sample values for incorrect capitalization in
  the different categories

Signed-off-by: David Nind <david@davidnind.com>
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>
19 months agoBug 33100: (QA follow-up) Trivial QA fixes
Tomas Cohen Arazi [Fri, 17 Mar 2023 12:51:09 +0000 (09:51 -0300)]
Bug 33100: (QA follow-up) Trivial QA fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33100: Remove all punctuation at end of record
Nick Clemens [Tue, 7 Mar 2023 20:05:36 +0000 (20:05 +0000)]
Bug 33100: Remove all punctuation at end of record

This could potentially be overkill - if you have two records that only
differ in ending punctuation, you might get a false result - I don't
know how likely that is ( as I have mentioned before '!!!' is a band )

This seems a reasonable fix

To test:
1 - Set sysprefs as in bug 33159
2 - Edit a record, biblionumebr 3 is fine
3 - Add a comma to end of author subfield a
4 - Save and note relinked
5 - Apply patch, restart all
6 - Save again
7 - Linked to original record

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33100: Unit test
Nick Clemens [Tue, 7 Mar 2023 20:05:28 +0000 (20:05 +0000)]
Bug 33100: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33235: Fix cypress tests
Pedro Amorim [Wed, 15 Mar 2023 15:23:37 +0000 (14:23 -0100)]
Bug 33235: Fix cypress tests

Some inconsistencies leftovers from 32495 and 32997 were causing cypress tests to fail, this fixes them.

* Apply patch
* Run cypress tests and verify all pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33082: Add yellow buttons and page sections to 'copy order' pages
Katrin Fischer [Mon, 27 Feb 2023 21:44:09 +0000 (21:44 +0000)]
Bug 33082: Add yellow buttons and page sections to 'copy order' pages

When creating a new order from an existing order (copy),
there was no page section on the search results and the
submit buttons were not yellow (primary).

To test:
1. Make sure you have budgets, funds and vendors
2. In Acquisitions, search for a vendor
3. Create a basket
4. Add an order to that basket (Order from new (empty) record is easiest)
5. Add to the basket again, choosing the "From existing orders (copy)" option
6. Search for you previous order
7. The table of ordres has no white background (missing page-section) and
   the "Next" button is not yellow
8. Check the order and click Next
9. The "Duplicate orders" button is not yellow
10. Apply patch
11. Verify buttons are now yellow and the table has a white background

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 25856: Add suspend class to tr's of suspended holds
Lucas Gass [Thu, 16 Mar 2023 18:02:53 +0000 (18:02 +0000)]
Bug 25856: Add suspend class to tr's of suspended holds

To test:
1. Apply patch.
2. Place multiple holds on a record and then go suspend some of them.
3. Those suspended holds should now have a class of 'suspended'
4. Now you can add any kind of CSS you want to make those rows stand out. You can try adding this to IntranetUSerCSS:
.suspend > td {
color: red;
}

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33263: Fix random failure in patrons_search.t
Jonathan Druart [Fri, 17 Mar 2023 10:57:22 +0000 (11:57 +0100)]
Bug 33263: Fix random failure in patrons_search.t

There is a missing wait_for_ajax. After we click "next", we need to make
sure we are using the correct response.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33070: Remove use of can_edit_items
Kyle Hall [Thu, 23 Feb 2023 12:52:02 +0000 (07:52 -0500)]
Bug 33070: Remove use of can_edit_items

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Acquisition/Order.t
3) git grep "can_edit_item("
   should return no results

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32983: Fix dropdown list when search for EBSCO's packages
Jonathan Druart [Wed, 8 Mar 2023 14:53:15 +0000 (15:53 +0100)]
Bug 32983: Fix dropdown list when search for EBSCO's packages

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33058: Update "fines" to "charges" for viewing a guarantees charges
Katrin Fischer [Thu, 23 Feb 2023 20:26:23 +0000 (20:26 +0000)]
Bug 33058: Update "fines" to "charges" for viewing a guarantees charges

Charges includes fines and fees, while fines are mostly
negative. Changing this according to our terminology
guidelines.

To test:
* Make sure the patron category of your patron is set
  to be 'can be guarantee' in administration
* Set  AllowStaffToSetFinesVisibilityForGuarantor and
   AllowPatronToSetFinesVisibilityForGuarantor to allow
* Set OpacPrivacy to allow
* Edit your patron, give it a guarantor and
  look at the "Show fines to guarantors setting" and hint
* Save and look at the label of the field on the details tab
* Go to the OPAC and log in
* Check the Privavy tab for the option to allow the guarantee
  to see your charges
* Apply patch. Verify:
  * System preference descriptions changes
  * Option and label names have changed in all steps above

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32180: Add required class to labels in ERM
Lucas Gass [Wed, 15 Mar 2023 20:39:27 +0000 (20:39 +0000)]
Bug 32180: Add required class to labels in ERM

To test:
1. Apply patch, yarn build
2. Add/edit Agreemnets, make sure all required fields have a red 'required' label
3. Check 'Add new period', 'Add new user', 'Add new license', 'Add new related agreement'.
4. Add/edit Licenses, make sure all required fields have a red 'required' label.

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>
19 months agoBug 33056: Terminology: change 'fine' to 'charge'when making a payment or writeoff
Katrin Fischer [Thu, 23 Feb 2023 20:42:54 +0000 (20:42 +0000)]
Bug 33056: Terminology: change 'fine' to 'charge'when making a payment or writeoff

In the development meeting of Feb 22, 2023, we decided to change 'fine' to 'charge' when referring to various types of fees ('fine' should be limited to overdue fines).

To test:
0. Go to patron's account accounting tab, Make a payment section
   --> It will read: X has no outstanding fines.
   0.1 Create a manual invoice
   --> Use "Write off all" button, verify confirmation message says 'fines'
1. Add a manual fee to a patron's account
   1.1. Go to a patron's account > Accounting tab
   1.2. Click 'Create manual invoice'
   1.3. Enter an amount
   1.4. Click 'Save'
2. Pay an individual charge
   2.1. Click 'Make a payment'
   2.2. Click the 'Pay' button next to an individual charge
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Pay an individual fine'
   --> The heading of the page is 'Pay an individual fine'
   --> The heading inside the payment tab is 'Pay an individual fine'
   2.3. Click 'Cancel' and go back to the 'Make a payment' tab
3. Pay an amount toward all charges
   3.1. Click 'Pay amount'
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Pay an amount toward all fines'
   --> The heading of the page is 'Pay an amount toward all fines'
   --> The heading inside the payment tab is 'Pay an amount toward all fines'
   3.2. Click 'Cancel' and go back to the 'Make a payment' tab
4. Pay an amount toward selected charges
   4.1. Click 'Pay selected'
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Pay an amount toward selected fines'
   --> The heading of the page is 'Pay an amount toward selected fines'
   --> The heading inside the payment tab is 'Pay an amount toward selected fines'
   4.2. Click 'Cancel' and go back to the 'Make a payment' tab
5. Write off an individual charge
   5.1. Click the 'Write off' button next to an individual charge
   --> In the browser tab title, it says 'Collect fine payment for ...'
   --> In the breadcrumbs, the last section is 'Write off an individual fine'
   --> The heading of the page is 'Write off an individual fine'
   --> The heading inside the payment tab is 'Write off an individual fine'
   5.2. Click 'Cancel' and go back to the 'Make a payment' tab
6. Write off selected charges
   6.1. Click 'Writeoff selected'
   --> In the browser tab title, it says 'Write off an amount for ...'
   --> In the breadcrumbs, the last section is 'Write off an amount toward selected fines'
   --> The heading of the page is 'Write off an amount toward selected fines'
   --> The heading inside the payment tab is 'Write off an amount toward selected fines'
   6.2. Click 'Cancel' and go back to the 'Make a payment' tab
7. Apply patch and repeat
   --> All fines should now be charges.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33076: Add context to "Quotes"
Katrin Fischer [Mon, 27 Feb 2023 22:13:01 +0000 (22:13 +0000)]
Bug 33076: Add context to "Quotes"

A quote as a part of quoted text and a quote as
part of the acquisition process need to be
translated differently at least in German.
This patch adds context to the terms, so we can
do that.

To test:
* Go to Tools > Quote editor
* Verify the heading of the page reads "Quotes"
* Enable EDIFACT system preference
* Go to Administration > EDI accounts
* Add a new account save
* Verify the table heading reads "Quotes"
* Apply patch - nothing should change

Verify the translation process:
* Run: gulp po:update --lang de-DE
* Verify the "Quotes" appear now separated by
  different context in
  misc/translator/po/de-DE-messages.po

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33126: Markup error in staff interface tab wrapper
Owen Leonard [Fri, 3 Mar 2023 13:40:03 +0000 (13:40 +0000)]
Bug 33126: Markup error in staff interface tab wrapper

This patch makes a minor correction to the tab WRAPPER directives: a
<li> which should be </li>.

The patch also modifies the example WRAPPER markup to correct an error
and clarify usage.

To test, apply the patch and test a page which has been updated to use
tab wrappers: The about page, basket groups, library transfer limits.
Tabs should continue to work as expected.

Before the patch, the about page source will include this:

<li role="presentation" class="active">
    <a href="about_panel" aria-controls="about_panel" role="tab" data-toggle="tab">
       Server information
    </a>
<li>

After the patch the closing </li> will be correct.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33183: Error inserting matchpoint_components when creating record matching rules...
Kyle Hall [Thu, 9 Mar 2023 16:35:42 +0000 (11:35 -0500)]
Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6

The word "offset" is now a keyword. At the very least we need to escape the fieldname with backticks.
It would be nice to switch to Koha::Objects for this module eventually.

C4::Matcher::_store_matchpoint(): DBI Exception: DBD::mysql::st execute failed: You have an error in
your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax
to use near 'offset, length) VALUES ('27', '1', '999'...' at line 2 at /usr/share/koha/lib/C4/Matcher.pm
line 314

Test Plan:
1) Set up Koha with MariaDB 10.6
2) Attempt to create a matching rule
3) Note the error screen
4) Apply this patch
5) Restart all the things!
6) Attempt to create another matching rule
7) No errors this time

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32713: Throw exception on unexpected x-koha-embed header
Martin Renvoize [Wed, 1 Mar 2023 16:42:30 +0000 (16:42 +0000)]
Bug 32713: Throw exception on unexpected x-koha-embed header

This patch adds an exception to stash_embed that is thrown when we
find an x-koha-embed header that we're not expecting.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32713: Unit tests
Martin Renvoize [Thu, 2 Mar 2023 09:37:14 +0000 (09:37 +0000)]
Bug 32713: Unit tests

This patch adds unit tests to prove we return a 400 and an appropriate
error message when calling an endpoint that is not defined to support
x-koha-embed whilst passing an x-koha-embed header.

Test plan:
1) Run test prior to applying second patch and confirm it fails
2) Run test after applying second patch and confirm it passes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32878: (follow-up) Exclude non_priority holds
Martin Renvoize [Wed, 15 Mar 2023 15:24:32 +0000 (15:24 +0000)]
Bug 32878: (follow-up) Exclude non_priority holds

This patch filters out non_priorty holds in the on_reserve condition.

Test plan
1) Run t/db_dependant/Holds.t
2) Note it fails without this patch
3) Apply patch
4) Re-run the above test, note it now passes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: (follow-up) Add INSERT IGNORE in dbrev
Marcel de Rooy [Tue, 14 Mar 2023 12:30:32 +0000 (12:30 +0000)]
Bug 32057: (follow-up) Add INSERT IGNORE in dbrev

Preventing:
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'ActionLogsTraceDepth' for key 'PRIMARY' at /usr/share/koha/C4/Installer.pm line 739

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32878: (QA follow-up) Correct unit test
Nick Clemens [Thu, 16 Feb 2023 16:11:23 +0000 (16:11 +0000)]
Bug 32878: (QA follow-up) Correct unit test

After the patch we fail on renewing a not for loan item with an item
level hold.

I don't find justification for why this should be renewable, so I just
change the test expectation

This needs another QA eye

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32878: Make it impossible to renew the item if it has active item level hold
Petro Vashchuk [Fri, 3 Feb 2023 14:22:30 +0000 (16:22 +0200)]
Bug 32878: Make it impossible to renew the item if it has active item level hold

introduced in:
73c3c5d2f10751c23156372300239d42e5957c66
Bug 31112: (QA follow-up) Reduce database queries

started from:
8ba1a9a5345310c54d9225049d470544b56eeb11
Bug 31112: Remove unnecessary if-clause

Currently, you can renew the item even if someone already made an item level
hold on that item. This patch changes that, making it not possible to do so.

To reproduce:
1. Checkout an item, and make another item level hold on that specific item.
2. Renew it using the "Renew" checkbox, it should get renewed without any problems.
3. Apply the patch.
4. Checkbox should be gone and replaced with "On Hold" link that leads to the hold that doesn't allow you to renew the item again.
5. "Renew all" button should not work either.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32878: (QA follow-up) Unit test
Nick Clemens [Thu, 16 Feb 2023 15:26:07 +0000 (15:26 +0000)]
Bug 32878: (QA follow-up) Unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32421: Add collection column to holds to pull
Lucas Gass [Wed, 7 Dec 2022 18:41:26 +0000 (18:41 +0000)]
Bug 32421: Add collection column to holds to pull

To test:

1. Place some holds
2. Go to Circulation > Holds to pull
3. Notice there is not column to indicate collection ( CCODE )
4. Apply patch and restart services
5. Step 2 again, this time you should see a column for holds to pull
6. Using both the Columns button and via 'Table setting' attempt to hide the column and other columns. Ensure everything is being heiiden correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 32421: (follow-up) Correct table settings

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>
19 months agoBug 32057: DBRev 22.12.00.013
Tomas Cohen Arazi [Tue, 14 Mar 2023 11:58:37 +0000 (08:58 -0300)]
Bug 32057: DBRev 22.12.00.013

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: (QA follow-up) Add missing messages (from skeleton.pl)
Tomas Cohen Arazi [Tue, 14 Mar 2023 11:48:06 +0000 (08:48 -0300)]
Bug 32057: (QA follow-up) Add missing messages (from skeleton.pl)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: DBIC schema
Tomas Cohen Arazi [Tue, 14 Mar 2023 11:43:46 +0000 (08:43 -0300)]
Bug 32057: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: (QA follow-up) Add a simple test
Marcel de Rooy [Wed, 22 Feb 2023 13:53:35 +0000 (13:53 +0000)]
Bug 32057: (QA follow-up) Add a simple test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: (QA follow-up) Remove pretty flag
Marcel de Rooy [Wed, 22 Feb 2023 13:50:10 +0000 (13:50 +0000)]
Bug 32057: (QA follow-up) Remove pretty flag

Not needed for storage. You can always display pretty in the
interface (on a follow-up report).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32057: Replace insert query with use of Koha::ActionLogs
Kyle Hall [Tue, 20 Dec 2022 14:21:34 +0000 (09:21 -0500)]
Bug 32057: Replace insert query with use of Koha::ActionLogs

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>
19 months agoBug 32057: Add optional stack trace to action logs
Kyle Hall [Tue, 1 Nov 2022 10:47:35 +0000 (06:47 -0400)]
Bug 32057: Add optional stack trace to action logs

It can be useful to know where in Koha a particular logged action was generated from, and how. We should add the ability to attach a syspref controlled basic stack trace with the caller depth controlled via the syspref. We can the call caller() until the specified depth has been reached.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
4) Restart all the things!
5) Set the new syspref ActionLogsTraceDepth to a number ( e.g. 3 )
6) Update a syspref or trigger another enabled log action
7) Query the database: SELECT * FROM action_logs WHERE trace IS NOT NULL
8) Note the stack trace was created!

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>
19 months agoBug 29354: Make overdue_notices.pl send .html
Magnus Enger [Mon, 12 Dec 2022 13:41:20 +0000 (13:41 +0000)]
Bug 29354: Make overdue_notices.pl send .html

If you have EmailOverduesNoEmail = Send and specify "--html somedir",
overdue_notices.pl will send a file by email that contains partial
HTML, as a file called attachment.txt. This patch fixes that.

To reproduce in koha-testing-docker:
- EmailOverduesNoEmail = Send
- Make sure you have a loan that was due yesterday, by backdating the
  due date
- Set up an overdue action to send "Overdue Notice" (ODUE) to the
  category you made the loan to above, when a loan is one day overdue
- Run this command:
  $ sudo koha-shell -c "perl misc/cronjobs/overdue_notices.pl -v -t -html /tmp/" kohadev
- Look at the file /tmp/notices-<DATE>.html and make sure it is a full
  HTML document, with <html>, <head>, <body> etc.
- Create a report like this:
  SELECT message_id, letter_id, borrowernumber, subject, CONCAT( '<pre>', content, '</pre>' ) AS content,
    metadata, letter_code, message_transport_type, time_queued, updated_on, to_address, content_type, failure_code
  FROM message_queue
  WHERE subject = 'Overdue Notices'
  ORDER BY message_id DESC
- Run the report and verify there is a line like this in the "content"
  of the newest message:
  Content-Type: text/plain; name=attachment.txt
- A part of the "content" will be a block of several lines of gibberish
  (base64) that look something like "RGVhciAga29oYSwNCg0KQWN...". Copy
  this block of text to somewhere like base64decode.org and decode the
  text. You should see a fragment of HTML, without <html>, <head>,
  <body> etc.

To test:
- Apply the patch
- Run overdue_notices.pl again, with the same arguments as above
- Make sure /tmp/notices-<DATE>.html is still a full HTML document
- Re-run the report, and make sure you now have this in the "content":
  Content-Type: text/html; name=attachment.html
- Decode the base64 and make sure it is now a full HTML document, with
  <html>, <head>, <body> etc.
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-csv /tmp/test.csv"
- Make sure /tmp/test.csv and the decoded base64 from the report
  contains CSV data
- Re-run overdue_notices.pl as above, but replace "-html /tmp/" with
  "-text /tmp/"
- Make sure /tmp/notices-<DATE>.txt and the decoded base64 from the
  report contains no HTML

Note:
- The actual text from the different messages will be enclosed in
  <pre>-tags
- If you have HTML in your ODUE message template and run with -v, you
  will have warnings saying "The following terms were not matched and
  replaced"
These are due to Bug 14347, and are not adressed by the current patch.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 33150: Add specific message for informing about too_soon for renewal.
Andreas Jonsson [Mon, 6 Mar 2023 15:42:05 +0000 (16:42 +0100)]
Bug 33150: Add specific message for informing about too_soon for renewal.

The message "No renewals allowed" is incorrect when it is too soon for renewal,
this patch adds a specific error message.

To test:
- Make sure the system preference  SCOAllowCheckin is set to "allow"
- Go to Koha administration -> Circulation and fine rules
- Edit the rule for all items and change "No renewal before" to 1 and save.
- Check out an item to a borrower (for instance barcode 39999000000719 to the user koha with cardnumber 42).
- Go to self checkout (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl)
- Log in as the user (koha/koha)
- Verify that the error message in the Renew column is "This item cannot yet be renewed."

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>
19 months agoBug 32684: (QA follow-up) Move too_many_lost to Patron
Marcel de Rooy [Wed, 8 Mar 2023 12:45:53 +0000 (12:45 +0000)]
Bug 32684: (QA follow-up) Move too_many_lost to Patron

Alternative implementation outside sub new.

Test plan:
Run t/db_dependent/SIP/Message.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 32684: Implement SIP patron status field "too many items lost"
Kyle Hall [Thu, 19 Jan 2023 18:45:07 +0000 (13:45 -0500)]
Bug 32684: Implement SIP patron status field "too many items lost"

The SIP patron status and information responses always return false foe "too many items lost". It would be reasonable to check the count of lost items still checked out to the patron and compare that to a threshold set in the sip config file. Though not all libraries operate in this way, it seems like a good and reasonable implementation as long is it is properly documented.

This patch adds the ability to set the SIP "too many items lost" flag
for a patron based on the number of lost checkouts the patron has where
the lost flag on those items is greater than the given flag value.

For example, one could specify that the flag be set if the patron has
more than 2 items checked out where itemlost is greater than 3.

By default the feature is disabled to retain the existing functionality.
If enabled, the default itemlost minimum flag value is 1 unless
specified.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

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>