]> git.koha-community.org Git - koha.git/log
koha.git
17 months agoBug 30352: Allow translation of Not for loan in OPAC XSLT results
Marcel de Rooy [Wed, 19 Apr 2023 13:52:16 +0000 (13:52 +0000)]
Bug 30352: Allow translation of Not for loan in OPAC XSLT results

Note: Test plan below can be followed in English. If you would like
to see the vernacular results, you need to update PO files and
translate 'Not for loan', and update templates (xslt files) accordingly.
The bootstrap PO does not yet include that string without %s suffix
in the current codebase.

Test plan:
[1] Apply this patch and make the following change in
MARC21slim2OPACResults.xsl, line 1207.
Change:
  <status english="Not for loan">Not for loan</status>
to:
  <status english="Not for loan">NOT for loan</status>
Important: Change text inside, not the attribute!
Restart all.

[2] Pick a biblio, add some items with different statuses: Checked out,
Damaged, Not for loan, Staff collection.
[3] Make it appear in a OPAC results display (not detail).
[4] You should see the different statuses, including NOT for loan. The
uppercase NOT serves to prove that the string has been translated. Also
verify that you see Staff collection as-is.
[5] Bonus: Toggle with values in Reference_NFL_Statuses to move results
from Reference section to Not available section v.v.
[6] Revert the change from step 1. Sign off :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 8d7e3cec32dffa5f96de696f8707bf8e015c49d2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9871a02b26bea775b03090d65e633a260ea10baf)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a8cd4312781eefa42545bf0481cf02252136fd7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 31432: Make 245$n$p visible by default in frameworks
Katrin Fischer [Sat, 18 Feb 2023 11:53:49 +0000 (11:53 +0000)]
Bug 31432: Make 245$n$p visible by default in frameworks

$n (part_number) and $p (part_name) now have their own
columns in the database, but we are still hiding them
by default. It woudl ease testing and cataloguig if
we changed them to be visible by default in new installations.

To test:
* Check that in your current frameworks when adding a new
  record, 245 n and p are hidden
* Apply the patch and start over: drop your db and run the
  web installer
* Verify that the fields are now visible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 340880253042d36e429ee0805039fa2589241180)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit bc4b29dfaa064c57644b59f73de547be2b5335c7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e5bd3e01f9475f503a85e806fe7b9bce54786557)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 32642: (QA follow-up) Activate spinner early
Marcel de Rooy [Fri, 21 Apr 2023 08:58:50 +0000 (08:58 +0000)]
Bug 32642: (QA follow-up) Activate spinner early

See comment on former patch too. We need to activate the spinner
early and we can simplify the code to remove it.

Note: unfortunately this is kind of a workaround, since using
load would be nicer but currently hard to implement since the cover
image code is scattered/widespread.

This code still checks the complete attribute, we could argue that
it should just remove the spinner. Note too that the spinner belongs
to a div where multiple img may be part of. If we do not remove the
spinner now, something went wrong at load time, but if you can
actually see the spinner is another thing.

Test plan:
See former patch.
Check few cover images on detail page, enable various providers.
Bonus: I tested with a sleep statement in opac-image.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1bd4f53e9015f9dc764d51618acbaaec8ad275ff)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit ee4cc43b97d1c234379feb558ff1b2e38bf69cb1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d3dfbe23915cc5ab8bec950b9ef67a40d19e1470)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 32642: Loading spinner always visible when cover image is short (OPAC)
Hammat Wele [Thu, 6 Apr 2023 23:38:22 +0000 (23:38 +0000)]
Bug 32642: Loading spinner always visible when cover image is short (OPAC)

We noticed that if the cover image is somewhat short (i.e. the height is under 80-90 px), the loading spinner indicating that the image is currently loading still appears after the image is loaded.

this patch remove the spinner when the image is loaded,.

To test:
1. Make sure the OPACLocalCoverImages system preference is enabled
   1.1. Go to Administration > Global system preferences
   1.2. Search for Coverimages
   1.3. Set OPACLocalCoverImages to 'Show'
   1.4. Click 'Save all Enhanced content preferences'
2. Add a short local cover image to a record (I added one which is just a grey rectangle with the size printed on it, to facilitate the test)
   2.1. Download the attached image
   2.2. Find a record without an image
   2.3. Click the 'Images' tab
   2.4. Click 'Upload'
   2.5. Click 'Drop files here or click to select a file' and choose the downloaded image
   2.6. Click 'Process images'
3. View the record in the OPAC
   3.1. From the image upload page, click on the title of the record in the page heading to access the detailed record in the staff interface
   3.2. Click on 'OPAC view: Open in new window.'
   --> Note that the image is displayed normally, but the spinner is also displayed
4. Apply the patch
5. View the record in the OPAC
    --> Note that the spinner is no more displayed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This needs a follow-up; the code in this template activates the spinner
actually when the job has been done already and did not remove it.
And we did not see that but only with a short image like above.
The construction with .one, .each is not needed given the execution
context.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 408e676fd29188ce40c6dbf94b47845df9ba1984)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit ea6eee6b24d87558e7ead07ac290ac0763406afc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a6bfe3cf7b3df025c6971eadefa4ac5afc0e55f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit c6610d5ed97c03a090039606aecfe7f5d6917876)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 175dd2871c2ac00997cad13e0dba215688e85baa)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit d4fb68703098f25bd587a8fdfc6cd5b4d884c4f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f849dd313cde6dfdd03aba5652fb9429f093c901)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit a6d93137b0878b858a36746de6f6678cfce00a74)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 435c79b8a47b8ee47fd493ca4ac17a6413e9ba00)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit 085a11b3dd854b0533ef0cce1d8299d3bfba587d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e62ca63b1d1495d88d331129cb6386e1d93c3fbb)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit 30260ece2f567823da7189abf5ebd0a43caa526a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d7b5cbf075241f84d06edaa08f40b129229a80c5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit 397354e4bb9d18b797ad96a5d906bab0b985cda1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4eef6474806c4d78672254dbed7083dd79fc0ac3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit 18c75b9bf9b0ea206f159ed1f94fa8b1eada4c12)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 078324588251cdfe6d10bb1970079d60d5d070b6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit 66b7de2ec2ee429b40831cdef68161ab18bb0035)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9d5bcfbfebc08cdb3e5925bb5be33b20d823cc5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit bc2c8b16f88c43ac778aed904a288e77561a7033)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2f1205355e8b6bfb51f8992a48b5a3593ac8bbf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 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>
(cherry picked from commit 38d615959c00a2a4468245e18c1099aaf3455cf0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9383c5242dd96597af637d3fc4ea718453900b91)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 29311: (follow-up) Fix t/db_dependent/selenium/regressions.t
Katrin Fischer [Mon, 10 Apr 2023 16:13:04 +0000 (16:13 +0000)]
Bug 29311: (follow-up) Fix t/db_dependent/selenium/regressions.t

