]> git.koha-community.org Git - koha.git/log
koha.git
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>
19 months agoBug 32821: Fix cataloguing/value_builder/stocknumber.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32821: Fix cataloguing/value_builder/stocknumber.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 97c050eacb87cc78f8cdfc3a37d240372b164437)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 475871b3a40dd77ddbd487da30e34cdad5deb6cf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cfb990f641557de9ed1656dd07fd071b6c464b52)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32814: Fix cataloguing/value_builder/callnumber-KU.pl
Julian Maurice [Fri, 3 Feb 2023 10:58:51 +0000 (11:58 +0100)]
Bug 32814: Fix cataloguing/value_builder/callnumber-KU.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 a925b07f7b5c182f2c8050886d58e08ce065eff3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bb388991ac8c46cdd785b98706606e2b7fcebde3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64f03c5217bf6139a065b1e88386fc1a872beec8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 31209: Add a span with a class for items.enumchron in the checkouts list
Katrin Fischer [Thu, 9 Feb 2023 22:04:17 +0000 (23:04 +0100)]
Bug 31209: Add a span with a class for items.enumchron in the checkouts list

To test:
* Add or edit an item and add some info to the 'Serial Enumeration /
  chronology' field
* Check the item out
* Verify by checking the source code or using the element inspector
  that the title and enumchron have been merged into one string
* Apply patch
* Reload and verify that now the enumchron is wrapped in a span
  with class="item_enumeration" matching the class in the list of
  checkins

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 736805ae5c4e13c8ea8523fbfe5eeea4ae90759f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 871889e234ce0e975c775fe3bb03840063abf42d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87b44b03a4e57fd999554214d9353d328b8b52f4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32979: Skip test if running as root
Kyle M Hall [Fri, 17 Feb 2023 13:46:58 +0000 (13:46 +0000)]
Bug 32979: Skip test if running as root

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7a8a2d7110cd7f2fa5d4218665496b4c4be66ab3)
(cherry picked from commit 94f01de8ab2b6241852a51062692c34ad044cd04)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c4e423416455da042bf628bc883ca975882efe8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32979: Add Test::Exception to Logger.t
Marcel de Rooy [Thu, 26 Jan 2023 15:08:24 +0000 (15:08 +0000)]
Bug 32979: Add Test::Exception to Logger.t

Test plan:
Run t/Logger.t
Note: Run under koha user, not root. Root wont have
the permission failure which is tested.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cdc018c810667681e88fbff9a9aca5720b816e6)
(cherry picked from commit 1575f81c8bcdbea3ba2f3bccf67c81e5da067af3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 06cbe54392f7842680e3994ceac31da800d0588c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32566: Don't show "ILL request log" when IllLog is disabled
Katrin Fischer [Thu, 9 Feb 2023 21:38:38 +0000 (22:38 +0100)]
Bug 32566: Don't show "ILL request log" when IllLog is disabled

When the IllLog system preference is disabled there will be no
log to view and the log will always appear empty.

To test:
1) Activate the IllModule system preference
2) Install a backend (BLDSS or FreeForm) following the wiki instructions:
   https://wiki.koha-community.org/wiki/ILL_backends
3) Go to the ILL module and add a new request
4) The "ILL request log" entry in the toolbar should be visible
5) Turn off the IllLog system preference
6) Reload the page - the option should remain visible
7) Apply patch
8) Verify the link is now no longer visible after reload
9) Re-activate the IllLog
10) Verify the option now appears

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1ca05ac77f0d2537967bbf000a09cdb0a74a2d1)
(cherry picked from commit 86ec29294386f3882d2eb1686d0e27c54792e8c2)

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

Use event parameter instead of id.

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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8327b7d86e35d9b34e815d5aa686dea6d8814cfe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 47272d22398a39a037d8c27639e1eee6574f86c6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40acf0bcf1565ab321f0d233b3240e094d665d94)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 22693: ILL "Price paid" column does not appear in column configuration
Jacob O'Mara [Mon, 9 Jan 2023 10:32:23 +0000 (10:32 +0000)]
Bug 22693: ILL "Price paid" column does not appear in column configuration

Test Plan:
 - Navigate to ILL requests page from the main menu after setting up your ILL backend.
 - Observe that Price Paid column does not exist either here nor in the column configuration.
 - Apply patch
 - Observe that Price Paid column now appears in ILL requests table and in the column configuration page.

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 c5abf57f5a2164e118eeac0e021038eb71df2644)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit fff5619e4812b946e7317027aa0ca7df7d16ed19)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ecb970b05920bb40ff37140c4e83d0747a57033d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 32909: Load item type icons from the correct path
Andreas Roussos [Wed, 8 Feb 2023 14:07:52 +0000 (15:07 +0100)]
Bug 32909: Load item type icons from the correct path

When placing an item-level hold in the Staff interface,
the table at the bottom of the screen (under the "Place
a hold on a specific item" heading) should display the
icon associated with the item type of each item in the
'Item type' column.

This feature broke in v22.05.00 (for Debian package installs):
instead of the item type icon you get the default 'broken
image URL' image of your web browser.

This patch fixes that.

Test plan:

1) (if needed) Configure the following System preferences:
   - item-level_itypes => 'specific item'
   - noItemTypeImages  => 'Show'

2) (if needed) In Koha Administration > Item types, create
   an item type and associate it with an icon

3) (if needed) Create a test bibliographic record, and add
   an item to it that has an item type with an icon

