koha.git
2 years agoBug 28409: Adjust regression test
Jonathan Druart [Thu, 24 Jun 2021 07:55:23 +0000 (09:55 +0200)]
Bug 28409: Adjust regression test

We are no longer expecting an URI escaped value but a corrected category
value, either 1 or 2.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bf9c50c1502d202731beedfcfc8185322ab25a28)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28409: Simplify data validation
Jonathan Druart [Fri, 21 May 2021 07:09:53 +0000 (09:09 +0200)]
Bug 28409: Simplify data validation

Simplify the affectation then trust it.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
JD Amended patch: remove duplicate comma

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 50db7afeb43171bdde2e2f4e421acc45771ec378)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28409: Comprehensively validate category in opac-shelves.pl
David Cook [Fri, 21 May 2021 06:52:25 +0000 (06:52 +0000)]
Bug 28409: Comprehensively validate category in opac-shelves.pl

Default to a category of 1 (ie Private). Only allow input of 1
or 2 (ie Public)

== Test plan ==
1. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
2. Note that you are redirected to another website
3. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=foo&category=9
4. Note that you can't see this list in the Lists (but it has been added to the database)
5. Apply the patch & restart services
6. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
7. Note that you are not redirected to another website
8. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=bar&category=9
9. Note that "bar" has been added as a Private list

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0ccf5fe83b4716472f4139735780c659c891719a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug ?????: Compiled SCSS, forgotten in a previous release
Victor Grousset/tuxayo [Sat, 26 Jun 2021 21:09:25 +0000 (23:09 +0200)]
Bug ?????: Compiled SCSS, forgotten in a previous release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28442: Sort by lastname for array type roles
Martin Renvoize [Tue, 25 May 2021 14:55:52 +0000 (15:55 +0100)]
Bug 28442: Sort by lastname for array type roles

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac00d757ab3e30cd4db2fb9694d28847d009a218)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28442: Fix 'accessibility_advocate' for current release
Martin Renvoize [Tue, 25 May 2021 12:59:31 +0000 (13:59 +0100)]
Bug 28442: Fix 'accessibility_advocate' for current release

The accessibility_advocate block was positioned incorrectly so wasn't
appearing properly for the current stable releases, only the
development/maintainter block.

This patch fixes that issue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b427d79d69579d78a6bb2784edacc64aa781934)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28442: Update template for new roles
Martin Renvoize [Tue, 25 May 2021 08:29:48 +0000 (09:29 +0100)]
Bug 28442: Update template for new roles

We have multiple accessibility advocates this cycle, so we needed to
adapt the template. I've also added the meeting facilitator as a case
but not added to the team block as a whole.. seeking opinions, perhaps
wait and see if it lasts more than a cycle before adding it fully?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16abe0f5321bc7165c1bf7051d6fa53f7608e0ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28442: Add 21.11 release team to teams.yaml
Martin Renvoize [Tue, 25 May 2021 08:29:23 +0000 (09:29 +0100)]
Bug 28442: Add 21.11 release team to teams.yaml

Add the 21.11 release team.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 467e7e4788ae771c26004a6b5e2951ddf19ed82d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27495: Added Accessibility advocate role in team page
Eden Bacani [Wed, 20 Jan 2021 22:24:05 +0000 (22:24 +0000)]
Bug 27495: Added Accessibility advocate role in team page

Test Plan
1. Click on 'About Koha' from the home page
2.Check on the  Koha Team page that the role Accessibility advocate is
listed under the Koha release teams and that the name of the person with
the role  appears.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 638f5106352fc1c5a758af06061a68f65264b791)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Sort authors by lastname || firstname
Jonathan Druart [Thu, 27 May 2021 12:38:44 +0000 (14:38 +0200)]
Bug 28386: Sort authors by lastname || firstname

If several authors have the same lastname, they are swapped in the list between the different runs.

This is reusing the code from the release_tools, see issue #24

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e8b14aa8e07703c5e3d8a42b6431352e3883f68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Remove _others_ from the contributor list
Jonathan Druart [Thu, 27 May 2021 12:36:48 +0000 (14:36 +0200)]
Bug 28386: Remove _others_ from the contributor list

We arbitrarily use "_others_" for unknown contributors (biblibre,
bywater, ptfs-e teams, etc)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6a403dec40fd89f08d9fcb478e27e5fb23ec6d73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Disambiguate Tomas and Blou
Jonathan Druart [Wed, 26 May 2021 10:30:50 +0000 (12:30 +0200)]
Bug 28386: Disambiguate Tomas and Blou

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fe65caf5fb1a353e4ec971b6c638bdfccfa90b78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Add more disambiguations to .mailmap
Jonathan Druart [Tue, 25 May 2021 14:16:11 +0000 (16:16 +0200)]
Bug 28386: Add more disambiguations to .mailmap

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 335382e4553cd8bdd3b8ad07408888a0bae4b111)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Add the 3 unknown authors back into the contributors list with a note
Jonathan Druart [Tue, 25 May 2021 07:13:40 +0000 (09:13 +0200)]
Bug 28386: Add the 3 unknown authors back into the contributors list with a note

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f8abe3618a054238910cbdbf2ffdf1416b8a03b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Update history using script
Jonathan Druart [Mon, 24 May 2021 13:51:42 +0000 (15:51 +0200)]
Bug 28386: Update history using script

This is an example of what will be regenerated.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9aced846d3066c08fbb6cf58e2fc67d3bfd41bb8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Update contributors using script
Jonathan Druart [Mon, 24 May 2021 13:50:57 +0000 (15:50 +0200)]
Bug 28386: Update contributors using script

This is an example of what will be regenerated.
It will need to be regenerated once it will be pushed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4c5dc08598af727b9381d1e34cd154a33db94cc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Fix Pawel history notes
Jonathan Druart [Mon, 24 May 2021 13:32:06 +0000 (15:32 +0200)]
Bug 28386: Fix Pawel history notes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d4139e39aaafc7ee1a86296f4eeeb05ccb1d974c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: fisheye is certainly Olwen
Jonathan Druart [Mon, 24 May 2021 13:08:55 +0000 (15:08 +0200)]
Bug 28386: fisheye is certainly Olwen