The test was checking for the value of an input field.
But with this patch set, there is no longer an input, but
a link element with the title. This adjusts the patch to look
for the correct element.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 307df8f1af4b0577faa4dbcac8072d818bc1ffe4)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit babebab0cb1150ffd8388df2d8e2bfa7f680b86d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a5b7e974cb617be3cd2db18d3116a298d5b1a00)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 29311: (follow-up) Add id to span elements
Katrin Fischer [Mon, 10 Apr 2023 16:08:32 +0000 (16:08 +0000)]
Bug 29311: (follow-up) Add id to span elements

The input fields in the form have ids, these are useful
for styling, but also for the Selenium tests. This patch
adds the ids from the former inputs to the now spans.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2fc06098d2133bfc7c46701e0e90fc384bbb1342)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit f88186b34511ee21d50dc4727cf217f2bb85e0a1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d453bb9c5d21814054f0c19db86893b91d11fdf5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 29311: (QA follow-up) Fix filter
Nick Clemens [Wed, 29 Mar 2023 14:03:49 +0000 (14:03 +0000)]
Bug 29311: (QA follow-up) Fix filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 69a1c4a53abca3273bf497198348dcc5c406e1ce)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 1362b0335dabbda1ba96d8f2b1879dd8513a02b6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 360e48a95ad24f26a50ab71e5e9fa9236a550241)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 29311: (QA follow-up) Fix an existing spelling typo
Nick Clemens [Wed, 29 Mar 2023 14:02:47 +0000 (14:02 +0000)]
Bug 29311: (QA follow-up) Fix an existing spelling typo

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b231d0d5b1949292d5367c700183f534463672d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 52056bf4ead513ffa2c17a43ab144fb8222bddeb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f5964148d3d2c7ee93fa24186555b5f5df1fefbf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 29311: Forbid editing biblio info when creating suggestion for biblio
jeremy breuillard [Mon, 21 Mar 2022 14:29:57 +0000 (15:29 +0100)]
Bug 29311: Forbid editing biblio info when creating suggestion for biblio

When creating a suggestion for an existing biblio, biblio info like
title or author should not be editable.

Test plan:
1. Enable system preference 'suggestion'
2. Log in at OPAC
3. Go to a biblio record detail page
4. Click 'suggest for purchase'
5. Notice that all fields can be modified (title, author, ...)
6. Apply patch
7. Repeat steps 2 and 3 or refresh the page
8. Verify that the biblio fields cannot be modified now. The only fields
   that should be editable are: quantity, item type, library, reason for
   suggestion, and notes

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d96393a52ab047939c97b5b5b496f2ed85f58893)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit ca33ff04d66cf26b4030504f632dbce74841250e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b7e86347e6194a869c17a136eac1e5045dc3fa8d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 33040: Add "Date published (text)" to serials tab on record view (detail.pl)
Kyle Hall [Wed, 22 Feb 2023 15:55:41 +0000 (10:55 -0500)]
Bug 33040: Add "Date published (text)" to serials tab on record view (detail.pl)

Some libraries would like to see the "Date published (text)" in the serials tab on the "Normal" record view ( aka catalogue/detail.pl ).

Test Plan:
1) View the serials tab on detail.pl for a subscription where the latest
   serial has a "Date published (text)" field populated.
2) Apply this patch
3) Restart all the thigns!
4) Browse to detail.pl for that record
5) View the Subscriptions tab
6) Note the "Date published (text)" column exists now!

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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 b3b33960dac85015d4f6e73604a8f7d21ed31e5b)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e640ddc20e6dd44a679f6e738943bdfb69fc4dab)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da2c777737c0633352a288f96c258ba7914d29a6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoBug 27513: Add notes to variables for report parameters template
Philip Orr [Fri, 31 Mar 2023 07:12:48 +0000 (07:12 +0000)]
Bug 27513: Add notes to variables for report parameters template

This patch adds the TT variable 'notes' to the variables
that guided_reports.pl passes to the template guided_reports_start.tt
during SQL parameters entry in the phase 'Run this report'.

To test:
1. apply the patch
2. navigate to Reports -> Guided Reports -> Create from SQL
3. create an SQL report that includes at least one parameter, e.g.:
   SELECT barcode FROM items WHERE homebranch=<<Select library|branches>>
   the actual SQL and name of the report doesn't matter much, just make
   sure that you also put a note e.g. "Test text for display" in the
   field "Notes:" before you save the report.
4. run the report
5. the note you entered should now be displayed below the heading
   "Enter parameters for report..."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fa534d464c63739f4c836a43966802caa09b0ca8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 5de9cb41df412317ee4d907502043cc00530aceb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fab0b24d2465ed68c31cc62d6093723531dc5ce0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoUpdate debian/control file: 21.11.16 on deb9 (09f26f0d)
Mason James [Sat, 28 Jan 2023 01:09:29 +0000 (14:09 +1300)]
Update debian/control file: 21.11.16 on deb9 (09f26f0d)

https://bugs.koha-community.org/show_bug.cgi?id=32668

17 months agoUpdate debian/changelog file: 21.11.16
Mason James [Sat, 28 Jan 2023 01:09:31 +0000 (14:09 +1300)]
Update debian/changelog file: 21.11.16

https://bugs.koha-community.org/show_bug.cgi?id=32668

17 months agoUpdate release notes for 21.11.20 release v21.11.20
Arthur Suzuki [Thu, 11 May 2023 13:06:25 +0000 (15:06 +0200)]
Update release notes for 21.11.20 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoIncrement version for Koha 21.11.20 release
Arthur Suzuki [Thu, 11 May 2023 13:00:32 +0000 (15:00 +0200)]
Increment version for Koha 21.11.20 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
17 months agoFix translations for Koha 21.11.20
Arthur Suzuki [Thu, 11 May 2023 12:57:21 +0000 (14:57 +0200)]
Fix translations for Koha 21.11.20

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoTranslation updates for Koha 21.11.20
Koha translators [Thu, 4 May 2023 06:36:27 +0000 (03:36 -0300)]
Translation updates for Koha 21.11.20

18 months agoBug 33285: (QA follow-up) add POD and fix some code style
Fridolin Somers [Fri, 31 Mar 2023 22:16:43 +0000 (12:16 -1000)]
Bug 33285: (QA follow-up) add POD and fix some code style

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6221538b6d54d85b403296191a9d2fb27d34116c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 4a1c87fe361cf20c41df2da1596341069cb3962a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit be2a56a4b7cc7de3dcf7e8d84b00649f1daa16ef)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33285: Allow specifying the delimeter for runreport.pl
Nick Clemens [Mon, 20 Mar 2023 20:08:56 +0000 (20:08 +0000)]
Bug 33285: Allow specifying the delimeter for runreport.pl

To test:
1 - Write a report in koha
2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number)
3 - Note you get commas
4 - Apply patch
5 - Repeat #2 - no change
6 - perl misc/cronjobs/runreport.pl --format csv --separator "|" 1
7 - Now it is pipe delimited
8 - perl misc/cronjobs/runreport.pl --format tsv --separator "|" 1
9 - Error is reported, you cannot set separator unless csv
10 - Try other separators

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bad0d52245ebf7fe73131e3721a99f7ec9a965ce)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 94077abab8c9c0f5fb5ad08966acd3ff8e44bd31)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dc7fb83485e5babde8dea2e4da037163d3ce2a00)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc
Fridolin Somers [Sat, 19 Nov 2022 03:36:47 +0000 (17:36 -1000)]
Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc

C4::AuthoritiesMarc method GetAuthorizedHeading is not exported thus it is called in other modules :
 > git grep GetAuthorizedHeading
C4/AuthoritiesMarc.pm:=head2 GetAuthorizedHeading
C4/AuthoritiesMarc.pm:  $heading = &GetAuthorizedHeading({ record => $record, authid => $authid })
C4/AuthoritiesMarc.pm:sub GetAuthorizedHeading {
C4/Breeding.pm:                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
C4/ImportBatch.pm:            $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
C4/ImportBatch.pm:    my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });

This patch adds it to be exported.
For example for use in Koha plugins.

Test plan :
Check import of authorities from a file is OK

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d0eca8a0df0e34535d12e40c4247ec99a493619)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 6833e1b3f70a356bc9ba6ae50ed048324e60664f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a67b16baafb7c1cc53bfe080a86835238977c52)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 32280: Export method ImportBreedingAuth from C4::Breeding
Fridolin Somers [Sat, 19 Nov 2022 03:54:32 +0000 (17:54 -1000)]
Bug 32280: Export method ImportBreedingAuth from C4::Breeding

In C4::Breeding method ImportBreedingAuth() should be exported to be used for example by plugins.

No test plan needed i bet.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks like a harmless and useful enhancement.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 97a100d19ded4c1297b44c65587b419ca8710cfc)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e28fd04eff488349b17ad178b43fce1457b4ab08)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63bb8229e1217d6d4fb7b4ddf9e39cceda5a5a97)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 31259: Escape infinite loop when lime cannot wrap enough
Nick Clemens [Mon, 23 Jan 2023 12:51:48 +0000 (12:51 +0000)]
Bug 31259: Escape infinite loop when lime cannot wrap enough

It seems the wrapping here works with words, not characters. If a line is too long,
or too far over, we can't trim it enough. We need to escape if successive loops are
not changing the line

To test:
 1 - Using sample data, edit the layout to match picture in comment 9
 2 - Add some borrowers to a batch
 3 - Attempt to export batch and save PDF
 4 - Staff client waits
 5 - ps aux | grep card
 6 - Note the job keeps running
 7 - Kill it
 8 - Apply patch
 9 - Restart_all
10 - Export batch again
11 - Success, you get a badly formatted PDF, rather than nothing
12 - Note the PDF does not show "Yakama Nation Library"
13 - Edit layout, male "Lower left X" 20 instead of 220
14 - Export again and note text field 1 shows correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a18f65cdcc51571bc9eae1e903a6b7b676e6a89e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit f1010ee062263c84be1cf8f9117730c536f9c8f5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dda7ff90bdc768e5558c0958d937789b2b834502)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 13976: Sort popularity numerically in Zebra
Nick Clemens [Mon, 21 Nov 2022 19:12:46 +0000 (19:12 +0000)]
Bug 13976: Sort popularity numerically in Zebra

To test:
1 - Create a new template at Tools->Marc modification template
2 - Add action: Copy 999$c to 942$0
3 - Create a report:
    SELECT biblionuber FROM biblios
4 - Run report, show all, do a batch modification to all records using template above
5 - Search for 'a' (make sure you are using Zebra)
6 - Sort by popularity
7 - Note records are sorted wrong
8 - Apply patch
9 - Restart all
10 - Reload search results
11 - Success! Sorted correctly

Signed-off-by: Anke <anke.bruns@gwdg.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 45cea7c7ba548ffc24976c1b574de295792d0793)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit feea08b03c51648b5a53a021edc726833f475e8f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9fb9e29c1e6e5dde0a0caace536daf73441519cf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 28641: ILLHiddenRequestStatuses does not consider custom statuses
Pedro Amorim [Thu, 2 Feb 2023 17:55:10 +0000 (17:55 +0000)]
Bug 28641: ILLHiddenRequestStatuses does not consider custom statuses

This patch adds the status_alias column to the ILLHiddenRequestStatuses sys pref check.
Because requests will have status_alias NULL by default, we also check for that.

Test plan:
Create multiple ILL requests of different backends and place them in different status (NEW, COMP, REQ, etc)
Create multiple ILLSTATUS entries
Add and remove a mix of both status and status_alias codes in ILLHiddenRequestStatuses and refresh the ILL requests page to confirm the result is according to expectation.

Sponsored-by: PTFS Europe
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aaa5bcd16bc5c4e50986961ad79d29801e67c889)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit feea30d42bdce19cee6c7f2f7b89dbd4a51bf810)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3735277be43ae061bf48e3e1a3a1fdb991459f57)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33168: (follow-up) Swap spaces for tabs
Mason James [Fri, 31 Mar 2023 14:21:54 +0000 (03:21 +1300)]
Bug 33168: (follow-up) Swap spaces for tabs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f74a353097710cf33b3b75b9912b2b00d2aa1a30)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit cff59f18d5ef4b5a07ce1a4b4160daea00d8ea31)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit deb2371d4b5fa7a4f7c7a3e10b99a69919ebfcbe)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33168: Prevent debhelper from renaming history.txt to changelog
David Cook [Tue, 21 Mar 2023 23:09:20 +0000 (23:09 +0000)]
Bug 33168: Prevent debhelper from renaming history.txt to changelog

This change prevents debhelper from renaming history.txt to changelog,
since that renaming was breaking the Timeline feature in Koha.

Another option would've been to rename history.txt to something else
but that filename is already embedded in Koha and the Koha release
tools, so this seems the safer option.

Test plan:
0. Apply patch
1. Build Debian package
2. Confirm that /usr/share/doc/koha-common/history.txt is created
and /usr/share/doc/koha-common/changelog.gz is not created

Signed-off-by: Mason James <mtj@kohaaloha.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 b6f9241d66b8a857dba51d747cb8fb67d2115433)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 3b6aac190cacc407472bba24b72154e6b487a35b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 09d1416ad3191b48a9b9a5eabd4575d5ac1b90bc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33341: Address some perlcritic errors in 5.36
Tomas Cohen Arazi [Mon, 27 Mar 2023 12:17:31 +0000 (14:17 +0200)]
Bug 33341: Address some perlcritic errors in 5.36

Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