4) Visit the bibliographic record's details page in the
   Staff interface. Select 'Holds' on the left hand side,
   then pick a patron. The "Place a hold on ..." page should
   load. In the 'Item type' column of the table at the bottom
   of the screen notice that instead of seeing the icon
   associated with the item type of each item you get the
   default 'broken image URL' image of your web browser [*]

   [*] In non-Debian package installs, the 'href' property
       of the item type icon's <img> tag should start with
       '/opac-tmpl/bootstrap/itemtypeimg'

5) Apply this patch, restart Plack and refresh the page.
   The item type icon should now be displayed correctly.

   KTD and Koha Sandboxes users: To verify the patch has
   worked, you should right-click on the item type icon and
   click 'Inspect': the 'href' property of the <img> tag
   should now start with: '/intranet-tmpl/prog/img/itemtypeimg'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ed84cfd43b0d7c135d96b712713787cf7fd53834)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit c206321d2f27b4fac54c5249f0c087fc203d36f5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2849807f08f904a732d1c74f1522f5c1444b376b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 30993: (QA follow-up) Add missing filter
Tomas Cohen Arazi [Wed, 15 Feb 2023 12:27:50 +0000 (09:27 -0300)]
Bug 30993: (QA follow-up) Add missing filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2697f7884bbb1c68e09f47a5260b4c801f30bfe2)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit da902da6e8ddc09a88fd99c07314ce5a257336a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4b75458778db3e01f59187a5cdff41e1c9091eac)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 30993: Improve translatabilty of UPLOAD av hint
Katrin Fischer [Fri, 6 Jan 2023 23:06:52 +0000 (23:06 +0000)]
Bug 30993: Improve translatabilty of UPLOAD av hint

Improve translatability on the hint for AV UPLOAD
on the upload tool page.

To test:
* Go to tools > uploads
* Verify that the hint below the 'Browse...' displayes nicely
  and the link to the UPLOAD AV works correctly
* Apply patch
* Verify the link still works and the sentence reads correctly.
  NOTE: now only UPLOAD will be linked.

If you are familiar with the process, you can also make sure
the strings now show up on po files as expected:
https://wiki.koha-community.org/wiki/Translating_Koha#Updating_the_po_files_in_your_installation

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 453793f714367178a2642bfd3115bfc82556ebd0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 6a12576d015627305b71b60f161590e24d9bcc33)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 44e83819aa429cfc3545af5d80f805e48bbfd374)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 31957: (QA follow-up) Add missing filters
Tomas Cohen Arazi [Wed, 15 Feb 2023 12:32:07 +0000 (09:32 -0300)]
Bug 31957: (QA follow-up) Add missing filters

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6bf78a1073857b6a1e6b76a99b7f26380122d36)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit b0ffe61e3eae193f443a579688fabdc91d6d60ef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 84f255a465abc0efd64847686f8d4b7673f275dd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 31957: (follow-up) Further improve translations
Katrin Fischer [Mon, 9 Jan 2023 20:00:53 +0000 (20:00 +0000)]
Bug 31957: (follow-up) Further improve translations

With the previous attempt, we ended up with some TT
constructs in the po files. This will hopefully avoid that.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d2a281ad4b80fc74bfeaab8260408bb354f7a9b8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit ce76a551fe012fde66f1c9d893d2a19e424e458e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d49a97768f46a92467ca4fd1fe360b5d7f21c8c3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoBug 31957: Improve translatability of text containing links on libraries admin page
Katrin Fischer [Fri, 6 Jan 2023 22:33:43 +0000 (22:33 +0000)]
Bug 31957: Improve translatability of text containing links on libraries admin page

The libraries administration page has several links to system
preferences that appear within sentences or with other text
around it. To make translations easier, we need to make sure that
those links don't break context.

To test:
* Activate IllModule (so we can see the ILL staff email setting)
* Go to administration > libraries
* Verify that the links for those settings show correctly
  * Reply-to
  * Return-Path
  * Ill staff email
  * MARC organization code
* Apply patch
* Verify links still work and show unchanged

If you are familiar with the process, you can also make sure
the strings now show up on po files as expected:
https://wiki.koha-community.org/wiki/Translating_Koha#Updating_the_po_files_in_your_installation

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

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0e64ead240fd6df47a1a11e4e2439b1c9869da07)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 45c783398d6d89054d43aa1fbddb80b0b739a253)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 58ba320d3a97e68c0634b1c1cc312fb12b9457df)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
19 months agoFix release notes 21.11.18 v21.11.18
Arthur Suzuki [Fri, 10 Mar 2023 11:05:32 +0000 (12:05 +0100)]
Fix release notes 21.11.18

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32472: [21.11] Force scalar context on acqorder->items
Marcel de Rooy [Thu, 15 Dec 2022 10:09:38 +0000 (10:09 +0000)]
Bug 32472: [21.11] Force scalar context on acqorder->items

This resolves a crash like
    The method Koha::Item->count is not covered by tests!
on the template construction
    [% IF ( order.items.count ) %]
in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt.

Test plan (21.11):
Receive an order line under this condition: quantityreceived>0 with
items attached to the order line.
Note: Should be possible, comes from production logs.

Look for list context on ->items called from acqorder.
The result of git grep "\->items" is too wide but we could theoretically
miss an occurence with git grep "order.*\->items". With order.* we do
catch $new_order_object->items..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
20 months agoBug 32472: Fix wrong POD for bookseller->subscriptions
Marcel de Rooy [Thu, 15 Dec 2022 10:04:14 +0000 (10:04 +0000)]
Bug 32472: Fix wrong POD for bookseller->subscriptions