After a chat with Chris it seems that fisheye was Olwen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 88d2db265cdd72c002d15ba322bf2ebe4db5d429)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Add sponsors to .mailmap
Jonathan Druart [Wed, 19 May 2021 13:48:11 +0000 (15:48 +0200)]
Bug 28386: Add sponsors to .mailmap

They were in dev_map.yaml, we are cheating with the <sponsor> email but
it seems to work fine in my tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d102651d1b6e9bb7c20835f8e4ca4645926f6ec5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Disambiguate Séverine (to squash)
Jonathan Druart [Wed, 19 May 2021 13:35:41 +0000 (15:35 +0200)]
Bug 28386: Disambiguate Séverine (to squash)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d7363cd52335153b80f4092fa929c16d4cdc5101)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Add history_notes
Jonathan Druart [Wed, 19 May 2021 09:10:25 +0000 (11:10 +0200)]
Bug 28386: Add history_notes

The "developer" lines of history.txt will be regenerated using the git
history so we need to add this as a separate info.
See the release_tools changes for more info

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d7a6bd08ba4288b9d203a33d4201c4d85477524c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Update Hector
Jonathan Druart [Wed, 19 May 2021 06:54:04 +0000 (08:54 +0200)]
Bug 28386: Update Hector

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c906e55c01834a2a0ba8334943d03fec77a3f785)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Meenakshi.R vs Meenakshi R
Jonathan Druart [Wed, 19 May 2021 06:47:46 +0000 (08:47 +0200)]
Bug 28386: Meenakshi.R vs Meenakshi R

Needs to match .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bb943607218e56c99a41eb9c10077ceaf1c3f0d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Update Kyle
Jonathan Druart [Wed, 19 May 2021 06:40:21 +0000 (08:40 +0200)]
Bug 28386: Update Kyle

Need to match .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 137c2715121bbf8abe3836b47dbe5ad76b39cca4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Update Nicole
Jonathan Druart [Wed, 19 May 2021 06:32:50 +0000 (08:32 +0200)]
Bug 28386: Update Nicole

Need to match .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1e51ed3ba64f19234a02ca16e092511129acbf45)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Remove unknown authors
Jonathan Druart [Wed, 19 May 2021 06:09:45 +0000 (08:09 +0200)]
Bug 28386: Remove unknown authors

Those 3 authors are not in the git history, we should remove them from
the author list.
However we could re-add them to the contributor list with a note saying
for instance they were part of the Catalyst Academy (need to double
check that first)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6a701b363fe807389c49358c43bc33d61282e685)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Some manual removals from contributors.yaml
Jonathan Druart [Wed, 19 May 2021 05:47:30 +0000 (07:47 +0200)]
Bug 28386: Some manual removals from contributors.yaml

Those are not real authors and should be removed from the
contributors.yaml file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b8818ac568657bc114ee1468de9d86fc27d477cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28386: Adjust .mailmap
Jonathan Druart [Tue, 18 May 2021 13:48:48 +0000 (15:48 +0200)]
Bug 28386: Adjust .mailmap

Again, we need to adjust our .mailmap
This time the goal is the use it in place of the dev_map.yaml we have in
the release tools.

This will be generated for the release notes, history.txt and
contributors.yaml file

This can be tested using:
  git check-mailmap "author <email>"

For instance:
  git check-mailmap "Wrong name <jonathan.druart@bugs.koha-community.org>"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7b44702027b4ac732acdc54f6482857e0c451992)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 28503: Unit tests"
Fridolin Somers [Tue, 22 Jun 2021 12:21:22 +0000 (14:21 +0200)]
Revert "Bug 28503: Unit tests"

This reverts commit 77515dbb4db68dd40b058834b2293ad704b5e2bc.

2 years agoRevert "Bug 28503: Compare item homebranch to patron branch when hold policy set...
Fridolin Somers [Tue, 22 Jun 2021 12:21:21 +0000 (14:21 +0200)]
Revert "Bug 28503: Compare item homebranch to patron branch when hold policy set to 'from_home_library'"

This reverts commit 6413921700f5b2929aff7de092dfb9d5523754df.

2 years agoRevert "Bug 28503: (follow-up) Get rid of tests warnings"
Fridolin Somers [Tue, 22 Jun 2021 12:21:20 +0000 (14:21 +0200)]
Revert "Bug 28503: (follow-up) Get rid of tests warnings"

This reverts commit e98c8cb707d7a23d6b61cfa3f3960b2fc3b5a026.

2 years agoRevert "Bug 28503: [20.11.x] fix unit tests"
Fridolin Somers [Tue, 22 Jun 2021 12:21:17 +0000 (14:21 +0200)]
Revert "Bug 28503: [20.11.x] fix unit tests"

This reverts commit 1b84f0de97a04154f4f734717027838d43f0c11e.

2 years agoBug 28503: [20.11.x] fix unit tests
Fridolin Somers [Mon, 21 Jun 2021 13:40:50 +0000 (15:40 +0200)]
Bug 28503: [20.11.x] fix unit tests

Impact of Bug 27069
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27069

2 years agoBug 28503: (follow-up) Get rid of tests warnings
Tomas Cohen Arazi [Mon, 14 Jun 2021 17:49:43 +0000 (14:49 -0300)]
Bug 28503: (follow-up) Get rid of tests warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1e677a8755dfa4b5df3ff8df8f2644aedf388eb3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28503: Compare item homebranch to patron branch when hold policy set to 'from_hom...
Nick Clemens [Wed, 2 Jun 2021 15:20:08 +0000 (15:20 +0000)]
Bug 28503: Compare item homebranch to patron branch when hold policy set to 'from_home_library'

This fixes an issue in the way we calculate the check for hold policy 'from_home_library'

Currently we change the comparison based on ReservesControlBranch, however, that should
only control the rule we fetch, not how we compare

When ReservesControlBranch is set to "patron's home library" we compare the patron's branch to
the patron's branch, this is useless and means we pass the check for all branches all of the time

We should instead compare the patron's branch to the item's branch, and only fetch the rule using ReservesControlBranch

To test:
 1 - Have a record with an item from library A and library B
 2 - Set the 'Default checkout, hold and return policy'->Hold policy->From home library for all libraries
     and ensure you have no branch specific/itemtype specific rules set
 3 - Attempt to place a hold on the record for a patron from library B
 4 - Note that only the library B item is holdable - place a title level hold (do not choose an item)
 5 - Check in the item from library A
 6 - It fills the hold - This is incorrect - ignore the hold
 7 - Apply patch
 8 - Restart all the things
 9 - Check in the item from library A