To test:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D

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>
(cherry picked from commit 10d12f999f9b8bff228c9c20f1ca4f0c7144201f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c1c5420afae84e86938d4a7ecaf2adb7074a2cc1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 548a3325baefe0b700d9386f9fc05e201e56ea4f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 63772a9cb25e58ff221540c2a76a7f447bbdeecc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit dd7b6e528a18f19ef3a05e36436602416de8bf09)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d98074a74730222f127b2ab53e131cc11faec14a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 0970eef56df1ac8fee1f3c5f0216a164be5048ec)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 207349be3ae6793ee83141da2648e695b5f711aa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 487a6e9f808af9fdc1dba6c0ecd05c4ee3974fce)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit a63b0d00306d639241a400cecbe3b0125ee8d303)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ff03813f9fcf79e32dd95a1f4913ba64392a1610)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0081194b40d1c5ab081e85539864a8513cccd311)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit eae0a7e065f867b9ba729281ba83b2568045ad50)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 656a179adb06b06e5367784cd39f5e2567ae4763)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3ec34be53a74ffc90e12beeb67c764e2a219eee4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 289400379213dea3169ba30196ff4ef8f87a4b03)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit fdc10bcbf81b42a2340f6fef2a1b4345d940145e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e2121f5b5e52b7f06177b4cbe5c8fa1a2ce55180)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 057e6c2bc8f7d88ff2e86f1abab97a705e2917a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 656969e79a50eca3cbc1b00ee20d88c542e7a7a5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 92a17f03a4484d54397e339fcb3f8af1cf9c63a0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 928a4cb465d7891157b1b061d144db6a808ada14)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c2f2c68a07a21f6fefd3be4682f9acd5405b5f5b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 37f4355e432dea8e9a88f221388324a2fa48f754)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 749045366310fe4269bb1c39a93adc5eb20a4f22)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 39d6ee4399a03fb4eb645024dbaf83acb3da1501)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8d08cd6122bc48a460123c445e8efcda6761cb00)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 4628d2e81cf97951e978ae1e18a6939767ad2b09)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ece005da13e632778c9e5546a5061323e05a4cf0)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 021a11f1114b8a3a6bd2c88c7506d86f955e9735)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 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>
(cherry picked from commit 7f3a35a917412da6fd5eb3211a0ac6ab7c869e4c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a0fc430b48e732527549c797bdff552c282d0571)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6da1fc8cc269737e38b921013917a20ccfcc4aba)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33144: Unescape text from authority lookup for advanced editor
Phil Ringnalda [Mon, 6 Mar 2023 05:24:56 +0000 (21:24 -0800)]
Bug 33144: Unescape text from authority lookup for advanced editor

While the basic editor is happy with an array of subfields it can
stuff into separate fields, the advanced editor needs to get a JS
string back from the authority lookup plugin, because it is going
to just add the whole thing as text. The string has to be HTML
entity encoded, both to not allow XSS and just to not break the
window, but it needs to then be unencoded before being inserted
into the editor.

Test plan:
1. Set the system preference EnableAdvancedCatalogingEditor to
   Enable
2. Edit any Topical Term authority, and at the end of tag 150
   subfield a, add & </script>
3. Cataloging - Advanced editor
4. Press return in the editor to get a new blank line, type 650
   and press tab three times, then type Ctrl-Shift-L
5. Search for your modified authority, and click Choose
6. Verify that the tiny popup opened by the search window finished
   its job and closed itself
7. Verify that your 650 now shows as "‡aAbduction &
   </script>‡vDrama" rather than "‡aAbduction  &amp;
   &lt;/script&gt;‡vDrama."

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 e171d5fdd319ec9d955992c9340bb9a1530e3aaf)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 2f1d407d4e45f54d7ebb53aa08a0e223ba423bf2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 738d97e59de27e86369c552a1ee56cc22b652136)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33211: Fix failing test
Nick Clemens [Mon, 13 Mar 2023 14:39:03 +0000 (14:39 +0000)]
Bug 33211: Fix failing test

This patch updates the selector to use the full class and find the text
type as well

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 587615fd9f63e74fdb42f7832845fe52e3f17a74)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 730f4e1500ad88e21f377b2b79a15879caf534bd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f702d225e3617bc21002d09e7646c548e8a2a4b9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 32519: In Elasticsearch mappings table use of search field name and label
Fridolin Somers [Fri, 23 Dec 2022 06:15:09 +0000 (20:15 -1000)]
Bug 32519: In Elasticsearch mappings table use of search field name and label

In Elasticsearch mappings table, in tabs for mappings we should add search field name in addition to label ; in order to find them when searching using DataTable search field. This is very useful when debugging.

Also the lines are sorting alphabetically by search field name.
So I propose to display name and label between parenthesis.
And also add label to the form in last line.

By default label equals name so I display label only if different from name.

Test plan :
1) Go to : Administration > Search engine configuration (Elasticsearch)
2) In first tabe edit a line to change label, for example : author => Auteur
3) Save
4) Go to second tab
5) Check you see a line with 'author (Auteur)' and lines with only name when label equals name
6) Look at last line (addition form)
7) Check you see in combobox : 'author (Auteur)' and lines with only name when label equals name

Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 14a2cc60a404709edc97f6daed8ad8e00dd884e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c654d8b51eb8d19302d131e430ec95f7ad4586f4)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27e430325ef7734d12bdd9017259e9f0521898d8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 33063: Make sure correct subgroup is pre-selected when duplicating reports
Katrin Fischer [Mon, 27 Feb 2023 23:45:12 +0000 (23:45 +0000)]
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports

When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a651ff50a6819396cc24c5f6bc47110cdd001873)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 36df529064afedcf366b7dc0f0ca79382cb1420a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b54b0fddcddf63417be6f2480e45ac8ec516bba9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
18 months agoBug 29607: Store the discount amount correctly when importing and order from a file v21.11.19
Christophe TORIN [Wed, 1 Jun 2022 12:14:38 +0000 (14:14 +0200)]
Bug 29607: Store the discount amount correctly when importing and order from a file

This bug fixes how the discount amount for an order is stored, when an order is added to a basket using "From staged MARC records".

Test plan:
1. Export a record (without the items) (Tools > Catalog > Export data).
2. Delete the record from the catalog (including any items).
3. Stage the record for import (Tools > Catalog > Stage MARC records for import).
4. Create a new vendor with a discount of 25%. (Or select and existing vendor that has a discount). (Acquisitions > New vendor)
5. Create a new basket for the vendor. (Acquisitions > Manage orders > search for vendors > New > Basket).
6. Add to the basket using "From a staged file":
   . select "Add orders" next to the staged file
   . select the record to add to the order
   . enter a price
   . leave the discount field blank
   . select a fund
   . select "Save"
   ==> The order is created!
7. Modify the order - note that the discount is showing on the form as .25% instead of 25%, also note that the discount amount is calculated correctly.
8. Check what is recorded in the database:
   . koha-mysql kohadev
   . select * from aqorders;
   ==> discount field for the basket item shows as 0.2500
9. Change the discount to 25%. Run step 8 again - discount amount will be correctly shown as 25.0000
10. Apply the patch.
11. Repeat steps 1-9 - discount amount is shown and calculated correctly.
12. Test modifying the discount amount - should be calculated and shown correctly.
13. Sign off!

See additional comments in the bug description.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a5f31c6e2ecc9c85558d57c3f26c6cdedaa68912)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoUpdate release notes for 21.11.19 release
Arthur Suzuki [Mon, 3 Apr 2023 11:53:06 +0000 (13:53 +0200)]
Update release notes for 21.11.19 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoIncrement version for 21.11.19 release
Arthur Suzuki [Mon, 3 Apr 2023 10:21:36 +0000 (12:21 +0200)]
Increment version for 21.11.19 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoFix translation errors for 21.11.19
Arthur Suzuki [Mon, 3 Apr 2023 09:56:43 +0000 (11:56 +0200)]
Fix translation errors for 21.11.19

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoTranslation updates for Koha 21.11.19
Koha translators [Thu, 30 Mar 2023 09:13:05 +0000 (06:13 -0300)]
Translation updates for Koha 21.11.19