You should not call this in list context anymore after
bug 29844.

Test plan:
Check pod of Bookseller.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
20 months agoFix db_revs permissions
Arthur Suzuki [Mon, 6 Mar 2023 13:41:02 +0000 (14:41 +0100)]
Fix db_revs permissions

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoUpdate release notes for 21.11.18 release
Arthur Suzuki [Mon, 6 Mar 2023 11:18:29 +0000 (12:18 +0100)]
Update release notes for 21.11.18 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoUpdate release notes for 21.11.18 release
Arthur Suzuki [Mon, 6 Mar 2023 11:14:13 +0000 (12:14 +0100)]
Update release notes for 21.11.18 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoIncrement version for 21.11.18 release
Arthur Suzuki [Mon, 6 Mar 2023 11:13:43 +0000 (12:13 +0100)]
Increment version for 21.11.18 release

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoFix translations for Koha 21.11.18
Arthur Suzuki [Mon, 6 Mar 2023 10:26:20 +0000 (11:26 +0100)]
Fix translations for Koha 21.11.18

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoTranslation updates for Koha 21.11.18
Koha translators [Mon, 6 Mar 2023 08:10:33 +0000 (05:10 -0300)]
Translation updates for Koha 21.11.18

20 months agoFix dbrev permissions
Arthur Suzuki [Sun, 19 Feb 2023 11:13:46 +0000 (12:13 +0100)]
Fix dbrev permissions

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 29792: DBRev 22.11.17.002
Arthur Suzuki [Wed, 22 Feb 2023 22:37:00 +0000 (23:37 +0100)]
Bug 29792: DBRev 22.11.17.002

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 29792: [21.11.x] Automatically send wrong transfers
Nick Clemens [Fri, 30 Sep 2022 11:01:56 +0000 (11:01 +0000)]
Bug 29792: [21.11.x] Automatically send wrong transfers

Bug 24434 reinstated the 'updateWrongTransfer' call here, but made the assertion that
the transfer should not be sent until 'Ok' was clicked.

I see how unsent transfers are useful for rotation, but I believe for wrong transfer we shouldn't require a confirm or print. If a library does want to, the 'transfersblockcirc' system preference will enforce clicking the button
to continue

This patch also confirms a transfer when item already has a transfer and only options are Confirm/Print because the transfer already exists

To test:
1 - Disable TransfersBlockCirc system preference
2 - Manually transfer an item from branch A to branch B
3 - Check in the item at branch A
4 - Dismiss modal without confirming
5 - View item on biblio details page, item not in transit
6 - Check in item, confirm transfer
7 - Note item in transit on details page
8 - Check in the item at branch C
9 - Dismiss modal without confirm
10 - View item on biblio detail, not in transit
11 - Checkin at A, cancel transfer
12 - Apply patch
13 - repeat 1 - 4
14 - Confirm item appears in transit
15 - Check in at branch C, dismiss modal
16 - Confirm item in transit

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7f04df1625a1f0a0171e3c839c3aa7baca7d1286)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32539: Add tests
Jonathan Druart [Thu, 9 Feb 2023 10:45:02 +0000 (11:45 +0100)]
Bug 32539: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7bb4aeba9f10336d836f31b9e572390dd5bf588a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 24363f91da4f02e02101456fc3e24fdce955b786)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b5621e9313448a255f70d3ad468c4ec157f21ded)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32539: Add exception handling to plugin hooks in template plugin
David Cook [Mon, 16 Jan 2023 04:41:01 +0000 (04:41 +0000)]
Bug 32539: Add exception handling to plugin hooks in template plugin

This change wraps Koha plugin hook calls with exception handling
within the template plugin for Koha plugins.

Test plan:
0) Apply patch
1) Install a plugin that provides "opac_head", "opac_js",
"intranet_head", and "intranet_js" with Perl errors in them
2) Load an OPAC page
3) Note that the OPAC page loads correctly
4) Load a staff interace page
5) Note that the staff interface page loads correctly

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 23a002112273d2b406af7edd6b85acce0d5d699c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 0623ba78e5ea1510de2314ea80bd846adb75259b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 19772ed318511ead52fc499ad7fa471ef38d2752)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 29173: (QA follow-up) Match pop-over sizes
Martin Renvoize [Wed, 8 Feb 2023 06:56:20 +0000 (06:56 +0000)]
Bug 29173: (QA follow-up) Match pop-over sizes

As suggested by David Nind, this patch updates the call to z3950 search
on the authority edit page to match the sizing of the one from the
details page.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d25b7459b4ff4fd9f6acd539ab547fcb57dac6e0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 353d9dda3e4dfe6f8c446b50f73e3c489cf75d64)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit acdcc8a86cc6102f61d0f56b4c3b7a4299eb829b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39...
Thibaud Guillot [Tue, 29 Mar 2022 14:12:48 +0000 (16:12 +0200)]
Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail)

Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action.
Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action).
Unimarc and Marc21 specificities are supported.

Test Plan :

1) You must have a Z39.50/SRU server for authorities
2) Go to an authority detail page (Author - Uniform title - Subject)
3)After go to "Edit"-> "Edit record" -> "Replace record via..." or
choose "Replace Record.." directly
4) See that form is also prefilled with data now

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 26c26164ba78029cb99fa99662f9e0a8ce9557df)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit d788bf07c2dcc365867c1fa765caa87e8a659ae4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d14e8852b52e89acc33e1ad2213ac2545f90cbd8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32356: Install installer translated files on update
Jonathan Druart [Tue, 29 Nov 2022 09:22:10 +0000 (10:22 +0100)]
Bug 32356: Install installer translated files on update