10 - No hold found
11 - Check in the item from library B
12 - Hold found, correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 28503: Clarify what ReservesControlBranch controls

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 19660a25fa9421373a41fb6aba71215d71c541be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28503: Unit tests
Nick Clemens [Wed, 2 Jun 2021 15:05:08 +0000 (15:05 +0000)]
Bug 28503: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a4cdeaae3f82ea47fe3fba5e79f419e6911fb524)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28488: Javascript error in self-checkout (__ is not defined)
Owen Leonard [Mon, 7 Jun 2021 16:02:35 +0000 (16:02 +0000)]
Bug 28488: Javascript error in self-checkout (__ is not defined)

This patch adds inclusion of the internationalization JavaScript which
is required by the newest version of the DataTables include. It
references the double-underscore function provided by i18n.js.

To test, apply the patch and log into the self-checkout system as a user
with checkouts. The table of checkouts should display correctly and
there should be no JavaScript errors in the console.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 191a63111a6aa3d8a219dd5102fe80e68b5ff0ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28518: Display missing inputs for "Return to the last advanced search"
Jonathan Druart [Sat, 5 Jun 2021 14:08:46 +0000 (16:08 +0200)]
Bug 28518: Display missing inputs for "Return to the last advanced search"

When more than 3 search terms are passed on the advanced search form,
the "Return to the last advanced search" feature does not display them.

Test plan:
Perform an adv search at the OPAC, enter more than 3 terms, launch the
search, click the "Return to the last advanced search" link and confirm
that all the entries are there.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 75d67d46ce3df59c1460df44318439c40c14451b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28383: Fix itemsearch when accessed from the login form
Jonathan Druart [Fri, 11 Jun 2021 11:25:57 +0000 (13:25 +0200)]
Bug 28383: Fix itemsearch when accessed from the login form

There are params here (credentials), we need to test for the existence of $format.

Test plan:
logout
access /cgi-bin/koha/catalogue/itemsearch.pl
Login
=> Without this patch you get a 500 (because we hit the exit statement)
=> With this patch you see the items search form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c95e406e68fef354f1e65aa34cd6d257b8dc1c48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28350: Fix borrowernotes sorting for patron search
Alexis Ripetti [Thu, 13 May 2021 15:09:05 +0000 (11:09 -0400)]
Bug 28350: Fix borrowernotes sorting for patron search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9f508a351fed899299dc18199c6e6e8bbaf90ae4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28538: Insert formatted date if valid
Nick Clemens [Wed, 9 Jun 2021 17:59:59 +0000 (17:59 +0000)]
Bug 28538: Insert formatted date if valid

This patch restores the setting of the date from bug 27937 and adds a parsing of the date to
ensure the correct format

To test:
1 - Follow test plan from bug 27937 - it fails
2 - Follow test plan from bug 28351 - it succeeds
3 - Apply patch
4 - Repeat 1-2
5 - both plans pass now

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c43047968c31a918923aa4ef89fd56be2fcf54ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28487: Fallback to default template in overdue_notices
Jonathan Druart [Fri, 4 Jun 2021 10:19:18 +0000 (12:19 +0200)]
Bug 28487: Fallback to default template in overdue_notices

There is no fallback to the "default" language if there is no
language-specific template for the lang of the patron.

I am not really sure why we are not using GetPreparredLetter here (which
defaults), but this needs to be backported into all stable branches and
so as small as possible.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 09fcc66ab89dd2c084dfe20d4b4dc43a5335b86a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28353: Display a list of items that cannot be deleted
Jonathan Druart [Tue, 18 May 2021 07:41:40 +0000 (09:41 +0200)]
Bug 28353: Display a list of items that cannot be deleted

We used to display a list of items that cannot be deleted (checked out
or on hold) on the Batch item deletion tool.
With bug 8132 we improve the error handling, but the info is spread in
the table.

This patch adds, at the top of the page, the list of items (barcode)
that cannot be removed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7de5d06abd8c3d6d1e5fc13e51ee3ce8074efe1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28482: Refresh line from DB to get stored value
Nick Clemens [Fri, 28 May 2021 12:02:19 +0000 (12:02 +0000)]
Bug 28482: Refresh line from DB to get stored value

Before checking if the amount is 0 we get the stored value from the DB. This
ensures any amounts beyond the 6 digit precision we store will be removed.

To test:
1 - Add a processing fee of 15 to an itemtype
2 - Add an item of that type, set the replacement fee to 12.63
3 - Set MarkLostItemsAsReturned to 'On payment' only
4 - Set  WhenLostChargeReplacementFee to 'Charge'
5 - Checkout the item to a patron
6 - Mark the item lost
7 - Reload patron and confirm they are charged 27.63
8 - Go to accounting, pay amount, pay 27.63
9 - Item is still lost and not returned
10 - Apply patch
11 - Checkin the item
12 - Checkout to another patron
13 - Mark lost
14 - Patron charged 27.63
15 - Pay amount, 27.63
16 - Item returned!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c4e2f4c7180a1c4c287d11d2f2d8c635de81df38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28482: Unit test
Nick Clemens [Fri, 28 May 2021 12:02:09 +0000 (12:02 +0000)]
Bug 28482: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1df303de77bbaa555b9dc8c0349fae8fb2990c4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoRevert "Bug 28158: Remove backgroundjob from batchMod"
Fridolin Somers [Wed, 9 Jun 2021 07:24:54 +0000 (09:24 +0200)]
Revert "Bug 28158: Remove backgroundjob from batchMod"

This reverts commit ade7914e5927ecb21aa4e8abb80aad894d597765.

3 years agoRevert "Bug 28158: Remove additional backgroundjob related code"
Fridolin Somers [Wed, 9 Jun 2021 07:24:53 +0000 (09:24 +0200)]
Revert "Bug 28158: Remove additional backgroundjob related code"

This reverts commit 7f35a238f219faa7e21d3bed0742f4ac53f116f1.

3 years agoRevert "Bug 28158: Allow batchMod to run under plack"
Fridolin Somers [Wed, 9 Jun 2021 07:24:51 +0000 (09:24 +0200)]
Revert "Bug 28158: Allow batchMod to run under plack"