19 months agoBug 33189: Make plugin upload look for .kpz files in file picker
David Cook [Fri, 10 Mar 2023 05:23:24 +0000 (05:23 +0000)]
Bug 33189: Make plugin upload look for .kpz files in file picker

This change configures the file picker to look for *.kpz files instead
of *.* files, which makes it more convenient to locate .kpz files
for upload when uploading plugins.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/plugins/plugins-upload.pl
2. Click on "Choose file"
3. Note that the file type in the box at the bottom right of the screen
defaults to "KPZ File (*.kpz)
4. If you navigate to a directory that contains .kpz files (like Downloads),
you'll now see directory folders and .kpz files.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb3fecd0461e91df9a907a85ea58bc5100ad3885)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c4c77251a2c243c79284ad254b1fc54bebaedd85)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ab71ea7e30e9c651516f531004041f07a0fb9dd0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33173: Save and continue button in standard cataloging module broken
Nick Clemens [Wed, 8 Mar 2023 18:49:57 +0000 (18:49 +0000)]
Bug 33173: Save and continue button in standard cataloging module broken

To test:
1 - Edit a record in the standard editor
2 - Click on to tab 2
3 - Click 'Save and continue'
4 - Error: tab is not defined
5 - Apply patch
6 - Reload page and try again
7 - Fixed!

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 35e117fb91e794d77b47f8668c0f9e1a1ddd4e63)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit b0d758cf2d5a15392ccd551f1b0a012a14e2d57e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcf364bebaf88121ed37f6694dc103645e8d5585)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32492: (follow-up) Add missing HTML filters
Owen Leonard [Mon, 13 Feb 2023 13:37:32 +0000 (13:37 +0000)]
Bug 32492: (follow-up) Add missing HTML filters

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6ca181083405d453a0d54eff309d36c0896c6d79)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit edb394527fba036599ac2fa02ab046bc4f034573)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9b320a8bf8834081b7f4893c7ec35af196dbeca3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface
Katrin Fischer [Fri, 10 Feb 2023 22:28:40 +0000 (23:28 +0100)]
Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface

Sometimes you want to hide notice from the messaging options
becaue the library is not using it. With this patch, we'll
have unique IDs on the <tr> to do so easily.

To test:
* Look at the messaging preferences
  * in the OPAC messaging tab
  * in the staff interface details tab
  * in the staff interface patron edit form
* Verify there are no classes or IDs on the rows or other elements
* Apply patch
* Verify there are nice IDs now on the table rows (tr elements)
  for each message.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7371ee848ffd12ea92bb5e7c33916b15cb8e54fd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 05163003b22192a29f735de3163edba8c2a6d8a2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0b63fb2a93ea9e0757f5846f8758a5777975d8fa)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32679: Use different CSS classes for titles of article requests in staff interface
Katrin Fischer [Fri, 20 Jan 2023 13:51:53 +0000 (13:51 +0000)]
Bug 32679: Use different CSS classes for titles of article requests in staff interface

The class article-request-title was used for the column with the
article title as well as for the link with the record title. This could
cause some confusion when changing the table with CSS. This patch makes
it so different CSS classes are used for each.

To test:
* Activate article requests in system preferences
* Make sure circulation conditions have article requets = yes
* Create an article request in staff or OPAC
* View the list of article requests in the patron account in staff
* Add the following line to IntranetUserCSS:
  .article-request-title { display:none; }
* Verify the Title column and the title from Record title (first column)
  have vanished.
* Apply patch: now only the column should vanish, Record title shoudl remain
  visible
* If you want: Verify that the record title has a differently named
  class now.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 974563bfeee29eedbd1b1475fd73599959285cb1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 021b9a5d2fdf7edee6916117266f773808e9073b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bfd23785efc7b0b7ce1bf849fe3febc5c419ae1c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33155: Fix category and library filters in patron search header
Jonathan Druart [Tue, 7 Mar 2023 12:55:19 +0000 (13:55 +0100)]
Bug 33155: Fix category and library filters in patron search header

Caused by
  commit f1925cf89dbc1039fc48abfabad1472289387148
  Bug 7380: Rename filter to avoid confusion

     [% IF categorycode %]
-        $("#categorycode_filter").val("[% categorycode %]");
+        $("#categorycode_filter").val("[% categorycode_filter %]");
     [% END %]
     [% IF branchcode %]
-        $("#branchcode_filter").val("[% branchcode %]");
+        $("#branchcode_filter").val("[% branchcode_filter %]");
     [% END %]

Forgot to rename the vars in the IF statements

Test plan:
Go to the Koha mainpage
Click "Search patrons" in the headers
Open the filters
Select something for library and category, search
=> The values must be picked for the patron search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79e4aabc31c85fc32f2f09599818fd7b4dff117f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 820c3cedb4737fbd6d19980e27d4325c0d6afe55)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e1edf9a3c8f43bf69a178159ba1691d01eb6b9b8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32819: Fix cataloguing/value_builder/stocknumberam123.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32819: Fix cataloguing/value_builder/stocknumberam123.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cc59823fa3cc25f79a4b247d6c66a07dfedbf045)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a06f4336dcf4b9809f18f588839ac33c9901759e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96bda428387d1ece43ee8a52cd06309b4054fd9a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32815: Fix cataloguing/value_builder/callnumber.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32815: Fix cataloguing/value_builder/callnumber.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa726e5329cda74f78e97c6ce379cfba93ea26f4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 00fa18c944df65f3205e97a5a1603d043cf5717d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91d9ec38a0350cef93f2b691e1f89f828f5ec5f5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32678: Add new line in authorized values tests in search_for_data_inconsistencies.pl
Fridolin Somers [Thu, 19 Jan 2023 07:12:48 +0000 (21:12 -1000)]
Bug 32678: Add new line in authorized values tests in search_for_data_inconsistencies.pl

In search_for_data_inconsistencies.pl, the test for authorized values is a list in one line :
* The Framework *VR* is using the authorised value's category *LOC*, but the following items.location do not have a value defined ({itemnumber => value }):
 {94 => AV} {95 => AV} {96 => AV} {97 => AV} {98 => AV} {99 => AV} {100 => AV} {101 => AV} {102 => AV} {103 => AV}

It would be more clear with new lines, especially for scripts (grep, awk ...) :
* The Framework *VR* is using the authorised value's category *LOC*, but the following items.location do not have a value defined ({itemnumber => value }):
 {94 => AV}
 {95 => AV}
 {96 => AV}
 {97 => AV}
 {98 => AV}
 {99 => AV}
 {100 => AV}
 {101 => AV}
 {102 => AV}
 {103 => AV}