If the installer files exist for a given language, the translate script
won't update it.
We should get a confirmation from Bernardo (author of bug 24262), but I
don't understand why it could be needed (side-effects?)

Test plan:
Installer several times the same language, drop the DB and run the
installer+onboarding process.
Check files installed by the installer (yaml for notice templates,
biblio frameworks) have inserted the data properly in DB.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa3444505f2b47a73f4b281a622b6c1073bb5c8d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 27d128c3ab24096fccb1fa96a05ad7173c9bbc9d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c19bb0532483da1ff7e0af3a98965550e744f68)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 28672: (QA follow-up) Method calls cannot be interpolated directly
Kyle Hall [Wed, 1 Feb 2023 11:52:01 +0000 (06:52 -0500)]
Bug 28672: (QA follow-up) Method calls cannot be interpolated directly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8939c58a862c819e8af6366c664ec89fbe3f7547)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit 6f2aeda4c3a9e294765749a51570949b90e70d26)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ed8ae33295566dd0a94fa0808b33a7d8383b940)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 28672: Pass itemnumber instead of item object
Martin Renvoize [Wed, 7 Jul 2021 11:43:36 +0000 (12:43 +0100)]
Bug 28672: Pass itemnumber instead of item object

The warn call here was passing the full item object which leads to
HASH() in the logs.. this patch updates it to pass the itemnumber which
is more helpful.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c89c25d81aa8d6a2500820b84aaf7a5c157ed815)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit bc23e4a1d8b72192e70e6cb31f64b630280575ec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ab792fa6c8fe0419257f7e006f401209961b0a1a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 31407: Set focus for cursor to Currency when adding a new currency
Katrin Fischer [Sat, 4 Feb 2023 23:58:05 +0000 (23:58 +0000)]
Bug 31407: Set focus for cursor to Currency when adding a new currency

This makes sure that the focus is on the first field of the
form when adding a new currency.

To test:
* Go to administration > currencies
* Add a new currency
* Verify the focus is not on the form
* Apply patch
* Repeat, verify the focus is now on the first input "currency"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fcb19865e82c6389f64a984ed8ef0dbde5afc2d7)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 1d19b62a24a50f3458040881e3463e7d827d5612)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f09eed687cf35f9c4f8423cda74be5ca4ed3ec0f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 31768: Add tools toolbar to tags page
Katrin Fischer [Mon, 6 Feb 2023 22:06:32 +0000 (22:06 +0000)]
Bug 31768: Add tools toolbar to tags page

The tags tool was missing the toolbar on the left side.
With the filters, this patch adds the toolbar below, like
we do on other pages like HTML customizations.

To test:
* Go to Tools > Tags
* Verify no toolbar
* Apply patch
* Verify toolbar is now present
* Compare to other tool pages
* Sign off :)

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 2b63498545b41929d26ab9f3fbeecfa33e277cc3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a464971441887bdcadb170edef06faf68b5cd6c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b0025d14d866f786c453a36c62f33d9bdcedc829)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32523: Links to missing fields in MARC editor error
Jan Kissig [Wed, 4 Jan 2023 13:04:28 +0000 (14:04 +0100)]
Bug 32523: Links to missing fields in MARC editor error

This bug appears after switching to the new staff interface design (from 22.05 to 22.11).
When adding/editing a biblio in staff interface leaving out mandatory fields and click on save, you get an error dialog with shortcuts/links to these missing fields. Clicking on these links should change section tabs and focus the field.
This patch fixes that error.

Test plan:
1) in staff interface go to /cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
2) click Save
3) Error dialog appears, informing about missing input in mandatory fields.
4) Click on tab 0 (section 0) to make sure only marc 0XX fields are visible.
5) In the error dialog click on a "Go to field" which points f.e. to section 9
6) The selected / active tab will switch to section 9 and will not focus on the selected field
7) apply patch
8) repeat step 1) to 6)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d7dcd3d1a8fd41bf76e1cf406f9cb92e6f998e52)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit c7c97aec66024b79544378a26ec31d0637c5e3ff)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ce3238cddf7e62047533f40219bc1be754b2705b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32290: Fix terminology on ILL requests page
Katrin Fischer [Sun, 5 Feb 2023 02:18:05 +0000 (03:18 +0100)]
Bug 32290: Fix terminology on ILL requests page

This makes some fixes for the terminology used in
the ill-requests.pl page:

This item cannot be issued as it has no biblio record associated with it
> This item cannot be checked out out as there is no bibliographic
  record associated with it

You must choose a branch
> You must choose a library

View borrower details
> View patron details

Test plan:
* You can set up ILL using the instructions on
  https://wiki.koha-community.org/wiki/ILL_backends
* All strings will be located on the ILL request management page or
  the ILL requests list