This reverts commit 2d13780dd325f1eb902dfec88a91f4effdcb5799.

3 years agoBug 28200: Remove unit test using abbreviated format
David Cook [Mon, 10 May 2021 23:33:19 +0000 (23:33 +0000)]
Bug 28200: Remove unit test using abbreviated format

This patch removes the unit test that uses the abbreviated format,
since it's not supported in newer versions of Net::Netmask without
a workaround.

Test plan:
0. Set up Koha dev environment on Debian 11
1. perl t/Koha/Middleware/RealIP.t
2. Tests should pass

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Alvaro Cornejo <cornejo.alvaro@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 06fe908a4ed842033f980e58fa62cfb2474a0055)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28475: Fix searching all headings
Tomas Cohen Arazi [Thu, 27 May 2021 15:36:32 +0000 (12:36 -0300)]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the OPAC
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: Asociación Latinoamericana de Integración
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 69fb1be22d42bdfe1421b4e23ea783c858ec23d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28364: Make log4perl.conf belong to the instance user
Tomas Cohen Arazi [Mon, 17 May 2021 13:29:01 +0000 (10:29 -0300)]
Bug 28364: Make log4perl.conf belong to the instance user

This patch makes koha-create generate the log4perl.conf file for the
instance, belonging to the instance user. This is done in order to have
the z3950 responder work.

My original idea was to make the responder accept a '-g' parameter but
that is not supported by Net::Z3950::Responder. Also, as the library
insists on handling the PID file on its own, it wont' work to handle the
responsability to start-stop-daemon. The only solution I found was
making the fiel be owned by the instance user.

1. Create a Koha instance:
   $ koha-create --create-db test
2. Initiate all the things
3. Enable and start the z3950 responder
   $ koha-z3950-responder --enable test
   $ koha-z3950-responder --start test
4. Try doing some search:
   $ yaz-client localhost:2100
=> FAIL: you get:
Connecting...OK.
Sent initrequest.
Target closed connection
Z> quit
See you later, alligator.
=> FAIL: No warning or anything on the logs
5. Stop the daemon
   $ koha-z3950-responder --stop test
6. Run it manually:
   $ PERL5LIB=/usr/share/koha/lib KOHA_CONF=/etc/koha/sites/test/koha-conf.xml \
              /usr/bin/perl /usr/share/koha/bin/z3950_responder.pl \
              -c /etc/koha/sites/test/z3950 -u test-koha \
              -p /var/run/koha/test/z3950-responder.pid -d test-koha-z3950
7. Repeat the 4, on a separate terminal (no daemon mode this time)
=> FAIL: You get:
Cannot open /etc/koha/sites/test/log4perl.conf (Permission denied) at /usr/share/perl5/Log/Log4perl/Config/BaseConfigurator.pm line 51.
8. Change the file owner:
   $ chown test-koha /etc/koha/sites/test/log4perl.conf
9. Repeat 6, and 4
=> SUCCESS: It doesn't break anymore!
10. Apply this patch
11. Create a new instance, with the patched koha-create:
    $ debian/scripts/koha-create --create-db test1
12: Check the generated files permissions:
    $ ls -l /etc/koha/sites/test2
=> SUCCESS: You get:
-rw-r----- 1 root       test2-koha 19720 May 17 13:26 koha-conf.xml
-rw-r----- 1 test2-koha test2-koha  2825 May 17 13:26 log4perl.conf
-rw-r----- 1 root       test2-koha  2014 May 17 13:26 zebra-authorities-dom.cfg
-rw-r----- 1 root       test2-koha  2279 May 17 13:26 zebra-biblios-dom.cfg
-rw-r----- 1 root       test2-koha    26 May 17 13:26 zebra.passwd

13. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 79fe1a6ab9fe8720f1be3d3a7edb4162adae7ffe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27899: Missing description for libraryNotPickupLocation on request.pl
Owen Leonard [Mon, 15 Mar 2021 14:07:26 +0000 (14:07 +0000)]
Bug 27899: Missing description for libraryNotPickupLocation on request.pl

This patch adds text to the holds template in the staff client so that
if a particular item is at a library which isn't a hold location the
error message is descriptive.

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

 - Change one of your libraries so that "Pickup location" is set to
   "No."
 - Locate a title in the catalog which has an item at that location.
 - The "pick up at" list will exclude the library so and additional steps
     must be taken to get the message
 - Select a patron and set their library to the one we can't pick up at.
 - Start the process of placing a hold on the title.
 - After selecting the patron to place the hold for, look at the table of
   items under "Place a hold on a specific item."
 - The item located at the library you modified should show an error
   message in the "Hold" column, "Library is not a pickup location."

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cc6fca618707898117363971460833ed3684539)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28091: Only show for logged in users
Kyle M Hall [Fri, 7 May 2021 18:02:35 +0000 (14:02 -0400)]
Bug 28091: Only show for logged in users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3ec1b978e0715cbf52964176fe527ffb1cdfde1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28091: add meta content with Koha version to staff client pages
Lucas Gass [Mon, 5 Apr 2021 17:58:28 +0000 (17:58 +0000)]
Bug 28091: add meta content with Koha version to staff client pages

TO test:
-apply patch
-go to the Koha staff client and inspect the page, look at the HTML <head>
-there should be a line that looks like this:
<meta name="generator" content="Koha 20.12.00">

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 52b4908dd386f05aae91134332e54fb6c390a70c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28158: Allow batchMod to run under plack
Jonathan Druart [Tue, 25 May 2021 11:55:39 +0000 (13:55 +0200)]
Bug 28158: Allow batchMod to run under plack

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 235370092158d8cc5845e9f4b2c16e2201f10d39)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28158: Remove additional backgroundjob related code
Jonathan Druart [Tue, 25 May 2021 07:20:45 +0000 (09:20 +0200)]
Bug 28158: Remove additional backgroundjob related code

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48e5171214378ce5e4fcbae6d41aa89e02a50d26)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28158: Remove backgroundjob from batchMod
Jonathan Druart [Mon, 24 May 2021 14:53:48 +0000 (16:53 +0200)]
Bug 28158: Remove backgroundjob from batchMod