Test plan :
1) In koha-testing-docker
2) Delete in authorized values LOC the value AV
3) Run misc/maintenance/search_for_data_inconsistencies.pl
=> You see the new line in result

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 45323886ae4b73007e2ae2f822ae70a0f46435d0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 1453472e93bc9a5d747b7f8ed08985a6726227a1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 519b4f2b59832f5ce5975add20dc8461ad7ca9bc)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32811: Remove useless lines for indexer.log
Marcel de Rooy [Fri, 3 Feb 2023 09:55:27 +0000 (09:55 +0000)]
Bug 32811: Remove useless lines for indexer.log

See also bug 32612.
The output option includes the stdout.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d27d39e4b8acccfbed7296106eadd1499d63e35b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 05d5b029f2b9ff1d7f4b2bdf17d9755a0a051289)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03abd18eb609b7fe103817e9888372b1d58c42c0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 31471: Send multiple ISBN with 'OR' for FindDuplicate
Nick Clemens [Fri, 24 Feb 2023 14:04:34 +0000 (14:04 +0000)]
Bug 31471: Send multiple ISBN with 'OR' for FindDuplicate

When a record has multiple ISBNs the database stores them seperated by a
pipe

Zebra interprets a string like "isbn:1600213510 | 9781600213519" as an 'OR' search, but for
Elasticsearch we need to explicitly send "OR" - and Zebra support this
as well

To test:
1 - Make sure you are using Elasticsearch
2 - Cataloging->Add a new record from Z3950
3 - Choose target: LOC
4 - Search for: Control number: 14455023
5 - Import and save
6 - Search for the record again
7 - Import and save - duplicate check isn't been triggered
8 - Apply patch
9 - restart_all
10 - repeat 2-7
11 - this time you should get a duplicate notification
12 - Sitch SearchEngine syspref to 'Zebra'
13 - repeat 2-7
14 - Ensure you still get duplicate notification

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 2dafd6f7491f64ad8179d00cbcdb3822be57f11f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 47ad3dd1b284c74a7b1850e45b3fb3d0e72f677e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 26d9092de48164418c103e79abcb7db81c8be5e7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33044: Return job id if there is no connection to rabbit
Nick Clemens [Wed, 22 Feb 2023 18:13:35 +0000 (18:13 +0000)]
Bug 33044: Return job id if there is no connection to rabbit

This patch simply ensures we return the job id even if we couldn't send
the job to rabbit.

To test:
1 - In KTD: sudo service rabbitmq-server stop
2 - sudo koha-worker --stop kohadev; sudo koha-worker --queue long_tasks --stop kohadev
3 - In staff client enqueue a batch item modification - note the link to view the enqueued job has no id in the url and takes you to the main background jobs viewer
4 - Run t/db_dependent/Koha/BackgroundJob.t and notice that it fails.
5 - Apply patch
6 - Restart all
7 - Enqueue a new batch item modification
8 - Confirm the link works and has the correct id
9 - Run t/db_dependent/Koha/BackgroundJob.t; it should pass now.

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 b93b6f3ddebdbcb53b435c1b9d7e64e235688d2f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 99454c388599a9f3eced976f913ead44b893d5d2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ff7b0a0cddf19b02ccf44ee4980d9aeafcede26b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32663: Limit streetnumber to 10 characters in OPAC
David Cook [Wed, 18 Jan 2023 01:28:38 +0000 (01:28 +0000)]
Bug 32663: Limit streetnumber to 10 characters in OPAC

This change harmonizes the patron streetnumber input between
the staff interface and the OPAC, so that you can only enter 10
characters into the streetnumber for the OPAC. Without this change,
a fatal error will be thrown trying to save the too long data.

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-memberentry.pl
2. Note that you can only enter 10 characters into the "Street number"
field as a self-registration patron
3. Log into Koha
4. Go to http://localhost:8080/cgi-bin/koha/opac-memberentry.pl
5. Note that you can only enter 10 characters into the "Street number"
field when editing logged in patron details too
6. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=S
7. Note that you can only enter 10 characters into the "Street number"
field as a staff member

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Solene Ngamga <solene.ngamga@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 9e19a88f021c1a53ef3324193b88c55b48e19e87)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit d26d371af93f0cfc6b1f78a27efc8a6600c2ee48)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 58a448b79cf28a30a361a6a6d7682deeb906903f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32639: Send opac-search.osdx without doing an empty search
David Cook [Mon, 16 Jan 2023 06:03:13 +0000 (06:03 +0000)]
Bug 32639: Send opac-search.osdx without doing an empty search

This patch sends out opac-search.osdx without running the entirety
of opac-search.pl without any search query.

This prevents unnecessary computations and warnings from appearing
in the logs.

Test plan:
1. Apply patch
2. Go to
http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription
3. Note that no errors appear in
/var/log/koha/kohadev/plack-opac-error.log
4. Verify that opac-search.pl still works as expected when
doing a search via the web UI

Signed-off-by: David Nind <david@davidnind.com>
JD Amended patch: remove ref to bug number, we use git!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0cf434b7a2654c17e60af1969faf99ca77ef42dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 9e4bf2945d4547efd9d99229f36633a13514bdda)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 19972170f1330e19d03f1f5ed12a236375bda6a0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33055: (bug 32624 follow-up) Don't send a screen message if not blocked
Nick Clemens [Thu, 23 Feb 2023 15:33:00 +0000 (15:33 +0000)]
Bug 33055: (bug 32624 follow-up) Don't send a screen message if not blocked

To test:
0 - Apply first patch
1 - prove -v t/db_dependent/SIP/Patron.t
2 - It fails
3 - Apply second patch
4 - prove -v t/db_dependent/SIP/Patron.t
5 - It passes!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c5c35aa32a7ff61e46d9198dee55a0239f55f96)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit a076542019dee21a64e18a43977d7256d266c80c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 69cfbbabe39347e33ab9efc3ecf4fd3fd9d5f6f4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33055: (bug 32624 follow-up) Unit tests
Nick Clemens [Thu, 23 Feb 2023 15:32:21 +0000 (15:32 +0000)]
Bug 33055: (bug 32624 follow-up) Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0324aed47056ab17de84849f2178d8a078c53468)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 06194137ec3d961710bbc37989a1bf37c4c2464a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1bf178a77e8ebab5c19ca7e0cbf3d7921f7502c4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32205: Remove unnecessary syspref template params for failed OPAC auth
David Cook [Tue, 15 Nov 2022 01:25:42 +0000 (01:25 +0000)]
Bug 32205: Remove unnecessary syspref template params for failed OPAC auth

This patch removes some unnecessary syspref template params for
failed OPAC auth. The templates handle these syspref using the
Koha.Preference() TT plugin function, so they're completely redundant
and just make checkauth() longer than it needs to be.