* Or... you could verify looking at the patch itself

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 59cffea5d0e113b59c93e780a191232d9ad6546e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 1cbecfb143c62871a188a523939ef3e500d4234e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f98d0caa4d5ab2264f0a6506f32a5031b53bff31)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 30250: DBRev 21.11.17.001
Arthur Suzuki [Fri, 17 Feb 2023 12:56:20 +0000 (13:56 +0100)]
Bug 30250: DBRev 21.11.17.001

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 30250: Fix atomicupdate permissions
Tomas Cohen Arazi [Wed, 9 Nov 2022 17:12:50 +0000 (14:12 -0300)]
Bug 30250: Fix atomicupdate permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 73865a6072091fdcf70610a7cb99c4a8a14479a7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ca62cfc83946f8b3fbf65c0789d1be09a8dfe25c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 30250: (follow-up) Clarify syspref wording around importing
Aleisha Amohia [Wed, 7 Sep 2022 02:35:42 +0000 (14:35 +1200)]
Bug 30250: (follow-up) Clarify syspref wording around importing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10e4aa2ee222d1fca07c0406eab412fd378739f1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a1be65eea503f514a63d1022f509498165e861dd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 30250: Use ApplyFrameworkDefaults when importing a record
Aleisha Amohia [Tue, 22 Mar 2022 21:26:35 +0000 (21:26 +0000)]
Bug 30250: Use ApplyFrameworkDefaults when importing a record

This patch adds the case of importing a record to the
ApplyFrameworkDefaults options.

To test:
1. Update database
2. Confirm the ApplyFrameworkDefaults system preference now has the
'when importing a record via z39.50' option. Do not select it.
3. Go to Cataloguing. Import a record from z39.50, or replace an
existing record.
4. Confirm framework defaults are not applied.
5. Go back to the system preference and check the 'when importing a
record via z39.50' option.
6. Repeat step 3. This time framework defaults should be applied. Only
fields that are empty in the imported record will be replaced by
framework defaults.
7. Repeat for authorities.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b837f1356b0c25801bab09f95f1881c831cf4cd3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2800e199be5b871790700e8265d4ce23956b8fb0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 30250: Add ApplyFrameworkDefaults system preference
Aleisha Amohia [Wed, 9 Mar 2022 01:13:03 +0000 (01:13 +0000)]
Bug 30250: Add ApplyFrameworkDefaults system preference

(cherry picked from commit 684a04deb6ec7e94ca60f5cb38811176fbb9c230)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d42de2c657b6432c3223291f663eac5fc25b8706)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4764daae3bf9c2505720cb53ad34da2dabfd475)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 30250: Use ApplyFrameworkDefaults when cataloguing
Aleisha Amohia [Wed, 9 Mar 2022 01:13:32 +0000 (01:13 +0000)]
Bug 30250: Use ApplyFrameworkDefaults when cataloguing

This patch adds a system preference ApplyFrameworkDefaults to configure
when to apply framework defaults - when cataloguing a new record, when
editing a record as new (duplicating), or when changing the framework
while editing an existing record. This applies to both bibliographic
records and authority records.

To test:
1. Update database
2. Go to Administration -> system preferences. Find the
ApplyFrameworkDefaults system preference. Confirm "when cataloguing new
records" is selected by default.
3. Keep the system preference open in one tab, and open the staff client
in another tab.
4. Go to Administration -> bibliographic frameworks. Choose a framework,
edit the subfields for a tag, and give a subfield a default value. For
example, set 500$a for the BOOKS framework to have a default value of
"TEST". This will be Framework A.
5. Ensure you have another framework that does not have the same default
value for a subfield as Framework A. This will be Framework B.
6. Go to Cataloguing. Add a new record using Framework A. Confirm your
subfield has the default value filled. Cancel and do not save the
record.
7. In your System preferences tab, uncheck the option "when cataloguing
new records" and save. No options should now be selected.
8. In our other tab, go to cataloguing, add a new record using Framework
A. Confirm your subfield does NOT have the default value filled. Fill
the required fields, including the subfield that should have a default
value, and Save the record.
9. In your system preferences tab, select all options and save.
10. In your other tab, click Edit, then "Edit as new (duplicate)".
Confirm your subfield has maintained the value from the source record.
Cancel and do not save the record.
11. Edit your original record and delete the value in your subfield that
could be filled with a default value by the framework. Save the record
with no value in the subfield.
12. Click Edit, then "Edit as new (duplicate)". Confirm your subfield
has the default value filled. Framework defaults will only apply to
emplty fields. Save the record.
13. Do a catalogue search and find a record that uses Framework B.
14. If you need to, edit the record to make sure there is nothing in your
subfield that should have a default value if this record were to use
Framework A, and Save.
15. Edit the record. Using the settings dropdown, change the framework
to Framework A. Confirm your subfield has the default value filled.
16. Repeat steps 4 to 12 with authority types and authority records.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d42b5ff641397a4fbaeb601e2e00cd71e05e001)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 730248c154ad5acb3902e05c62d3ffd28f6697d0)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32294: Fix capitalization for user ID in self checkout
Katrin Fischer [Sun, 5 Feb 2023 01:24:58 +0000 (02:24 +0100)]
Bug 32294: Fix capitalization for user ID in self checkout

Fixes capitalization of "user ID" on the self checkout help
page.

To test:
* Enable WebBasedSelfCheck
* Go to: /cgi-bin/koha/sco/sco-main.pl in the OPAC
* Log in and open help
* Verify there is a User ID within a sentence and a User id in the heading
* Apply patch
* Both should be corrected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a5f300d9fd78a684ae006aecfe44277ab2858310)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit e5efd957d085993fd691386dabe842a895ecbece)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38907dc447fed0c74b1fb76e23eeda2c1d7f2147)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32624: Don't include guarantee or guarantor fines in BV (fines amount) in SIP...
Nick Clemens [Fri, 13 Jan 2023 19:27:04 +0000 (19:27 +0000)]
Bug 32624: Don't include guarantee or guarantor fines in BV (fines amount) in SIP messages