== Test plan ==
1 - In the default framework make sure the 952$1 is visible in opac & catalog & editor
2 - Set WhenLostChargeReplacementFee to charge
3 - Set MarkLostitemsAsReturned to return from batch modification
4 - Find/edit an item with a replacement cost
5 - Check out the item to a patron
6 - Batch modify the item
7 - Set the lost status
8 - Item is not returned or charged
9 - with the patch, it is

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 41551dfda72df88ed6056301872a37c921154f69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28419: Remove suspicious occurrence in opac-shelves.tt
Jonathan Druart [Tue, 25 May 2021 12:46:05 +0000 (14:46 +0200)]
Bug 28419: Remove suspicious occurrence in opac-shelves.tt

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f6b562da6d86d9a19e2e5245014595a398f6b283)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28419: Fix addorderiso2709.tt translatability
Jonathan Druart [Tue, 25 May 2021 12:38:27 +0000 (14:38 +0200)]
Bug 28419: Fix addorderiso2709.tt translatability

It seems that the html tag within the TT comment breaks the translate
script

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7efdbccfc2dd79ff6658a60f6381182aff8c84b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoUpdate release notes for 20.11.06 release v20.11.06
Fridolin Somers [Tue, 25 May 2021 13:53:36 +0000 (15:53 +0200)]
Update release notes for 20.11.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoIncrement version for 20.11.06 release
Fridolin Somers [Tue, 25 May 2021 13:20:13 +0000 (15:20 +0200)]
Increment version for 20.11.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoFix translations for Koha 20.11.06
Fridolin Somers [Tue, 23 Feb 2021 15:29:01 +0000 (16:29 +0100)]
Fix translations for Koha 20.11.06

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoMerge remote-tracking branch 'translate/20.11.06-translate-20210525' into 20.11.x
Fridolin Somers [Tue, 25 May 2021 12:44:28 +0000 (14:44 +0200)]
Merge remote-tracking branch 'translate/20.11.06-translate-20210525' into 20.11.x

3 years agoTranslation updates for Koha 20.11.06
Koha translators [Tue, 25 May 2021 12:32:23 +0000 (09:32 -0300)]
Translation updates for Koha 20.11.06

3 years agoBug 20982: Sanitize category to prevent XSS on opac-shelves.pl
Jonathan Druart [Thu, 20 May 2021 06:34:48 +0000 (08:34 +0200)]
Bug 20982: Sanitize category to prevent XSS on opac-shelves.pl

== Test plan ==
1. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
2. Note that you are redirected to another website
3. Apply the patch & restart services
4. Repeat the above and you are not redirected

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
3 years agoBug 15720: Add connexion user and password options to connexion daemon
Nick Clemens [Thu, 17 Sep 2020 18:34:21 +0000 (18:34 +0000)]
Bug 15720: Add connexion user and password options to connexion daemon

Currently the connexion daemon does not utilize the user and password passed in the requests, it expects a
user and password to be defined in the config file and for that user to be a valid Koha user with
cataloging permissions.

With that user in place all requests to the daemon are authorized.

As the connections are over TCP we allow defining a new connexion user and password to protect Koha account information.

If not defined current behaviour is preserved. Connexion user and password must both be set it either is set.

Sample config file:
host:
port: 8888
koha:http://localhost:8081
log:/var/log/koha/kohadev/connexion.log
match:ISBN
user:kohauser
password:kohapass
overlay_action:replace
nomatch_action:create_new
item_action:always_add
import_mode:redirect
debug:1

To test:
 1 - Create connexion file and save on the Koha serve
 2 - perl misc/bin/connexion_import_daemon.pl -c /kohadevbox/koha/connexion.cnf
 3 - Ensure the user specified above (connexuser) exists and has edit catalogue permissions
 4 - In another terminal make a request to the server:
        echo -en 'U6turtleA9connexionP5shell00024    a62clear00024   4500' | nc -v localhost 8888
 5 - The request should succeed and record added to batch (probably the import fails, but not important)
 6 - Add to config file
        connexion_user:conuser
 7 - Stop and restart the daemon - it should fail on missing connexion_password
 8 - Comment out connexion_user and add
        connexion_password:conpass
 9 - Stop and restart daemon, it fails on missing connexion_user
10 - Uncomment the user and restart
11 - Make another request
        echo -en 'U6turtleA9connexionP5shell00024    a62clear00024   4500' | nc -v localhost 8888
12 - It fails 'Unauthorized request'
13 - Make another request
        echo -en 'U7conuserA9connexionP7conpass00024    a62clear00024   4500' | nc -v localhost 8888
14 - It succeeds!

Signed-off-by: Allison Blanning <ablanning@hotchkiss.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
3 years agoBug 27942: [20.11] Prevent XSS vulnerabilities in quote-upload
Jonathan Druart [Tue, 4 May 2021 09:48:03 +0000 (11:48 +0200)]
Bug 27942: [20.11] Prevent XSS vulnerabilities in quote-upload

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28302: Update packages to ignore CGI::Compile 0.24 (2)
Mason James [Thu, 20 May 2021 14:50:58 +0000 (02:50 +1200)]
Bug 28302: Update packages to ignore CGI::Compile 0.24 (2)

to test...
 1/ build package
 2/ install package on focal
 3/ check that libcgi-compile-perl 0.24 is not installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 421fdc3d8f0df2ceba238e1ad23ed9478fd12cec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28302: Update packages to ignore CGI::Compile 0.24
Mason James [Wed, 19 May 2021 15:17:52 +0000 (03:17 +1200)]
Bug 28302: Update packages to ignore CGI::Compile 0.24

to test...
 1/ build package
 2/ install package on focal
 3/ check that libcgi-compile-perl 0.24 is not installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3faeb901263609aa2a015f446944ef79cbe396c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 16785: Remove Autocomplete from overdues report filter
Owen Leonard [Thu, 13 May 2021 15:17:29 +0000 (15:17 +0000)]
Bug 16785: Remove Autocomplete from overdues report filter

This patch removes code and markup related to an autocomplete input
field in the overdues report filter. The autocomplete was intended
to enable easy entry of patron attributes, but it's simpler to use a
Select2-styled <select>

The patch removes circ/ypattrodue-attr-search-authvalue.pl, which was
only used on this page and is now obsolete.