Test plan:
1) Apply patch
2) Enable OpacCloud, OpacBrowser, and OpacTopissue sysprefs
3) koha-plack --restart kohadev
4) Log out of Koha if you're logged in
5) Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
6) Note that you can see the Cart as well as links for the following:
Browse by hierarchy, Authority search, Tag cloud, Subject cloud,
Most popular

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 60e7c991650c42b0533ec9d2983e6920e32324ac)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ee4ed64ff00bb1eade9dfbde68e94902c38c98ff)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 160ee38bfbc4b23867fc297caa15c2e23c935796)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32824: Fix cataloguing/value_builder/unimarc_field_100.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32824: Fix cataloguing/value_builder/unimarc_field_100.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d25c2860c4b06a63048834fb99b2968f1fd57b1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 8b19e1c6a72ed16f74b492796244360e0b6636ad)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ea894f3953ab5d9c35fbecaf9932fbae51ff346c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32835: Fix cataloguing/value_builder/unimarc_field_122.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32835: Fix cataloguing/value_builder/unimarc_field_122.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
https://bugs.koha-community.org/show_bug.cgi?id=32825
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e557357e62b6d8655f40cd576a8de846a687abf1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 256b329850e6c0a080d905ec81fa3c40d6e91c30)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bafbe0c1b707d3cec50c184b52d08bd442deff0f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33048: Fix email link on error page when opac login not allowed
David Cook [Thu, 23 Feb 2023 00:43:31 +0000 (00:43 +0000)]
Bug 33048: Fix email link on error page when opac login not allowed

This change replaces a non-existent variable with the
KohaAdminEmailAddress syspref.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=opacuserlogin
2. Set to "Don't allow"
3. In an incognito window, go to http://localhost:8080/cgi-bin/koha/opac-reportproblem.pl
4. Note that the "mailto" link for "Email" has the value from KohaAdminEmailAddress syspref

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd9024abe25f0959f946ba9e219bc4ddce0587dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 502cbada71c468a84ac70b1a26d26388db2ba4b0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dc98c33f77ce807ca703272f89b027a3c838fc8d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33032: Remove alternateholdings_count
Jonathan Druart [Thu, 23 Feb 2023 14:46:48 +0000 (15:46 +0100)]
Bug 33032: Remove alternateholdings_count

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e36e393c7d05fc6e2af6391b908807655f6841e7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 48bc9e54d8c2647fc58cf118665a0988321800d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8172a2ac1456ef3a60d6de59c91236acae44b2b1)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 33032: Fix alternate holdings in staff interface search results
Fridolin Somers [Tue, 21 Feb 2023 20:03:25 +0000 (10:03 -1000)]
Bug 33032: Fix alternate holdings in staff interface search results

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ae1aeaac0715da95b65b9374ac8eba704e5d2409)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 33945d9ebac065bcaa448b25f9af9a7abd7ab865)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cafbb9332d00507c4cce4a6835a1f61796925ebb)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32926: Fix selenium tests
Jonathan Druart [Thu, 23 Feb 2023 09:05:38 +0000 (10:05 +0100)]
Bug 32926: Fix selenium tests

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f16baef8794870d12272cf173e5396a86aa7673c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 99f7e5efb35e6f6715af0a7812f937e637e543a1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 22e6d245980be79a6544d8e50e84bc388418ff29)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32926: Assign unique ids to <h3> elements
Andreas Roussos [Fri, 17 Feb 2023 15:05:20 +0000 (16:05 +0100)]
Bug 32926: Assign unique ids to <h3> elements

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

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

Test plan:

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

Signed-off-by: Fridolin <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 28a0c039fe9dec3ac97f069f30638ca24bcbf338)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit b73230a5f45d799a248c767ef3d6f2d9e0e37da0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 386f45da1272fd5078575bff41597fd15bf53c47)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32926: Add Selenium tests
Andreas Roussos [Thu, 9 Feb 2023 19:11:33 +0000 (20:11 +0100)]
Bug 32926: Add Selenium tests

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

Test plan:

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

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

Signed-off-by: Fridolin <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 14d65264afacc69389849a193e82e3694ee11d25)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 1c1d52b61aab146187eafd39dcf4eee00ae9067c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3681c928790319a9eeb6b6cb5ea4c9e9a01a6fe4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 31413: Set focus for cursor to Selector when adding a new audio alert
Owen Leonard [Mon, 6 Feb 2023 13:10:30 +0000 (13:10 +0000)]
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

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

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

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

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c8434553a29b177b879f958c59487cf854c3c13)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 5e593d098dab2f33a7a7ade03b7af64801765d8b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b0a16847fedcf8edc010247e8898ddfae90a1b3a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32982: Add primary button to libary group modals
Martin Renvoize [Thu, 16 Feb 2023 15:25:12 +0000 (15:25 +0000)]
Bug 32982: Add primary button to libary group modals

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

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9729621c1d8bf2573e7b7d08a69e6ef572b3388d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 0c66a9a9b39272d1acdcad334851a208be144421)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 204b7ecbc5793af19bd6524e9beabbe61b6dc454)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32829: Fix cataloguing/value_builder/unimarc_field_115b.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32829: Fix cataloguing/value_builder/unimarc_field_115b.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2edbc0529cece0e0cca0f3f2540132d19a5ebb3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit a538c7515c7b3bc69aca343831d1a3004df5d246)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3ac039fa890a89b928bfcda0422831013291fce7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32828: Fix cataloguing/value_builder/unimarc_field_115a.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32828: Fix cataloguing/value_builder/unimarc_field_115a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0117e26d9e099256567d2e97bbdb5ec7b2f61e77)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit eaac1f9659bb7ff904f078014be8a56ce39f9752)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e7765656ad0b35db4be6dbe568d1318c7398ca68)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32827: Fix cataloguing/value_builder/unimarc_field_110.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:52 +0000 (11:58 +0100)]
Bug 32827: Fix cataloguing/value_builder/unimarc_field_110.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e7ff8277b9bb700a172d769e1912b16dafdb754a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ded3e1121a4d179ea4323bdb9b43978f17cd321a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6909c790ae94fd695ef398f630f458420456ec5a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32825: Fix cataloguing/value_builder/unimarc_field_105.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32825: Fix cataloguing/value_builder/unimarc_field_105.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec85d23949b97dd0eea3efbd7acdf4abf3a068e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 98262166d911515a2ac38564c499218ab9d2fb84)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b7b798549ea1c33a75d035b9d7273312f7136891)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32826: (QA follow-up) Remove tab
Nick Clemens [Fri, 24 Feb 2023 16:47:46 +0000 (16:47 +0000)]
Bug 32826: (QA follow-up) Remove tab

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3df31967a8d05a3c7074a1afd2fed939462050ef)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 0deea298622a3336c9222ff6a97da494497ef054)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 980dd27c4fbbbb018f407a56d843fd09a88e1ae0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32826: Fix cataloguing/value_builder/unimarc_field_106.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32826: Fix cataloguing/value_builder/unimarc_field_106.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6c948b933e3991bc8ec17022cf87ad4e37ce1dd2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 351fda3f05416e0558e61a1248b85eb57774bd05)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c8f2dbc4bc73aa8b52249acb4e5578a07feec66a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32823: Fix cataloguing/value_builder/unimarc_field_100_authorities.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32823: Fix cataloguing/value_builder/unimarc_field_100_authorities.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 19c26fcc5a5ae72a2d6cd85d6586b82b154cbd08)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 47b8ccf8f53662aa197520ee416552d5fe17211f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 65fde1055d3f1a6e4558379dcdbfbeefcc3fa23f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32525: Standardize labels on list of ILL requests and ILL request details page
Katrin Fischer [Fri, 10 Feb 2023 22:57:44 +0000 (23:57 +0100)]
Bug 32525: Standardize labels on list of ILL requests and ILL request details page

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2dfafa5b9d3c8440d0f823d34661fbeeb0291b60)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 4b5163f25a9d654308cdd64d5bfd7ca80419d775)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d52dae84f289775af3065332f2e942e6f210786b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32822: Fix cataloguing/value_builder/unimarc_field_010.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32822: Fix cataloguing/value_builder/unimarc_field_010.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba84c41a88db57773716ffa40fb35a529db26e02)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 300c92bf0bf42b673d2b5d449758f9528061d2ac)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 49a99e5eafc83a006dbae81827fe8a89740a79f7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32820: Fix cataloguing/value_builder/stocknumberAV.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32820: Fix cataloguing/value_builder/stocknumberAV.pl