This patch chanegs the code to report only the patron's personal fines, and to report a block
from other fines in the screen message

This is to prevent overpayment on accounts from SIP machines

To test:
1 - prove t/db_dependent/SIP/Patron.t

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 c6c2fe81a273cbb70af69dfa0b51b2f07b49a76c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit dd2fedd2a1d06003091b052b220422fe8a5def7d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9b0656a62c893573824a1acd7fc400a1bd4e8d0c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 29755: (follow-up) Mock NoIssuesChargeGuarantorsWithGuarantees in test
Nick Clemens [Thu, 28 Apr 2022 11:07:17 +0000 (11:07 +0000)]
Bug 29755: (follow-up) Mock NoIssuesChargeGuarantorsWithGuarantees in test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 874afc0e53bb345e406286aea6bc00c95c13ccf3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 29755: Check each NoIssuesCharge separately
Nick Clemens [Thu, 10 Feb 2022 14:30:02 +0000 (14:30 +0000)]
Bug 29755: Check each NoIssuesCharge separately

This patch updates SIP patron code to use account methods to calculate balances
over the patronflags returns. It also checks if patron should be blocked for each
'No Issues charge' preference

Tests are added for NoIssuesChargeGuarantees

To test:
 1 - Set noissuescharge preference to 5
 2 - Add a $10 charge to a patron
 3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
 4 - Note the 64 message starts with Y's that mean patron is blocked
 5 - Set noissuescharge to 11
 6 - Repeat 3, patron is no longer blocked
 7 - Set NoIssuesChargeGuarantees to 8
 8 - Repeat 3, patron is blocked
 9 - Pay $3 on patron so they owe 7
10 - Repeat 3, patron is not blocked
11 - Add a child account with patron as guarantor
12 - Repeat 3, patron is not blocked
13 - Add a $4 charge to child
14 - Repeat 3, patron is blocked
15 - Repeat 3, but with child barcode, child is not blocked
16 - Set NoIssuesChargeGuarantorsWithGuarantees to 10
17 - Repeat 3, patron is blocked
18 - Repeat 3 with child barcode, child is blocked

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f747d38aead414e77e5c367742c9e39a8042f689)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 8948: (follow-up) Remove 580 display from 787
Nick Clemens [Thu, 10 Nov 2022 11:37:02 +0000 (11:37 +0000)]
Bug 8948: (follow-up) Remove 580 display from 787

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c34048bd5da170a02b958f3266c6e84df2a4d20)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7d297f988817f8c648aedd9291b658d2c474c486)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 8948: (follow-up) Correct OPAC link
Nick Clemens [Thu, 3 Nov 2022 13:09:01 +0000 (13:09 +0000)]
Bug 8948: (follow-up) Correct OPAC link

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b842e55679aec03e09cc0b0e7514c3c75e8770c3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25b109ade712fb80bac3ff691aa22ae0c9623d60)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 8948: Changes for OPAC
Nick Clemens [Thu, 3 Nov 2022 12:05:59 +0000 (12:05 +0000)]
Bug 8948: Changes for OPAC

Test with same record, confirm OPAC view is as expected

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3dce56d7cc62985534179a74347cf5fcfe1a6a55)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 083f52e32694fd6b0a930b67c45247265e539591)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 8948: Display MARC 787 relationship field
Nick Clemens [Fri, 28 Oct 2022 16:38:22 +0000 (16:38 +0000)]
Bug 8948: Display MARC 787 relationship field

This field is defined similar to 775, as a related work:
https://www.loc.gov/marc/bibliographic/bd787.html

This patch adds a display of this field, linking to the referenced record as the 775 does

It also tests for 580 field, and displays the text there if present, using the 787 a and t subfields otherwise

To test:
1 - Edit the default framework to make 787atw and 580a visible in editor
2 - Add a 787 to a record:
    $tThe ideas behind the chess openings
    $aFine, Reuben<
    $w2470231
3 - Confirm there is no display
4 - Apply patch / restart all
5 - 'Other related works' now shows
6 - Link should be using title of record
7 - Set system preference UseControlNumber to Use
8 - Reload details, link should now use control number
9 - Add a 580 to the record:
    $a This is a friendly work to this one
10 - Confirm the text of the link now displays before the link
11 - Add a second 580, confirm it displays as well
   - there is no seperator as each should end with a period or other punctuation according to MARC
   - there is a dpan with a class surrounding each so styling can be added as desired
12 - Add a second 787
   - confirm seperator present and wrapped in a span with a class
   - confirm each 787 is shown with a span/class for styling

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 18ad260608f3b53cbd6b1aa8581cdc82b5ba6366)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ee236811c29fe1b57582519007676cfa47ef90fd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32655: Move phone and itiva variables into templates
Lucas Gass [Tue, 17 Jan 2023 18:42:28 +0000 (18:42 +0000)]
Bug 32655: Move phone and itiva variables into templates

To test:
1. Go to a patron record or create a new one.
2. Toggle the 'Patron messaging preferences' fieldset so it is hidden.
3. Notice the variables.
4. Apply patch
5. Try steps 1 & 2 again, no varibales.
6. Attempt to toggle on/off options for email/sms. When email/sms are off the digest option next to it should be disabled.
7. Go to  Administration > Patron categories and try step 6 there as well.

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 176397d7619abf79969c98b7adc20a1c52da47fd)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ec70e54af5652e99ede5b1080906c9d49bf9ef18)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 850b36696ca163572ed2107117e312c9a71c5332)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 28314: Spinning icon is not always going away for local covers in staff
Hammat Wele [Thu, 19 Jan 2023 15:50:49 +0000 (15:50 +0000)]
Bug 28314: Spinning icon is not always going away for local covers in staff