To test, apply the patch and create at least one patron attribute type
which is linked to an authorized value:

 - Administration -> Authorized values -> New category
   - Create a new category to test with
   - Add multiple authorized values under this category
 - Administration -> Patron attribute types -> New patron attribute
   type.
   - Create an attribute which is linked to the authorized value
     category you created AND which is marked "Searchable."
 - Go to Circulation -> Overdues.
   - In the sidebar filter you should see your patron attribute as an
     option, styled as a Select2 dropdown.
   - Clicking the dropdown should trigger a list of the authorized
     values you created above.
   - Test that the search field at the top of the list works correctly
     to filter the results.
   - Test that any repeatable attribute field can be cloned by clicking
     the "Add" link, and that cloned fields can be removed using the
     "Delete" links.
   - Test that cloned fields remain in place after submitting the fitler
     form, and that any selected entry in a Select2 widget is
     preselected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac35ef738523b9d234b338c5d81daeb21d4833d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28187: Exclude dtrg-group from row striping.
Martin Renvoize [Fri, 14 May 2021 10:15:58 +0000 (11:15 +0100)]
Bug 28187: Exclude dtrg-group from row striping.

The odd row lowlighting stripe effect added to datatales wasn't
accounting for classes introduced by the rowGroup plugin to denote
grouping header rows. This patch adds the required exclusion rule to
properly highlight rowGroup grouping rows.

Test plan
1/ Enable POS
2/ Create a register and make some transactions.
3/ Have both debits and credits
4/ Have some older tranactions so you can look at the past_sales table.
5/ Apply patch and regenerate the staff CSS:
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
6/ Look at the sales and past_sales table.
7/ Make sure each row header is the darker shade of gray (#e0e0e0)
7a/ You will need to have made some transactions with even and odd
numbers of items in the sale highlight the problem before applying the
patch
7b/ The rowGroup plugin is also used for the checkouts table and
this patch should also fix that case.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b1d81d1fa7d417ca1e3f4b382d876252b6267ae7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
Nick Clemens [Wed, 28 Apr 2021 17:56:11 +0000 (17:56 +0000)]
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl

This looks like just an assumption that the $item variable was an object

Correct the code to use $item_object

To test:
1 - perl misc/cronjobs/delete_items.pl -where="barcode LIKE '%8'" --commit --verbose
2 - Can't call method "safe_delete" on unblessed reference at /usr/share/koha/bin/cronjobs/delete_items.pl line 67.
3 - Apply patch
4 - Repeat
5 - Success! You deleted a bunch of items

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 423421eb64f0130d9cb194e572f4ca89937b02a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: (follow-up) Do not check subfield unless tag defined
Nick Clemens [Tue, 11 May 2021 11:08:17 +0000 (11:08 +0000)]
Bug 27837: (follow-up) Do not check subfield unless tag defined

This was causing extra warnings when the permanent_location field was
unmapped.

We only need to check if there is a field defined as you can define a mapping
without both a field and subfield, so the existence of one implies the other

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0e00dc78e4ed01678f037a970487fd871fa3e70f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Always pass permanent location from items editor if it was defined
Kyle M Hall [Thu, 6 May 2021 13:09:03 +0000 (09:09 -0400)]
Bug 27837: Always pass permanent location from items editor if it was defined

By always passing permenent location from the items editor, we can know
if permanent location was defined in the framework. This means we can
know if we should update permanent location independently of location
even if permenent location has an empty value.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f5bd16410a5c2dc597c265eec46a771cceec72bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Check the MARC directly, not the transformed item
Kyle M Hall [Thu, 6 May 2021 12:09:04 +0000 (08:09 -0400)]
Bug 27837: Check the MARC directly, not the transformed item

If permanent location is mapped, it will exist in the MARC.
However, when we are transforming our item hash to MARC,
we are losing our permanent location mapping, at least in unit tests.

By checking the original MARC for the permenent location, we remove the
risk of losing it the "empty" permenent location through the
transformation process. We only need to know that it existed in the
original item marc to know we need to update it in the database.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db382ebaffd393151e0ebd8e6579f5c11969a90c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Permanent location to be empty string, check if key exists
Kyle M Hall [Thu, 4 Mar 2021 15:30:31 +0000 (10:30 -0500)]
Bug 27837: Permanent location to be empty string, check if key exists

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit aa1d86920bd0392b4894fa2e756dcb41f2f7a5ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Unit tests for blank permanent location
Nick Clemens [Mon, 3 May 2021 14:44:49 +0000 (14:44 +0000)]
Bug 27837: Unit tests for blank permanent location

Bug 27837: (QA follow-up) Minor Spelling/Typo correction

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56d895da8be38bed9587ff480786ed6cf55cacce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Prevent the tests to fail is the field is mapped
Jonathan Druart [Thu, 4 Mar 2021 08:42:23 +0000 (09:42 +0100)]
Bug 27837: Prevent the tests to fail is the field is mapped

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2b1c4c4f65c787e1c6a9548b087d4e0f760a0533)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Add unit tests
Kyle M Hall [Wed, 3 Mar 2021 13:54:39 +0000 (08:54 -0500)]
Bug 27837: Add unit tests

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99f67cb04c2bd03e9ac5c6d01688bf9520d10595)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27837: Update permanent location if passed into ModItemFromMarc
Kyle M Hall [Wed, 3 Mar 2021 13:33:21 +0000 (08:33 -0500)]
Bug 27837: Update permanent location if passed into ModItemFromMarc

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 97647da9a0541cb02ab0777ead388c8ff99a0424)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27724: Use lenient also in Elasticsearch authorities search
Fridolin Somers [Thu, 18 Feb 2021 14:37:15 +0000 (15:37 +0100)]
Bug 27724: Use lenient also in Elasticsearch authorities search

In Elasticsearch, query for biblios uses lenient=true.
This is also needed for authorities search.
In case a search field is defined as type numeric.

Test plan :
1) Use Elasticsearch searchengine
2) Define a search field 'local-number' as type 'Number'
3) Be sure to us 'local-number' in autorities mapping
4) Rebuild autorities
5) Performe a search for autorities with 'Search entire record' and
   'contains' with term '123'