Use event parameter

This is part of the refactoring happening in bug 30975

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a672aed3d45b3741169565b17432e42c962c7d3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit f121caf3a3300e6f9e4ee5dc47c5129133e8a6a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ec7535a14f23b50b69914b6c14e95f5cbdb77dd8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32375: Move t/AuthoritiesMarc_MARC21.t to t/db_dependent
Danyon Sewell [Wed, 30 Nov 2022 23:58:02 +0000 (23:58 +0000)]
Bug 32375: Move t/AuthoritiesMarc_MARC21.t to t/db_dependent

t/AuthoritiesMarc_MARC21.t is now database dependent so it
needs to be in t/db_dependent to pass the tests.

Test plan (using koha-testing-docker):
1. If you run prove t/AuthoritiesMarc_MARC21.t without stopping
   the database, the tests will pass. To get the tests to fail:
   1.1 Stop the database - from a new terminal window run:
       docker stop koha-db-1
   1.2 In your Koha container run: prove t/AuthoritiesMarc_MARC21.t
       ==> The tests fail 8-(
2. Restart the database container from the terminal window you
   stopped it in: docker start koha-db-1
3. Apply the patch in the Koha container as normal.
4. Run: prove t/db_dependent/AuthoritiesMarc_MARC21.t
   ==> The test pass!
5. Sign off D:

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0688e18e624fb40ddc30bab8ec306bf8d8baa798)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32933: [21.11.x] Use val() instead of attr("value") when getting field values...
Owen Leonard [Thu, 9 Feb 2023 16:50:38 +0000 (16:50 +0000)]
Bug 32933: [21.11.x] Use val() instead of attr("value") when getting field values with jQuery

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

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

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

Works as described.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d394c95770f69a16cf337b748a61308b3250bc98)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32307: Fix local cover images
Jonathan Druart [Thu, 23 Feb 2023 11:09:42 +0000 (12:09 +0100)]
Bug 32307: Fix local cover images

We were not calling the function here!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 77b3e01ca04d41be5b95222c84a223f9751dfe99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0588f7720f8841e7e9f889d85187ba0f10fc8df1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 60f4fa52b6281d7bedfbc851d6a7638e595a2ec8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32307: (follow-up) Fix gallery when Coce is enabled
Jonathan Druart [Fri, 25 Nov 2022 06:04:43 +0000 (07:04 +0100)]
Bug 32307: (follow-up) Fix gallery when Coce is enabled

Yet another fix, this is porting the following change to the intranet:
  commit 1916c644808577beb3170d642f93b456bfcc5c56
  Bug 28180: Fix bug with first image does not exist

To recreate the problem:
Enable Coce
Go to biblionmber=5 detail
=> No image (but one is displayed on the search result)
Add a local cover image
=> Only the local cover image is displayed
Apply this patch
=> Both images are displayed
Remove the local cover image
=> Image from coce 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 d534d9186ce5af4b7054fe021c3a1d4afd2c3d55)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a5bf4499bbede6597984c83f127aa0fddd524860)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit febce968ac0ae0839b7d6fc4a4573e6c16101912)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32307: Fix gallery when Coce is enabled
Jonathan Druart [Tue, 22 Nov 2022 06:52:49 +0000 (07:52 +0100)]
Bug 32307: Fix gallery when Coce is enabled

Bug 28179 added the gallery in the staff interface, and bug 28180 in the
OPAC.

OPAC and staff have different code, because the cover image providers
are different.
On bug 28180 we noticed that the OPAC needed additional code to handle
OpenLibrary, Google Jacket and Coce, to differ the creation of the
gallery to prevent Chocolat to be instantiated before the links (img src)
are effectively in the DOM.

To acchieve that we introduced a wait_for_images function, and added a
"done" flag to the 3 "JS modules".

However we haven't ported this code for the staff interface, which is
also using Coce.

Note that there was a bug at the OPAC as well for COCE, the ajax jQuery
function is async, and so 'done' was set even if the call was not
finished.

Test plan:
0. Do not apply this patch
1. Enable LocalCoverImages and IntranetCoce
2. Pick a bibliographic record with an image returned from Coce
3. Add a local cover image
4. Go to the detail page
5. Open the gallery
=> Notice that you can notice a JS error and a loading icon on the
second image. This behaviour is not always broken, it depends on the
speed of the Coce server. If you don't see the problem reload the page.
6. Apply the patch and repeat
=> Notice that the cover slider block is longer to display the icon, but
that the error is gone.
7. Confirm that there is no regression at the OPAC

We could improve the situation here, and we could display the images
in the slider, especially if the first image is a local image. But
that's for another bug...

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 fd6cbf2273f71acd39bbc920400da50aed55030c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e98f10fa9e2da040eb12a2519db0ddb59f43c0e7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8ffc0757a8e675df97346d68ead11c50971ca5a4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32999: Click handler to show QR code in OPAC lacks preventDefault
Owen Leonard [Fri, 17 Feb 2023 16:07:36 +0000 (16:07 +0000)]
Bug 32999: Click handler to show QR code in OPAC lacks preventDefault

This patch adds "preventDefault()" to the click handler for showing
the bibliographic detail QR code. This prevents the page from scrolling
to the top when the user clicks the link.

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

Locate a bibliographic record and view the detail page. If necessary,
reduce the size of your browser window so that you have to scroll down
a bit to bring the "Send to device" menu item into view in the sidebar.
Click the link to confirm that it shows the QR code and that the page
doesn't jump to the top.

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>
(cherry picked from commit 5ba3eea4959cc9a89ff21b92fb12c342fed973d7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit db04e01f66cd39f1cee1d47774d6d6349559f78c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 85889a919345a3942214f9fca3952fe23f089334)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32816: Fix cataloguing/value_builder/cn_browser.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32816: Fix cataloguing/value_builder/cn_browser.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: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d18772c3c28a339e3f4b59628a477e9c7603e3e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e2344b96e84508530407542856f437e0abadc21c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28ff9448fd8ec8e9fa3aeccf4375606a605f47da)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>