The spinner is always visible with images which are under 80-90 px high

this patch remove the spinner when the image is loaded.

To test:
1. Make sure the LocalCoverImages system preference is enabled
   1.1. Go to Administration > Global system preferences
   1.2. Search for Coverimages
   1.3. Set LocalCoverImages 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'
   2.7. Click on the title of the record in the page heading to access the detailed record
   --> Note that the image is displayed normally, but the spinner is also displayed
4. Apply the patch
5. Search for the previous record with the small image
6. Click on the title of the record in the page heading to access the detailed record
   --> Note that the spinner is no more displayed

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a20dec603be52bc0c3a981445f9360b1c0c08e2d)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ba9c3cfd6b49ace550fd8499cf157e758c8c3abd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61ee30ec73cd76c131d145f8fdc28288eb7e0a0b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32797: Check if fields have a value, not if true
Nick Clemens [Thu, 2 Feb 2023 14:57:14 +0000 (14:57 +0000)]
Bug 32797: Check if fields have a value, not if true

When saving OAI set mappgins we are checking for truth, this prevents
saving subfield 0. We should check for content

To test:
1 - Go to Admin->OAI sets
2 - Create a set
3 - Define mappings for the set
4 - Attempt to save a rule on field 952 subfield 0 (withdrawn)
5 - It does not save
6 - Apply patch
7 - Try again
8 - Success!

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 6f606e00c597cfdfb30fe969b061a331c8a372db)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 677e68c7f1c3456b4a4bbb0e4141a797b99e676b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 94bb81502b25dcb3128664e9a681e444afaf691f)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32741: Fix {biblios|authorities}/bib1.att duplicate codes
Tomas Cohen Arazi [Fri, 27 Jan 2023 19:32:16 +0000 (16:32 -0300)]
Bug 32741: Fix {biblios|authorities}/bib1.att duplicate codes

This patch fixes a duplicate attribute code for Author-in-order in the
biblios definition.
The picked code matches what was already in ccl.properties.

Also Chronological-term for authorities gets fixed.

To test:
1. Apply the regression tests
2. Run:
  k$ prove xt/verify_bib1.att.t
=> FAIL: Some failiures
3. Apply this patch
4. Repeat 1
=> SUCCESS: Tests now pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 a4999a289563281c2b6956edb94fc6e1b20ad54e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit c59571cbf0ff3aa0aee4234c1672d8089d9045ed)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb652b806e12141d88e0c89afafe07e32c27ce88)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32741: Regression tests
Tomas Cohen Arazi [Fri, 27 Jan 2023 18:59:52 +0000 (15:59 -0300)]
Bug 32741: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 74513307292745add212d39d5564309188159dea)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a37207a192cefeaeddf591fc76728c962f461e55)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 19287eb21e73fe2a0fc467d6c8d33e2f1ed109b3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32409: Fix cashup searching with non latin-1 chars
Tomas Cohen Arazi [Tue, 6 Dec 2022 14:02:20 +0000 (11:02 -0300)]
Bug 32409: Fix cashup searching with non latin-1 chars

This patch fixes a problem with the way queries are passed to the API so
cashups are searchable with non-laint1 chars.

To test:
1. Have two superlibrarian users, one with non-latin1 chars on the name
   (e.g. خمسة)
2. Setup a debit type that can be sold.
3. Use the POS module to have some activity, using both your regular
   user and the other one.
4. Go to the register you used, and choose 'Transaction history'
5. Perform a couple cashups with each user ('Record cashup').
6. Look at the 'Cashup history' table
=> SUCCESS: You see cashups for both users
7. Use the 'Search' filter with latin chars
=> SUCCESS: Your user with only latin1 chars is displayed on the table
8. Repeat, using some non-latin1 char found on the other user
=> FAIL: Table is not refreshed or filtered!
9. Apply this patch
10. Reload the page
11. Repeat 8
=> SUCCESS: Filtering works now!
12. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 96cba5503c896b01bb4eb7eab326d2fa8c4b96dc)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 270170cd0e37ed016bec0ba845ce887f1b2414d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b242b1b83e5626e8c3c751d3053df603bf2df392)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32406: Switch acq datatable from headers to query param
David Cook [Mon, 5 Dec 2022 22:50:23 +0000 (22:50 +0000)]
Bug 32406: Switch acq datatable from headers to query param

This patch changes the pending orders datatable from using the
x-koha-query header to the "q" query parameter, so that it is
able to support UTF-8 encoded scripts rather than just Latin-1
scripts.

Test plan:

1. Apply patch
2. Go to
http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29
3. Change title from "Gairm" to "五" (alternatively use "cœur" or Arabic title)
4. Create a basket containing multiple records including bib 29 五
5. Close the basket
6. Receive shipment
7. You should be on a page like the following:
http://localhost:8081/cgi-bin/koha/acqui/parcel.pl?invoiceid=3
8. In the search box, type in 五
9. Note that you see a "Processing..." box and then the
results are filtered to just show the order for 五

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
tcohen amend: removed the line instead as we are probably phasing out
that DT configuration option anyway.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9248a0ef1f49677d52fb47aa5556215793bf218c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit b40ebaae3cc7ec8e6de6259f6b275ade8a6f0891)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0bd2d28271bf3904fad70766e7f7f5aaa0e8d28d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl
Emmi Takkinen [Wed, 30 Nov 2022 10:33:19 +0000 (12:33 +0200)]
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl

Calling GetBudgetHierarchy from acqui/histsearch.pl
is slow if param skiptotals is not used.

To test:
1. Open browsers Console -> Network (F12).
2. Navigate to Order search page and perform search.
=> Take a note how long it takes to load the Search results page.
3. Apply this patch.
4. Repeat step 2.
=> Page should now load faster.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f5daaa553bc63bd2c08212ee8db3d56c52781e9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 6b5cf15102235daa38a1f5a70e6ee7bea306abe5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eee942ef19fcb7af982792ef796c73907a9edb38)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 26628: Fix access to clubs when user only has clubs permission
Katrin Fischer [Thu, 26 Jan 2023 21:46:51 +0000 (21:46 +0000)]
Bug 26628: Fix access to clubs when user only has clubs permission

If a user only has the clubs and no permission from the tools section,
they can't access the patron clubs page by navigation. This patch
extends the permission checks for tools to include the clubs, that
live on the tools page, but have a top level permission.

To test:
- create a patron with only the catalogue and clubs permissions
- log in to the staff client as that patron
- navigate to a patron record, confirm you can see the Clubs tab in the patron account, can add patrons to and remove patrons from clubs
- confirm you don't have a link to the Tools module either on the Koha homepage or in the More menu
- enter the clubs URL manually (/cgi-bin/koha/clubs/clubs.pl), confirm you are allowed to open the page
- Apply patch
- The only changes should be:
  - You can now see the Tools entry in the More navigation menu
  - You can now see the Tools module link on the start page
  - Both take you to the tools page, only visible tools is 'Patron clubs'

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50927bb9b530f7a9c092dfe99bd2dddc69202432)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ecdd1d2b420f646279c69f61be30e46a33e8739e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e1df60db477e396a903bccde01f9abfad7cd717e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 19188: Use the Price template plugin with_symbol => 1
Jonathan Druart [Thu, 1 Feb 2018 17:32:54 +0000 (14:32 -0300)]
Bug 19188: Use the Price template plugin with_symbol => 1

To make it displayed correctly depending on the configuration of the
currency

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 c6366c6d6869be719e48e73b40827efd574a13c6)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit ae4e269b7b12975d7e0d5504d0b2b504fa41a4ce)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 06d09180e678d511b79ee491bc78b763625a3ca4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 19188: Self checkout missing currency symbol
Jenny Way [Tue, 16 Jan 2018 22:05:39 +0000 (22:05 +0000)]
Bug 19188: Self checkout missing currency symbol

Test plan:
1. Under administration and system preferences, enable WebBasedSelfCheck
2. In OPAC give user fine by going to 'my account' at top right
3. Then under fines tab 'create manual invoice'
4. Make sure this amount is more than noissuescharge which can be
   changed under system preferences
5. Go to the web based self check from the OPAC URL
6. Log in as your user
7. Try to check out an item
7. Error 'Item cannot be checked out' should occur
8. With the patch, the currency symbol should show for the amount.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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 5eab08cc2edd897f9afdfeb46caf5e409476946f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 13f7ee3e938b41f66d3d057001660c347b3dc08c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32a589f7aa3cb84de3b8cbfbd001f163ebcaf3a8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32644: Terminology: staff/intranet and biblio in plugins-home page
Caroline Cyr La Rose [Mon, 16 Jan 2023 20:06:19 +0000 (15:06 -0500)]
Bug 32644: Terminology: staff/intranet and biblio in plugins-home page

This patch replaces some incorrect terminology in the plugins-home page.
The current terminology is available at https://wiki.koha-community.org/wiki/Terminology

To test:
0. Make sure you have no enhanced content plugins installed
1. Apply patch
2. Go to Administration > Manage plugins
3. Click 'View plugins by class'
   --> Notice that one of the options is 'View bibliographic record enhancement
   plugins for the staff interface'
4. Make sure this phrase is gramatically correct, makes sense and has no
   typos
5. Click on that option
   --> Notice that the message says 'No plugins that can enhance the bibliographic
   records in the staff interface are installed'
6. Make sure this phrase is gramatically correct, makes sense and has no
   typos

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fe829e5b2a67a8af2b026af02dcb23ec55af195)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 807b3f669544fc380e8f4e4c868146a133c9d156)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1f0d5bb89ddcad42166a5711e54b65f8bded6bda)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32694: (QA follow-up) Fix missing TT filters
Katrin Fischer [Fri, 27 Jan 2023 13:17:42 +0000 (13:17 +0000)]
Bug 32694: (QA follow-up) Fix missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b2c1c0efe12856b99a2ab76bc84468f409235cf8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 851739b52ab41490dea36eea24f6730f296a342e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8cf822728d7d5be973ad8ab9823e26fa1916eac4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
20 months agoBug 32694: Fix value of 'Keep current' option in receiving
Nick Clemens [Fri, 20 Jan 2023 20:18:27 +0000 (20:18 +0000)]
Bug 32694: Fix value of 'Keep current' option in receiving

This patch restores missing template toolkit markers around the variable

To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9531a82e97661ce7013a8e9a64b8d5c4d2fa3635)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6f0bbc2afc4a592dc3d1cefb73b24a6cac4ea8ae)

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