=> Without patch you get error :
[query_shard_exception] Can only use prefix queries on keyword and text fields - not on [local-number] which is of type [integer]

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 32f2026c1b6d5b97e6594020383940063d2b6fca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27724: Add unit test
Fridolin Somers [Thu, 18 Feb 2021 14:36:43 +0000 (15:36 +0100)]
Bug 27724: Add unit test

Run t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb3c3d56855e001bf608a3bf157c087e655c5c04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28351: (bug 26261) Fix datepicker for dateformat ne mm/dd/yyyy
Jonathan Druart [Tue, 18 May 2021 07:10:26 +0000 (09:10 +0200)]
Bug 28351: (bug 26261) Fix datepicker for dateformat ne mm/dd/yyyy

This patch restores the same code we have prior to bug 26261

0. Set dateformat to mm/dd/yyyy
1. Go to a patron detail page
2. Open the 'Restrictions' tab
3. Choose a future date in which the day is higher than 12
=> SUCCESS: The input has the date we chose
4. Set dateformat to dd/mm/yyyy
5. Repeat 3
=> FAIL: It sets the current date, the browser console shows an error.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 539396fb27e02118d34f3b914fd2baffee752aa7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28367: (follow-up) Fix plack condition in C4/Auth_with_shibboleth.pm
Jonathan Druart [Tue, 18 May 2021 09:26:25 +0000 (11:26 +0200)]
Bug 28367: (follow-up) Fix plack condition in C4/Auth_with_shibboleth.pm

There were 2 occurrences!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ecb0ff8bbef93cabfd7a346254bb928a5af1a915)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28367: Fix plack condition in C4/Auth_with_shibboleth.pm
Jonathan Druart [Tue, 18 May 2021 08:43:05 +0000 (10:43 +0200)]
Bug 28367: Fix plack condition in C4/Auth_with_shibboleth.pm

C4/Auth_with_shibboleth.pm has:
  if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )
When others have:
  if ( any { /(^psgi\.|^plack\.)/i } keys %ENV )

This has been highlighted by https://gitlab.com/koha-community/koha-testing-docker/-/issues/249 that introduces a PLACK_WORKERS env vars, and t/Auth_with_shibboleth.t was failing with

 #   Failed test 'checkpw_shib tests'
 #   at t/Auth_with_shibboleth.t line 335.
 Invalid parameter passed, categorycode= does not exist# Looks like your test exited with 255 just after 5.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 21d8298c7708281a9ab87851ea55f75559e57cf4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28345: Patron attributes no longer have option to select empty class
Owen Leonard [Thu, 13 May 2021 10:39:38 +0000 (10:39 +0000)]
Bug 28345: Patron attributes no longer have option to select empty class

This patch adds the "empty" parameter to the PROCESS directive which
builds the "Class" dropdown. This allows the user to choose a blank
option when creating or editing a patron attribute.

To test, apply the patch and go to Administration -> Patron attribute
types -> Add patron attribute type.

In the entry form the "Class" dropdown should have a blank option. When
editing an existing attribute with a class defined, the correct class
should still be preselected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4c004934231e4420ef6ff0a2413a08c269ca26e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28320: Add DB connection check to the SIP SC status message
Nick Clemens [Tue, 11 May 2021 13:43:51 +0000 (13:43 +0000)]
Bug 28320: Add DB connection check to the SIP SC status message

This patch adds a lookup of the sip user during an SC status, confirming that
our DB ocnnection is working, and that our user is still valid

Additionally, it adds support for SC status to the sip_cli_emulator and adds basic
test coverage for the SC status message

To test:
1 - Apply patch
2 - Restart SP server
3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -m sc_status_request -su term1 -sp term1
4 - prove -v t/db_dependent/SIP/Message.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d85ae826c64ef43d1f606aceb6eaa6d3174cba52)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28268: Improve memory usage when indexing authorities in Elasticsearch
Ere Maijala [Fri, 30 Apr 2021 07:00:23 +0000 (10:00 +0300)]
Bug 28268: Improve memory usage when indexing authorities in Elasticsearch

Retrieves the complete records one by one to avoid huge memory usage.

Note that this removes the call to GuessAuthTypeCode, but it is done later in Koha::SearchEngine::Elasticsearch::marc_records_to_documents (and was never done if you asked to index a single record with --authid parameter).

Test plan:
1. Apply patch
2. Reindex authorities: perl misc/search_tools/rebuild_elasticsearch.pl -a -d -v
3. Check that indexing completed successfully and results are correct.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7e14b054b2fd5b6fddc2046b46d3bd431acf689a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27844: Launch koha-worker systemd service as koha linux user
David Cook [Tue, 2 Mar 2021 23:32:28 +0000 (23:32 +0000)]
Bug 27844: Launch koha-worker systemd service as koha linux user

This patch adds the User directive to the koha-worker systemd unit file

Test plan:
0a. DO NOT APPLY PATCH YET
0b. Start a Koha testing environment running systemd
1. koha-worker --stop kohadev
2. cp debian/templates/koha-worker@.service /etc/systemd/system/.
3. systemctl start koha-worker@kohadev.service
4. ps -efww | grep "background_jobs_worker"
5. Note koha-worker is running as root
6. APPLY THE PATCH
7. cp debian/templates/koha-worker@.service /etc/systemd/system/.
8. systemctl daemon-reload
9. systemctl restart koha-worker@kohadev.service
10. ps -efww | grep "background_jobs_worker"
11. Note that koha-worker is now running as kohadev-koha

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 25b1ada137806b4b57925bd9f584fcdc73f9eaf2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28302: Forbid CGI::Compile 0.24
Julian Maurice [Fri, 7 May 2021 15:57:58 +0000 (17:57 +0200)]
Bug 28302: Forbid CGI::Compile 0.24

CGI::Compile 0.24 has a bug:
https://github.com/miyagawa/CGI-Compile/issues/25

It can cause weird bugs, like breaking the authority detail display
after trying to modify an authority.

Steps to reproduce:
1. Install CGI::Compile 0.24
2. Restart starman with only 1 worker
3. Go to the detail page of an authority (authorities/detail.pl)
4. Go to the edit page (Edit » Edit record)
5. Check starman logs, you should see "Subroutine build_tabs redefined
at [...]"
6. Click on cancel to go back to the detail page, which should now show
a "blank" authority. Now the only way to get the authority back is to
restart starman.

Test plan:
1. Reproduce the bug
2. Install CGI::Compile 0.25 and restart starman
3. Make sure the bug is gone :)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4a3049a8be8dc2d22eac796521a4185f1248282a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28248: aqorders.created_by is nullable
Tomas Cohen Arazi [Thu, 29 Apr 2021 18:37:49 +0000 (15:37 -0300)]
Bug 28248: aqorders.created_by is nullable

This patch introduces a change to the spec to acknowledge that the field
is nullable. This is fixed in 21.05+ as part of bug 20212.

To test:
1. Have an order with created_by = NULL
2. Use your favourite REST tool (Advanced REST Client(libre), Postman?) to fetch the order
=> FAIL: It throws a nasty error about non-nullable field being null
3. Apply this patch
4. Reload all
5. Repeat 2
=> SUCCESS: It returns things, created_by is NULL, as it should
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 23406: Don't translate suppressed authorised values
Nick Clemens [Mon, 10 May 2021 12:14:08 +0000 (12:14 +0000)]
Bug 23406: Don't translate suppressed authorised values

We have a test in C4/XSLT/transformMARCXML4HTML which is meant to exclude the 942n, however,
it doesn't work because it checks the $subfield parameter against n

$subfield is an arrayref with the code and value as members

we need to check $subfield->[0]

To test:
 1 - Apply only unit tests
 2 - prove -v t/db_dependent/XSLT.t
 3 - It fails
 4 - Confirm 952$n in default framework is tied ot authorised value 'YES_NO' or do so
 5 - Set OpacSuppression to 'Hide'
 6 - Edit a record in the default template, changing 942$n to 'Yes
 7 - Confirm the record is suppressed in opac
 8 - Note there is no suppression notice in the record in staff client
 9 - Apply second patch
10 - Reload and confirm staff side shows suppression notice
11 - Confirm record still suppressed in OPAC
12 - Edit record, set 942$n to 'no'
13 - Confirm there is no suppression notice in staff client
14 - Confirm you can view the record in OPAC
15 - prove -v t/db_dependent/XSLT.t
16 - Tests pass!

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 91fb5d6a1548f7b270163d18b05467c6fd45a7f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 23406: Unit test
Nick Clemens [Mon, 10 May 2021 12:01:55 +0000 (12:01 +0000)]
Bug 23406: Unit test

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1489950a593fb9caf5db52017580302bca7daf75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27562: itiva notices break if record title contains quotes
Kyle M Hall [Mon, 14 Jan 2013 17:02:38 +0000 (09:02 -0800)]
Bug 27562: itiva notices break if record title contains quotes

itiva has reported to us that quotes in the title of a record cause the
call to not be made to the patron. The fix is to remove quotes from
the title, as quotes are not spoken anyway ( That is, "Queens" and
"Queen's" are pronounced the same ).

Test Plan:
1) Set up itiva to send phone notes
2) Find a record with quotes in the title
3) Trigger an itiva notice ( checkout, checkin, place hold, etc )
   using the itiva outbound cronjob
4) View the CSV, note the title has the quotes in it
5) Apply this patch
6) Repeat steps 2-3
7) View the CSV, note the title contains no quotes!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e7aac53e9a33763724b7f0a0e9ac69518f0a926b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 13613: Move similar JS code to a function
Jonathan Druart [Mon, 10 May 2021 09:52:12 +0000 (11:52 +0200)]
Bug 13613: Move similar JS code to a function

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac1fd207aec54b4a0da1f6aa00a3f4f4d0752f07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 13613: (follow-up) Add tooltip when disabled
Nick Clemens [Fri, 23 Apr 2021 12:20:07 +0000 (12:20 +0000)]
Bug 13613: (follow-up) Add tooltip when disabled

This patch adds a tooltip to the digest checkboxes when disabled.

When enabled the tooltip is hidden

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d176758fe4139f2c2bb226cdd8e9ed7b305fc4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 13613: (follow-up) Use more unique classes
Nick Clemens [Wed, 17 Mar 2021 13:49:25 +0000 (13:49 +0000)]
Bug 13613: (follow-up) Use more unique classes

This resolves the issue of being unable to save email as it was being hit by the validator

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a6e66b560b37b0300e10e161277ff85b447451ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 13613: (Bug 22744 follow-up) Remove js handling for 'none'
Nick Clemens [Wed, 17 Mar 2021 13:25:44 +0000 (13:25 +0000)]
Bug 13613: (Bug 22744 follow-up) Remove js handling for 'none'

There was a function and a set of onclick events to handle the 'Do not notify'
checkboxes.

Those have been removed, so should this code

To test:
1 - Sign in to opac
2 - Click on 'your messaging' tab from 'your account'
3 - Check/uncheck some boxes
4 - Note error in the console:
    Uncaught TypeError: document.opacmessaging.none2 is undefined
5 - Apply patch
6 - repeat
7 - no more error

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4d15224c78b61e89f22eb44c4819475555808095)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 13613: Don't allow digest to be selected without a digest-able transport selected
Kyle M Hall [Thu, 22 Jan 2015 17:36:31 +0000 (12:36 -0500)]
Bug 13613: Don't allow digest to be selected without a digest-able transport selected

By default, only the email transport is enabled. This gives the
messaging preferences the look of having email and digest and two
options. I.E. to some users it appears that you check email for single
emails, *or* you check digest for a digest email.

To help remove this possible confusion, the digest mode checkbox should
be disabled if no digest-able transports are checked for a given notice.

Test Plan:
1) Apply this patch
2) For both the staff interface and the opac, note that the digest
   checkbox is disabled any time that no digest enabled transport (
   email, sms if enabled ) is checked for the patron editor.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e95ffe8da341b44184dfe1c9b9c2c18d44ff8482)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28293: (bug 20443 follow-up) Fix wrong key in Patrons::Import->generate_patron_at...
Jonathan Druart [Thu, 6 May 2021 09:18:55 +0000 (11:18 +0200)]
Bug 28293: (bug 20443 follow-up) Fix wrong key in Patrons::Import->generate_patron_attributes

It generates warnings
Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/Koha/Patrons/Import.pm line 550, <$fh> line 2.

And does not sort correctly (no fallback on the attribute's value for repeatable attributes)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2da36e3f175de1fcf23bdfbc96b8053f3a0a7d26)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>