]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 25850: (QA follow-up) Match logic in is_holiday
Martin Renvoize [Mon, 29 Jun 2020 08:54:58 +0000 (09:54 +0100)]
Bug 25850: (QA follow-up) Match logic in is_holiday

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit afd88e1d21a5cb5f2198c058144065b64098c124)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4c0d7b14bebcedb802488ee1fb200a2c7513ca91)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25850: Adapt day of week in Koha::Calendar::get_push_amt to 0..6 with 0 being...
Andreas Jonsson [Tue, 23 Jun 2020 13:57:29 +0000 (15:57 +0200)]
Bug 25850: Adapt day of week in Koha::Calendar::get_push_amt to 0..6 with 0 being Sunday.

1. Go to tools -> calendar and make sure Sundays are holidays by adding
   a holiday on a Sunday and selecting "Holiday repeated every same day
   of the week" and "Copy to all libraries" and save.
2. Go to administration -> system preferences and select "Use the
   calendar to push the due date to the next open matching weekday
   for weekly loan periods, or the next open day otherwise" for the
   system preference "useDaysMode" and save the system preferences.
3. Put the below code in a file name test.pl and execute it using
   the command "sudo koha-shell -c 'perl test.pl' kohadev"

   use Koha::Calendar;

   my $calendar = Koha::Calendar->new( branchcode => 'CPL' );
   $dt = DateTime->new(
       year       => 2020,
       month      => 06,
       day        => 21
   );

   print "This is a sunday: " .
   $dt->day_of_week . "\n";

   my $ndt = $calendar->next_open_days($dt, 0);

   print "This is a monday: " .
   $ndt->day_of_week . "\n";

4. Without the patch applied, this script
   will freeze after printing "This is a
   sunday ...".  Abort using ctrl-c.
5. Apply patch and run the script again.
   The test script will now complete.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 25127f422821756b030b8f377b3e112b907be5eb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 238b2af84fe8efe8a740758a774f3587717ffb2b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25850: Regression Test
Martin Renvoize [Fri, 26 Jun 2020 15:52:50 +0000 (16:52 +0100)]
Bug 25850: Regression Test

This patch adds a unit test to test for an infinite loop as highlighted
by the bug.

Test plan
1/ Run the test before applying the fix
2/ The test should fail for 'Sundays'
3/ Apply the subsquent patch
4/ Re-run the test
5/ It should now pass

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95c8d19530e8bef20e02be0b74d7927764bf7ed1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f5f3269e25169e295fa495dc6b38114edcb767a6)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25443: (follow-up) surround strings with <span>
Bernardo Gonzalez Kriegel [Sun, 24 May 2020 11:51:27 +0000 (08:51 -0300)]
Bug 25443: (follow-up) surround strings with <span>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 46d3ec264c4e46cc73ee1713b5c39e6c564e5a1a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5680e79f0da5795ab0f99a7b145a6b2115fd39e4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25443: Improve translation of 'Select the record to link%s to'
Katrin Fischer [Sun, 24 May 2020 00:04:03 +0000 (02:04 +0200)]
Bug 25443: Improve translation of 'Select the record to link%s to'

Before this patch the title was set in italic, which caused the
translation string to be cut off. Removing the italic formatting in
favor of quotes and splitting the string into 2 sentences (dealing
with title existing and not existing:

Select the host record to link to '[% bibliotitle | html %]'
Select the host record to link

To test:
- Activate EasyAnalyticalRecords system preference
- Search for a record in staff
- Use Edit > Link to host record
- Verify the text is shown as above with the reord's title
- The second case is a bit theoretical:
- Delete 245$a from the record or empty out biblio.title using SQL
- Verify the string still shows but without the 'to...' part.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d53b58cab858f06be7f9762b16b89c8bfbce5625)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f7b93ef9c54bd1ce662ff7147f958a6fa73369a2)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25890: Update sorting column for checkouts table
Nick Clemens [Mon, 29 Jun 2020 11:04:59 +0000 (11:04 +0000)]
Bug 25890: Update sorting column for checkouts table

Test plan:
- Check some items out, all from different libraries
- Modify the checkout and due dates, like:
    2018-10-22
    2018-01-23
    2018-05-27
- Sort by checkout date, verify it is actually sorting on homebranch
- Apply patch
- Reload page
- Note you can now sort items correctly

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 6250c2dc1556dbf0ef87f2bb36f13534cb2e2368)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33cb7a9d0b78fc69b97b687a39170473d662aeee)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25914: Fix incorrect variable name causing relative's checkouts column to be...
Kyle M Hall [Thu, 2 Jul 2020 12:32:51 +0000 (08:32 -0400)]
Bug 25914: Fix incorrect variable name causing relative's checkouts column to be empty in OPAC

In the OPAC, the title column in the relatives checkouts table is always empty.

Test Plan:
1) Enable viewing of relative's checkouts in OPAC
2) Check some items out to a patron
3) Log into the OPAC as a relative of that patron that should be able to
   view them
4) Note the title column is empty in the relative's checkouts tab
5) Apply this patch
6) Reload the page
7) Titles should appear in the title column!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0b69ff1ed7a775b6fdca8513d1ec5a692e30bbe9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d49844d0e1b3ad54c3a7706232437c1a22871fd8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoUpdate release notes for 19.11.08 release v19.11.08
Aleisha Amohia [Wed, 22 Jul 2020 02:55:28 +0000 (14:55 +1200)]
Update release notes for 19.11.08 release

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoIncrement version for 19.11.08 release
Aleisha Amohia [Wed, 22 Jul 2020 00:53:18 +0000 (12:53 +1200)]
Increment version for 19.11.08 release

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoFixing po files for 19.11.08
Aleisha Amohia [Wed, 22 Jul 2020 00:50:54 +0000 (12:50 +1200)]
Fixing po files for 19.11.08

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoTranslation updates for Koha 19.11.08
Koha translators [Wed, 22 Jul 2020 00:41:57 +0000 (21:41 -0300)]
Translation updates for Koha 19.11.08

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25864: Lower case fields for searching
Nick Clemens [Wed, 24 Jun 2020 12:20:03 +0000 (12:20 +0000)]
Bug 25864: Lower case fields for searching

To recreate:
 1 - Have Koha using ES5 and Elasticsearch as search engine
 2 - Enable DumpTemplateVarsIntranet and DumpSearchQueryTemplate
 3 - Do a search in authorities using 'Search entire record' (abduction if using sample db)
 4 - Note no results
 5 - View the page source and find 'search_query'
 6 - Note the uppercased fields
 7 - curl 'es:9200/koha_kohadev_authorities/data/417?pretty'
 8 - Note all fields lower-cased
 9 - Apply patch
10 - Repeat search
11 - It works!

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2ab6018b6e14ae2153093db148f04f71405f4493)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ecdefe969e76c0819e8386f8af539f79528a44b3)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25864: Unit test adjustment
Nick Clemens [Wed, 24 Jun 2020 12:22:48 +0000 (12:22 +0000)]
Bug 25864: Unit test adjustment

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 579a3c11edf77d36488f352d88ae373cc4cbfa21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b2504f1a2fb9b9d44f743ad981794d3365c89951)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25434: Display selections-toolbar on small screens
Jonathan Druart [Tue, 26 May 2020 10:28:13 +0000 (12:28 +0200)]
Bug 25434: Display selections-toolbar on small screens

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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 4d9ca6b13d29acc088777e9df414aaa54be4e389)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 014dfd82b6043437a08589e18f2917aaebdfc592)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22672: Change <i> to <em> and <b> to <strong> in templates, includes, xslt
Lucas Gass [Wed, 27 May 2020 21:35:16 +0000 (21:35 +0000)]
Bug 22672: Change <i> to <em> and <b> to <strong> in templates, includes, xslt

This patch attempts to replace <i> with <em> AND <b> with <strong> in
order to more accessible to screen readers. This patch makes no attempt
to change Font Awesome icons which typically use <i>. I found templates,
includes and XSLT by using 'git grep ‘<b>’
koha-tmpl/opac-tmpl/bootstrap/en/' and git grep ‘<i>’
koha-tmpl/opac-tmpl/bootstrap/en/

TEST PLAN:
There should be no visible difference on the changed pages. The files
changed are:
koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-note.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/enroll.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/xslt/OAI.xslt

Read the changes and make sure everything looks correct, try to visit as
many pages as possible and confirm that everything looks as it should.
grep around for cases of <b> or <i> that I could have missed.

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d3036d46ba4b26df040a25f960c3bc3081734c26)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 25d820f3226c6116d064591abc67e2463a571f50)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25875: Unit test
Nick Clemens [Thu, 25 Jun 2020 10:38:16 +0000 (10:38 +0000)]
Bug 25875: Unit test

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7467f10ceb52696f263746d5495532e2b63b8f5b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25875: Move check for module_bit and code to the JOIN
Nick Clemens [Thu, 25 Jun 2020 10:38:26 +0000 (10:38 +0000)]
Bug 25875: Move check for module_bit and code to the JOIN

If we limit the JOIN to rows with the correct subpermission we won't
duplicate the returned patrons

To test:
 1 - Give a patron full acquisitions permissions
 2 - Also give them several subpermissions on other areas
 3 - Go to Acquisitions
 4 - Edit a fund
 5 - Add a user to the fund
 6 - Search for user above
 7 - They return multiple times in results
 8 - Apply patch
 9 - Restart all the things
10 - Repeat search
11 - Patron appears once

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 721876785142fea84f02c7dbe4f325e2a605bd0f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59e1e78c6d59ee6ced202382e2910676a4e32360)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25793: OAI 'Set' and 'Metadata' dropdowns broken by OPAC jQuery upgrade
Owen Leonard [Mon, 22 Jun 2020 23:57:29 +0000 (23:57 +0000)]
Bug 25793: OAI 'Set' and 'Metadata' dropdowns broken by OPAC jQuery upgrade

This patch modifies the OAI XSLT file, correcting the path to jQuery
assets and adds a link to jquery-migrate.

To test, apply the patch and make sure the "OAI-PMH" system preference
is enabled.

1. Go to: <OPACBaseURL>/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marc21
   e.g.
   localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marc21
2. Click on the 'Sets' and 'Metadata' links. The corresponding
   panels with set and metatdata information should be shown.

Tested against master, works as described.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 23ed2e110e16f04a34c01ac866b470ec725b7522)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 13ac8457d5ef1da87ecbc729ffb93b9f19fd84e1)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25491: Fix for "Use of uninitialized value" in InstallAuth.pm
Slava Shishkin [Wed, 13 May 2020 17:20:27 +0000 (20:20 +0300)]
Bug 25491: Fix for "Use of uninitialized value" in InstallAuth.pm

This warning was thrown:
    Use of uninitialized value $info{"invalid_username_or_password"}
    in numeric eq (==) at /home/vagrant/kohaclone/C4/InstallAuth.pm
    line 387.

There is the case when hash key can be undefined in numeric comparison.

Fixed by adding additional precheck for
$info{"invalid_username_or_password"} being Perl's "true".

To test:
    1) Go to the first page of the web-installer where it asks to login.
    2) Observe the warning in the log file.
    3) Apply patch.
    4) Repeat step 1.
    7) Check that previous warning suppressed.

Mentored-by: Andrew Nugged <nugged@gmail.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 d81438e143273a538c09cd16e7f92a83beed4027)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3a3237da9c2f107a9d4e4a9e9383316ce10e6ecc)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years ago[19.11.x] Bug 25858: Use bitwise OR for setting a bit in borrowers.flag
Aleisha Amohia [Thu, 16 Jul 2020 04:24:38 +0000 (16:24 +1200)]
[19.11.x] Bug 25858: Use bitwise OR for setting a bit in borrowers.flag

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years ago[19.11.x] Bug 25858: Don't attempt to set flag if already set
Aleisha Amohia [Thu, 16 Jul 2020 04:23:07 +0000 (16:23 +1200)]
[19.11.x] Bug 25858: Don't attempt to set flag if already set

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24986: DBIC
Aleisha Amohia [Thu, 16 Jul 2020 04:17:14 +0000 (16:17 +1200)]
Bug 24986: DBIC

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24986: DBRev 19.11.07.001
Aleisha Amohia [Thu, 16 Jul 2020 04:14:40 +0000 (16:14 +1200)]
Bug 24986: DBRev 19.11.07.001

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24986: Modify some borrowers DB fields to (TINY|MEDIUM)TEXT
Jonathan Druart [Thu, 4 Jun 2020 10:12:23 +0000 (12:12 +0200)]
Bug 24986: Modify some borrowers DB fields to (TINY|MEDIUM)TEXT

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16a5197aa9f96ee8a7fb6c63e15a6c7f9342f773)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c234daac2afe239625a59940c4aa8ef37453762b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25805: Return empty strings instead of undef in C4::SIP::ILS::Item::hold_patron_name
Kyle M Hall [Thu, 18 Jun 2020 13:01:36 +0000 (09:01 -0400)]
Bug 25805: Return empty strings instead of undef in C4::SIP::ILS::Item::hold_patron_name

This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode.
The subroutine hold_patron_bcode should always return an empty string, not undef.

Test Plan:
1) Using the SIP cli emulator, checkin an item that is not checked out
2) Note the DA field contains someting like "C4::SIP::SIPServer=HASH(0x88175c8)"
   The hex number will almost certainly be different from this example
3) Apply this patch
4) Restart the SIP server
5) Run the SIP checkin again
6) Note the DA field is no longer present!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 017b67e6c52ab7b79a0187b1ca9fea220117f7ef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 18faf9b7aa7c313fd9fa086c5f9609ef7b0c70f5)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25805: Regression tests
Tomas Cohen Arazi [Thu, 18 Jun 2020 19:54:42 +0000 (16:54 -0300)]
Bug 25805: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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 115eeada2b6f959997d21d0e0dd73606f1ca7324)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c65e76a7c49720cf112c59a0583a9545b34844c4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 4985: Fix Plack scope errors
Emmi Takkinen [Thu, 19 Mar 2020 07:12:19 +0000 (09:12 +0200)]
Bug 4985: Fix Plack scope errors

This patch 'ours' several variables to fix Plack scope errors
in exceptionHolidays.pl.

This also adds '@holidays_list' as parameter to 'edit_holidays'.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 ee3f5d5a85d93dc36d6bdeab5f092c0098d604e1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b66500e424dd12a37fe418816947c56cba9134b4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 4985: Edit a calendar entry for all branches
Emmi Takkinen [Fri, 7 Feb 2020 10:43:54 +0000 (12:43 +0200)]
Bug 4985: Edit a calendar entry for all branches

This patch adds functionality to calendar tool to
make edits or deletes to all branches at once.

To test:
-Apply patch
-Add holiday for a library and copy it to all or some
libraries
-Edit previosly made holiday (edit, delete etc.) and
check out "Copy changes to all libraries." checkbox
=> Changes are made to all libraries sharing changed
holiday

Sponsored by: Koha-Suomi Oy

Signed-off-by: Christofer <christofer.zorn@ajaxlibrary.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 ce2219425d9b97952f5904024fb7575a0809487b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f85f47365a1460d1e68280835d69008424fea45)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22807: Compile CSS
Lucas Gass [Fri, 10 Jul 2020 17:31:08 +0000 (17:31 +0000)]
Bug 22807: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c561fda1fb166dd2130b02fbb96c47be771d9b7a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22807: (follow-up) Update style of skip button
Owen Leonard [Wed, 10 Jun 2020 18:30:50 +0000 (18:30 +0000)]
Bug 22807: (follow-up) Update style of skip button

This patch updates the markup and style of the skip button, adapting
(i.e. stealing) the style of the skip link at https://webaim.org.

To test, apply the patch and rebuild the OPAC CSS:
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client

Go to any page in the OPAC and hit the tab key. The "Skip to main
content" link should appear. Tabbing away from it should cause the link
to hide. Hitting the ENTER key when the link is highlighted should cause
the page to scroll to the main content.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
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 2e94cb26a8267df72f657fb7c1097d08318e8a21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 30cc30bb996567dc5491f06c5224f1db1163d324)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22807: Ensure .maincontent appears on all pages
Martin Renvoize [Wed, 10 Jun 2020 15:56:40 +0000 (16:56 +0100)]
Bug 22807: Ensure .maincontent appears on all pages

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
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 c5b173f7dec5d94c29249dfa00e61861d5645998)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0923ccef50d5052d6e14812eaa20e1e4c37dec89)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22807: Ensure only one maincontent on searcresults
Martin Renvoize [Wed, 10 Jun 2020 12:57:42 +0000 (13:57 +0100)]
Bug 22807: Ensure only one maincontent on searcresults

Prior to this patch, if you entered a search that returned zero results,
you would end up with two 'maincontent' classes on the page

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
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 6b0887f76e2f561187f6eae78f932987520a9cb6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38bdbb4d5528c68e2ca2d69dfc922a790f09a991)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22807: Add 'Skip to content' option
Martin Renvoize [Tue, 9 Jun 2020 13:10:53 +0000 (14:10 +0100)]
Bug 22807: Add 'Skip to content' option

This patch adds a 'Skip to content' link to the header bar which will
only appear upon the first use of 'tab' to navigate after any fresh page
load in the OPAC.

Test plan
1/ Load any page in the OPAC
2/ Hit the `tab` key
3/ Note the new 'Skip to main content' link appears at the top left of
the screen.
4/ Hit `Enter` or Click the button
5/ Note the page scrolls to the area of the page that has the first block
   containing a .maincontent class.
6/ Note that the next available focusable element after the first .maincontent
   block has been given focus.
7/ Note that the link has been hidden

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
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 c36560a1ad731af955c005306c2c2800057cd890)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c8da2d3278a89df4d670465bfc55e269a4472f4e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25151: Fixing semantic headings in opac-basket.tt
Hayley Mapley [Wed, 10 Jun 2020 23:48:54 +0000 (11:48 +1200)]
Bug 25151: Fixing semantic headings in opac-basket.tt

Test plan:
1) Apply the patch
2) Add items to your cart/folder/basket
3) Open up the basket and check that the main heading is now an h1
4) Check that the page looks fine

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 f002bd17105bab2d16aee8db8ed4f6d688192fc3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 987eb51a3330e69b018633d01ed987d9cf04dfb7)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25239: Fix semantic heading for opac-reserve.tt
Martin Renvoize [Thu, 11 Jun 2020 12:05:31 +0000 (13:05 +0100)]
Bug 25239: Fix semantic heading for opac-reserve.tt

Prior to this patch, the opac-reserve contained semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Attempt to place a hold on an item.
3/ On the resulting screen, note that the headings are:
   H1 (Koha page title) > H3 (Confirm holds for) > H5 (Hold levels)
4/ Apply this patch and reload the page
5/ Re-inspect the elements in question note the heading semantics are now:
   H1 (Title of page) > H2 (Confirm holds for) > H3 (Hold levels)
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 1a96ede5f114bd90fe1735702ca4bab77dfed9d4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5574a5850f2a55a3544b3f9d5c95bf491aae4e03)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25154: Add heading where content is introduced in opac-results.tt
Martin Renvoize [Thu, 11 Jun 2020 12:23:32 +0000 (13:23 +0100)]
Bug 25154: Add heading where content is introduced in opac-results.tt

Prior to this patch, the search results page did not contain a
semantically accurate heading to introduce he main content of the page.

Test plan
1/ Perform a search in the OPAC that yields results
2/ Inspect the page and note that the 'title' stating how many results
   are found is not semantically marked up as a heading to introduce the
   content.
3/ Apply the patch
4/ Reload the page
5/ Inspect the page and note that the 'title' stating how many results
   are found is now properly marked up as a second level heading and
   appropriately designated as the start of the 'maincontent' block with an
   associated '.maincontent' class.
6/ Perform a search which yields zero results
7/ Note that the 'No results found' title is properly marked up as a
   second level heading.
8/ Signoff

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 972aeaa0143dcdedc7ae23314a72991d5e4a6490)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 42e3ce7e921e4bd1b54095fd0631bdea2f24d73f)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25236: Compile CSS
Lucas Gass [Fri, 10 Jul 2020 17:05:31 +0000 (17:05 +0000)]
Bug 25236: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 19efe6d86216301cd03654f358c0171822f07b58)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25236: Fix semantic heading for opac-full-serial-issues.tt
Martin Renvoize [Thu, 11 Jun 2020 10:54:22 +0000 (11:54 +0100)]
Bug 25236: Fix semantic heading for opac-full-serial-issues.tt

Prior to this patch, the opac-full-serial-issues side navigation box contained
semantically incorrect headings.

Test plan
1/ Search for a serial with many linked issues
2/ Navigate to the detailed view of that serial
3/ Click on the 'More details' link after all the listed issues
4/ Inspect the 'Refine your search' elements on the left side of the screen.
   Note that the headings are H1 (Koha page title) > H4 (Refine your search)
3/ Apply this patch
4/ Reload the page
5/ Re-inspect the 'Refine your search' elements and note the heading
   semantics are now H1 (Title of page) > H2 (Refine your search)
6/ Note the appearance of the box is improved and consistent with elsewhere
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 0550e0b7f788b65b50ed4689d677600be3f9c7c2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e6cd1ced668bdf25307dc041c95557ec71dfff02)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25236: Fix semantic heading for opac-topissues.inc
Martin Renvoize [Thu, 11 Jun 2020 10:44:53 +0000 (11:44 +0100)]
Bug 25236: Fix semantic heading for opac-topissues.inc

Prior to this patch, the opac-topissues side navigation box contained
semantically incorrect headings.

Test plan
0/ Enable 'OpacTopIssues'
1/ Navigate to the top issues page via the 'Most popular' link
2/ Inspect the 'Refine your search' elements on the left side of the screen.
   Note that the headings are H1 (Koha page title) > H4 (Refine your search)
3/ Apply this patch
4/ Reload the page
5/ Re-inspect the 'Refine your search' elements and note the heading
   semantics are now H1 (Title of page) > H2 (Refine your search)
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 62795521eedc02e11bef520c8b980d480b7e02ae)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a01f91887ee5ca24c7950cbd59984dbd335404d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25236: Fix semantic heading for opac-facets.inc
Martin Renvoize [Thu, 11 Jun 2020 10:37:26 +0000 (11:37 +0100)]
Bug 25236: Fix semantic heading for opac-facets.inc

Prior to this patch, the opac-facets side navigation box contained
semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Inspect the 'Refine your search' elements on the left side of the
screen. Note that the headings are H1 (Koha page title) > H4 (Refine
your search) > H5 (Headings within 'Refine your search' box)
3/ Apply this patch and follow
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
4/ Reload the page (Flushing the cache to ensure the CSS change load)
5/ Re-inspect the 'Refine your search' elements and note the heading
semantics are now H1 (Title of page) > H2 (Refine your search) > H3
(Headings within 'Refine your search')
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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 f88d56f689e514b47930d617049358fdf9b68608)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cc75932f3eca746e8e2c08125306a94952b8a87d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25238: Fix semantic heading for opac-details
Martin Renvoize [Thu, 11 Jun 2020 11:15:21 +0000 (12:15 +0100)]
Bug 25238: Fix semantic heading for opac-details

Prior to this patch the opac-details view contained multiple h1 level
headings.

Test plan
1/ Perform a search in the OPAC that will yield results
2/ Navigate to any results detailed view
3/ Inspect the page and note that two H1 level headings are present
(Page title + Item title)
4/ Apply the patch
5/ Reload the page
6/ Inspect the page and ntoe that the 'Item title' is now a level 2
heading
7/ Note the page still appears nicely
8/ Signoff

Bonus points: Check with XSLT views enabled and disabled, MARC21,
UNIMARC and NORMARC variations.

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 3e18402c240814d7f00a62c3f2359bd9b9d0a098)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0e711e024e2ac25347a17d6499289d90c6da29de)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25789: Don't allow past date as holds expiration date
Emmi Takkinen [Thu, 18 Jun 2020 06:36:55 +0000 (09:36 +0300)]
Bug 25789: Don't allow past date as holds expiration date

When editing existing holds expiration date it's possible to select
past date from datepicker. This patch changes expiration inputs class
as "datepickerto" to make past dates unselectable.

To test:
1.  Find item with holds
2.  Edit holds expiration date
=> Note that past dates are selectable
3. Apply patch
4. Edit again
=> Past dates are no longer selectable

Sponsored-by: Koha-Suomi Oy
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 c3365a35963742b294a4c8631b22aa34dac228d9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 773dd857eed7e6eca01a8c098b973e20356157a3)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25756: remove erroneous hyphen
Andreas Roussos [Mon, 15 Jun 2020 14:58:38 +0000 (16:58 +0200)]
Bug 25756: remove erroneous hyphen

In the Staff Client, the OPAC "Appearance" preferences table has an
extra, empty HTML table row at the end.

Test plan:
0) Observe the empty HTML table row at the end of the table that lists
   OPAC "Appearance" system preferences.
1) Apply this patch.
2) Observe that the empty table row is now gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.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 251197ad73ba2be88ac2154db46748b58a0597f8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3fdec870573700d2d0d585b7453f279c25e116a1)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25611: Use selected vendor when creating a basket
Jonathan Druart [Fri, 5 Jun 2020 09:15:33 +0000 (11:15 +0200)]
Bug 25611: Use selected vendor when creating a basket

We did not take into account the vendor selected.

Test plan:
1. Choose Vendor
2. Create Basket
3. Assign a new vendor
Without the patch this new vendor is not changed
With the patch applied the vendor is changed

4. Edit the basket, change the vendor

Reported-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Rhonda Kuiper <rkuiper@roundrocktexas.gov>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cd716269a7b2b1b6165154ea7e85844201402a8d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b2514759bcd4b5d3cb5758bf66890f1d84a2c586)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 11994: (follow-up) Make things work when LibraryName is empty
Katrin Fischer [Fri, 1 May 2020 20:11:29 +0000 (20:11 +0000)]
Bug 11994: (follow-up) Make things work when LibraryName is empty

When LibraryName system preference was not set, the installation
of the plugin would fail with:

Firefox could not download the search plugin from: ...

Now if the pref is empty, the description 'Library catalog'
will be used instead.

To test:
- Empty your LibraryName pref
- Verify the search plugin can still be installed
  (see first patch for further instructions)

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 1e0dd6d0783a66514fc92cc0a34ca0882a5ce62f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 42e8c0185cf50b93789f3cfe6d4532565e084aeb)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 11994: OpenSearch plugins needs to be delivered with Content-Type application...
Katrin Fischer [Fri, 1 May 2020 17:20:43 +0000 (17:20 +0000)]
Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml

https://developer.mozilla.org/en-US/docs/Web/OpenSearch
Your server should serve OpenSearch plugins using
Content-Type: application/opensearchdescription+xml.

To test:
- Verify the Content-Type the file is delivered with
  is correct, for example using wget
  http://127.0.0.1:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e15992e4eb1e194a8ecc3bf8f04b5a74e6e5520a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 11994: Fix OpenSearch discovery in the OPAC
Owen Leonard [Tue, 28 Apr 2020 14:41:47 +0000 (14:41 +0000)]
Bug 11994: Fix OpenSearch discovery in the OPAC

This patch corrects the markup for the OpenSearchDescription XML
document and adds (back) the link in the OPAC header which points to it.
This will enable compatible browsers to offer the addition of the OPAC's
keyword search as a search engine option.

I've found documentation suggesting this feature is available (or at
least was at one time) in Chrome and Safari, but in my test it only
works in Firefox.

To test, apply the patch and make sure the OPACBaseURL preference is
set correctly.

 - Open the OPAC in Firefox (these instructions assume the latest
   version, currently v.75).
 - On the right side of the address bar you should see ". . ." Click it
   to trigger the menu.
 - You should see an "Add search engine" entry with your OPAC's icon.
 - Click to add the search engine.

 - Type a keyword to search in the address bar
 - A box should pop up below the address bar showing icons at the bottom
   for performing a search in various search engines. One of these icons
   should be the icon for your Koha OPAC.
 - Click the Koha OPAC icon and confirm that it triggers a keyword
   search in your OPAC.

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ef7b3db4cab73797ba3386b4951c0d86addf871)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f9b44c95a02e5f24d4441622949225757db1b95)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24352: Correct location and collection labels in OPAC search results
Owen Leonard [Tue, 16 Jun 2020 19:48:48 +0000 (19:48 +0000)]
Bug 24352: Correct location and collection labels in OPAC search results

This patch modifies the OPAC's MARC21 search results XSLT so that
OPAC search result information is correctly labeled
based on the OpacItemLocation preference.

Previously, search results showed the label "Location(s)" whether the
setting was "collection code" or "location."

To test, apply the patch and set the OPACXSLTResultsDisplay system
preference to 'default.'

On the OPAC search results page, each result with items should show
information in this format:

   With the OpacItemLocation preference set to 'call number only,'
    - "Availability: Items available for loan: {library} [Call number:
      {call number} ]

   With the OpacItemLocation preference set to 'collection code,'
     - "Availability: Items available for loan: {library}
        Collection(s): {collection description} [{ call number }]"

   With the OpacItemLocation preference set to 'location,'
     - "Availability: Items available for loan: {library}
        Location(s): {shelving location} [{ call number }]"

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>
(cherry picked from commit 897948cff5812a67144355829cf8915af17465d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0aa981c91319450b4c4c8641845c2098f3f73d0b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25509: Remove useless libjs-jquery dependency
David Cook [Fri, 15 May 2020 04:55:49 +0000 (14:55 +1000)]
Bug 25509: Remove useless libjs-jquery dependency

We don't use the libjs-jquery package, so we should remove
the dependency.

To Test:
1) Build package (out of scope of test plan)
2) Install package
3) Note that libjs-jquery is marked by apt as no longer required
4) Remove libjs-jquery package from system and note how it
doesn't take koha-common with it

Signed-off-by: Jonathan Druart <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 9e923e57ed18a104c33cc10a4704450ec4c71c28)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 898bd1256af37f5c4ec945e1d99b5146eecc2231)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25570: (follow-up) Fix tests
Tomas Cohen Arazi [Thu, 21 May 2020 21:25:46 +0000 (18:25 -0300)]
Bug 25570: (follow-up) Fix tests

This patch fixes the libraries tests, that expected the old behaviour

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/libraries.t
=> FAIL: Tests fail
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Jonathan Druart <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 b115dfeca649f2f35e0290ead85f2626eabd0829)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 18051cb02a483dc020afc31b82e3897daba8a793)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25570: Paginate results by default in objects->search
Tomas Cohen Arazi [Thu, 21 May 2020 21:23:01 +0000 (18:23 -0300)]
Bug 25570: Paginate results by default in objects->search

This patch makes the helper paginate the resultsif no pagination
parameters are passed.

Page number defaults to 1, and the page size to the RESTdefaultPageSize
syspref value.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Pagination is not enforced by default
3. Apply this patch
4. Repeat 2
=> SUCCESS: Results are paginated
5. Sign off :-D

Signed-off-by: Jonathan Druart <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 451ae76431d3d580494f917ed397f259cd96a876)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 16530f09687f48cb621c1a1dfc1559fc35979d51)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25570: Regression tests
Tomas Cohen Arazi [Thu, 21 May 2020 20:48:21 +0000 (17:48 -0300)]
Bug 25570: Regression tests

This tests verify that the default behaviour is to paginate the results.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: $c->objects->search doesn't paginate results by default

Signed-off-by: Jonathan Druart <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 2220ce4d50998bef1dcea787d212a287a802b0aa)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fc8bde417820d2f287df997a44136ea0b504b0f7)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25769: Patron self modification triggers change request for date of birth to...
Kyle M Hall [Tue, 16 Jun 2020 12:00:45 +0000 (08:00 -0400)]
Bug 25769: Patron self modification triggers change request for date of birth to null

If PatronSelfModificationBorrowerUnwantedField contains dateofbirth, all
patron self modification requests will attempt to set dateofbirth to
null instead of ignoring the field.

Test Plan:
1) Add dateofbirth to PatronSelfModificationBorrowerUnwantedField
2) Run a patron self modification
3) Note the request sets dateofbirth to null on the staff side
4) Apply this patch
5) Restart all the things!
6) Run another self-modification
7) Note of the staff side that dateofbirth is unaffected

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.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 73c421a5164a3af4b2b8e1001b49f29213a94e3a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 41ad2ba4db8d70f5010f530883ded02c0641329d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25553: Make date columns sortable on the edit items table
Jonathan Druart [Fri, 22 May 2020 09:02:39 +0000 (11:02 +0200)]
Bug 25553: Make date columns sortable on the edit items table

When editing items, the table at the top contain several columns that
have date values, but they cannot be sorted by dates correctly.

Test plan:
Have several items with different dates in columns that contain dates,
like items.dateaccessioned, items.datelastseen)
Sort the column and confirm that with this patch the lines are sorted
correctly

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 31800ba46b2ed03cc2e4431c4d3c56fce678a0ec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ca74f037d83a7c406f187bdfe77cbed7b2f4aade)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25447: Terminology: Fix button text "Edit biblio"
Owen Leonard [Mon, 11 May 2020 19:17:57 +0000 (19:17 +0000)]
Bug 25447: Terminology: Fix button text "Edit biblio"

This patch changes the cataloging main page so that in the menu for
reach search result the "Edit biblio" link is now "Edit record."

To test, apply the patch and do a search in cataloging. In the list of
search results verify that the "Actions" menu contains a link labeled
"Edit record."

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>
(cherry picked from commit 679dcd1574de88cb8b7002c5020e0b4488233943)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f918bee5f612b3eef54bd81999373ed023e737b4)
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25861: Removing non-existent 'important' field from SQL
Aleisha Amohia [Wed, 24 Jun 2020 21:08:16 +0000 (09:08 +1200)]
Bug 25861: Removing non-existent 'important' field from SQL

Bug 17232 updated some SQL queries used when adding new MARC
bibliographic frameworks. When backported to 19.11.x, it referenced a
column `important` that does not exist in marc_tag_structure or
marc_subfield_structure in 19.11.x. This patch removes the references to
`important` so that adding new bibliographic frameworks works again.

To test:
1) Ensure you have checked out 19.11.x branch
2) Go to Admin -> MARC bibliographic frameworks
3) Add a new framework and save
4) Go to Actions -> MARC structure for your new framework
5) Use the 'create framework using' dropdown to import the structure
from an existing framework
6) Note that the structure does not populate, and there is now an error
in the logs "Unknown column 'important'"
7) Apply this patch and restart services
8) Repeat steps 3-5
9) Confirm the structure is populated correctly and there is no error in
the logs

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoUpdate release notes for 19.11.07 release v19.11.07
Aleisha Amohia [Mon, 22 Jun 2020 21:59:44 +0000 (09:59 +1200)]
Update release notes for 19.11.07 release

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoIncrement version for 19.11.07 release
Aleisha Amohia [Mon, 22 Jun 2020 21:39:05 +0000 (09:39 +1200)]
Increment version for 19.11.07 release

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoFixing po files for 19.11.07
Aleisha Amohia [Mon, 22 Jun 2020 21:37:05 +0000 (09:37 +1200)]
Fixing po files for 19.11.07

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoTranslation updates for Koha 19.11.07
Koha translators [Mon, 22 Jun 2020 20:55:25 +0000 (17:55 -0300)]
Translation updates for Koha 19.11.07

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl
David Roberts [Sat, 9 May 2020 16:07:03 +0000 (16:07 +0000)]
Bug 22470: Missing the table name on misc/migration_tools/switch_marc21_series_info.pl

This patch adds the table name to the SQL update statements.

To test:

1) Apply the patch
2) Run the script. Check that there are no errors, and that the script
behaves as expected.

Signed-off-by: Andreas Roussos <a.roussos@dataly.gr>
Created a test record with values in field 440. Applied the patch, ran the
script with the -c -f flags and observed that the values were moved to field
490. Also, the relevant Koha to MARC mappings were changed accordingly.

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 051b0b8d2fb3dc3593147e5ac80bc394dcf48e58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ee5a38798a170e2e996ee330b3f2101a9ae59be)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25394: Cronjob path in the AuthorityMergeLimit syspref description is wrong
Caroline Cyr La Rose [Wed, 6 May 2020 20:22:57 +0000 (16:22 -0400)]
Bug 25394: Cronjob path in the AuthorityMergeLimit syspref description is wrong

Test plan:
1- Apply patch
2- Go to Administration > Global system preferences > Authorities
3- The path to merge_authorities.pl in the AuthorityMergeLimit
description should now read misc/cronjobs/merge_authorities.pl

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>
(cherry picked from commit 772205bab5c7d6720ca6d25244c04cdf7649a96f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8deb5f874ef719db04f37e9741e88fd6ba200515)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25537: Page reload at branchtransfers.pl loses destination branch
Kyle M Hall [Thu, 21 May 2020 17:52:32 +0000 (13:52 -0400)]
Bug 25537: Page reload at branchtransfers.pl loses destination branch

At branchtransfers.pl, one selects a destination branch and scans in any
number of items to generate transfers to that branch. However, anything
that makes the page reload causes your branch selection to be lost,
reverting you back to whichever branch comes first alphabetically.

This is an invitation to error when one has a stack of books to
send all to the same branch. Could that error handling get moved
into a modal or something that won't reload the page?

Test Plan:
1) Place a hold on an item and set it to waiting
2) Initiate a branch transfer from branchtransfers.pl for any branch but
   the first in the pulldown branch selector
3) Choose to cancel the hold and transfer
4) Note the pulldown reverts to the first option
5) Apply this patch
6) Repeat steps 1-3
7) Note the pulldown retains your preveiously selected branch!

Signed-off-by: Andrew Fuerste-Henry <andrew@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 8ab8df3866352568509ed34f02a5566e750dee21)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c8c394d1704acab20717ac3939ee1e5d45343e92)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25576: Add link to the manual for the ILL module
Jonathan Druart [Fri, 22 May 2020 08:23:55 +0000 (10:23 +0200)]
Bug 25576: Add link to the manual for the ILL module

Test plan:
Enable ILLModule system preference.
Go to ILL requests
Click Help

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 50b6e447735ee31a2fbba5b116959cdb6d451c19)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit abc259607eb9b0a8e9781e29c664fecfce103ac2)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25587: fix for "clear" button to reset all selects
Petro Vashchuk [Fri, 22 May 2020 15:11:28 +0000 (18:11 +0300)]
Bug 25587: fix for "clear" button to reset all selects

Button "clear" on cgi-bin/koha/admin/smart-rules.pl did not reset fields
with a dropdown selector except the first one.

This happens because jQuery selector .find("select option:first")
in koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
selects only single first element in the whole group, as from jquery
doc:
> The :first pseudo-class is equivalent to :eq( 0 ). It could also be
> written as :lt( 1 ). While this matches only a single element,
> :first-child can match more than one: One for each parent.
> (https://api.jquery.com/first-selector/)

And it works if replaced by: .find("select option:first-child")

To reproduce:
    1) Go to /cgi-bin/koha/admin/smart-rules.pl
    2) Start editing one of existing rules or filling a new one, change
       all selects to have non-first option selected. Fill text input
       fields with sample data.
    3) Reset all fields with the "clear" button.
    4) Observe that only the first dropdown field was reset to the first
       option while all others still contain previously given values,
       meanwhile all text input fields are cleared as expected.
    5) Apply the patch.
    6) Repeat steps 1, 2 and 3.
    7) Check that all dropdown fields were reset to first option, as
       expected.

Mentored-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 58c389bf279ca6ffdea199ada8d65ce92baaf952)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 585b481cf0a9371f7808602a6d8ec9b81fa1a9c4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25615: Remove empty entries in the filter dropdowns of "holds to pull"
Jonathan Druart [Thu, 28 May 2020 10:11:37 +0000 (12:11 +0200)]
Bug 25615: Remove empty entries in the filter dropdowns of "holds to pull"

On the "Holds to pull" view there are filters that are built on the
value of the cells.
Bug 22536 improved the ergonomic by adding a ul list, but the filters
are now broken, the ul and li tags are retrieved and put in the filter
list.

The idea of this patch is to remove the HTML tags and skip if the value
is then empty.

Test plan:
Place a hold on an item
Go to Home › Circulation › Holds to pull
Open the "libraries" filter
=> Without this patch you see empty entries
=> With this patch the filter contain only the libraries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4f70682c56dddd42f24c62d7634f5cd3b7119702)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 58c071fad3f63de8e069baa84ddea9656e689913)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25623: Make sure oauth.t rolls back the db
Tomas Cohen Arazi [Fri, 29 May 2020 17:41:25 +0000 (14:41 -0300)]
Bug 25623: Make sure oauth.t rolls back the db

This patch adds a missing transaction wrapping one of the subtests. This
is probably an oversight when refactoring this file.

To test:
1. Open the patron categories page
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass
3. Reload the patron categories page
=> FAIL: There's random data in there
4. Apply this patch and repeat 2
5. Reload the patron categories page
=> SUCCESS: The random data from the previous tests is still there, but
no new random data
=> SUCCESS: Tests still pass
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f898cef4f4b5a9f424f968a58b96898f26f80035)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0734017ab62e05ee4b365ac4546dc68acefa86ca)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25675: Reword and reorganize sysprefs related to patron self modification
Andrew Fuerste-Henry [Thu, 4 Jun 2020 16:21:27 +0000 (16:21 +0000)]
Bug 25675: Reword and reorganize sysprefs related to patron self modification

To Test:
1: apply patch
2: restart all
3: go to System Preferences > OPAC
4: confirm "Self registration" section is now labeled "Self registration and modification"
5: confirm OPACPatronDetails is now in the "Self registration and modification" section
6: confirm PatronSelfRegistration now reads "(Allow / Don't allow)  library patrons to register for an account via the OPAC."
7: set OPACPatronDetails to Don't allow
8: set PatronSelfRegistration to Allow
9: log into the opac and verify you're not able to edit your patron details on an existing account

Signed-off-by: DonnaB <donna@bywatersolutions.com>
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 3e4b92d84c50bee27b2f331e5fbbc04813e469bb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 566a9f5a214c38935a65fa4392d24edef2052d85)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25696: Correct "Test prediction pattern" HTML button
David Cook [Tue, 9 Jun 2020 05:38:27 +0000 (15:38 +1000)]
Bug 25696: Correct "Test prediction pattern" HTML button

This patch corrects the closing tag for the "Test prediction pattern"
button from "</a>" to "</button>"

Test plan:
1. Apply the patch
2. Create a serial subscription from a new or existing bib record
3. Choose any frequency, numbering pattern, and subscription start
date you choose (ie fill out all mandatory subscription fields)
4. Click "Test prediction pattern"
5. Note that the prediction pattern appears on the right of the screen

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 4116ca4097732977d7b954a881f191174c28d651)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4001d4a9a0e0a8c2523aa82d7f042caa64409257)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 23276: Do not display tag if pref TagsEnabled is off
Jonathan Druart [Wed, 20 Nov 2019 14:40:10 +0000 (15:40 +0100)]
Bug 23276: Do not display tag if pref TagsEnabled is off

If the pref TagsEnabled is off we should not display the tags at the
OPAC.
There is a message to tell that tags system is disabled, but the tags
are displayed.

We should redirect to 404 like we do in opac-topissues.pl and
opac-suggestions.pl.

Test plan:
- Turn TagsEnabled on
- Add some tags
- Turn TagsEnabled off
- Hit /cgi-bin/koha/opac-tags.pl
=> Without this patch you see a warning messaging saying that the tag
system is disabled, but the tags are displayed
=> With this patch you get a 404 redirect

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>
(cherry picked from commit 6fc316d2eef5945b20a14bec81e2daa57696dd81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9893fb4ec5a480b7adcbb27f321f7387a4f38f45)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25327: Do not call authenticate_api_request to render the spec
Tomas Cohen Arazi [Mon, 4 May 2020 18:43:18 +0000 (15:43 -0300)]
Bug 25327: Do not call authenticate_api_request to render the spec

The original code for Koha::REST::V1::Auth::under called
authenticate_api_request when requesting the API spec. This didn't make
sense, and recent changes on what conditions are tested for public
routes, broke the route.

We could add another condition, but it really doesn't make sense to call
authenticate_api_request if it should be publicly available in any
configuration, as discussed on the bug.

This patch adds a trivial check and the requested route, and lets the
request through in any case in 'under'.

To test:
1. Point your browser to:
   http://kohadev.myDNSname.org:8080/api/v1/
   http://kohadev.myDNSname.org:8080/api/v1/.html
=> FAIL: In both cases you get an authorization error.
2. Apply the regression tests patch
3. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth.t
=> FAIL: The tests reflect the situation, and fail
4. Apply this patch
5. Repeat 1 and 3
=> SUCCESS: All good!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25327: Regression tests
Tomas Cohen Arazi [Mon, 4 May 2020 18:43:08 +0000 (15:43 -0300)]
Bug 25327: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24003: (follow-up) Add all userenv parameters
Tomas Cohen Arazi [Tue, 9 Jun 2020 15:40:32 +0000 (12:40 -0300)]
Bug 24003: (follow-up) Add all userenv parameters

This patch makes the API set more userenv params than just the
borrowernumber. To test:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_*
=> SUCCESS: All tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24003: (follow-up) Move interface setting to a more readable place
Tomas Cohen Arazi [Fri, 5 Jun 2020 12:47:47 +0000 (09:47 -0300)]
Bug 24003: (follow-up) Move interface setting to a more readable place

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24003: Make the API set userenv on authentication
Tomas Cohen Arazi [Fri, 5 Jun 2020 12:16:16 +0000 (09:16 -0300)]
Bug 24003: Make the API set userenv on authentication

This patch makes the authentication step stash the user that got
authenticated so code outside the Mojo part of Koha can use it (i.e.
through the use of C4::Context->userenv).

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t \
           t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24003: Regression tests
Tomas Cohen Arazi [Fri, 5 Jun 2020 12:15:19 +0000 (09:15 -0300)]
Bug 24003: Regression tests

This patch adds regression tests for the different authentication
mechanisms Koha supports. It highlights the fact that Koha expects
userenv to be set on authentication.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25411: Add special handling for public plugin routes
Tomas Cohen Arazi [Thu, 14 May 2020 22:09:04 +0000 (19:09 -0300)]
Bug 25411: Add special handling for public plugin routes

This patch implements the required logic in the API code so plugins are
not affected by the new RESTPublicAnonymousRequests system preference.
It is up to the plugin develpers to handle this

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> FAIL: Notice the tests fail
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Yay! Not bad for a friday evening!
5. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25411: Regression tests
Tomas Cohen Arazi [Thu, 14 May 2020 18:15:52 +0000 (15:15 -0300)]
Bug 25411: Regression tests

This patch adds tests the new RESTPublicAnonymousRequests syspref
doesn't apply to routes added by plugins.

It is up to the plugin developer to handle those conditions.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/PluginRoutes.t
=> FAIL: Notice the tests fail

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years ago[19.11.x] Bug 25045: (follow-up) Fix typo adding the RESTPublicAnonymousRequests...
Aleisha Amohia [Sun, 21 Jun 2020 22:19:38 +0000 (10:19 +1200)]
[19.11.x] Bug 25045: (follow-up) Fix typo adding the RESTPublicAnonymousRequests syspref

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: (RM follow-up) Correction to updatedatebase.pl
Martin Renvoize [Mon, 27 Apr 2020 12:42:11 +0000 (13:42 +0100)]
Bug 25045: (RM follow-up) Correction to updatedatebase.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 733874e24eb20b10e8387d2a9df565fad284b510)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: (RM follow-up) Add the RESTPublicAnonymousRequests syspref
Martin Renvoize [Mon, 27 Apr 2020 10:51:08 +0000 (11:51 +0100)]
Bug 25045: (RM follow-up) Add the RESTPublicAnonymousRequests syspref

The atomic update alos included a quoting mistake

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 19a241c131f03a2640044ac3280759b2e6fd35bc)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: (follow-up) Add the RESTPublicAnonymousRequests syspref
Jonathan Druart [Mon, 27 Apr 2020 10:47:08 +0000 (12:47 +0200)]
Bug 25045: (follow-up) Add the RESTPublicAnonymousRequests syspref

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8d77db27691f22f697c665821f5fb3ddaa69be14)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: DBRev 19.11.06.001
Aleisha Amohia [Sun, 21 Jun 2020 22:09:42 +0000 (10:09 +1200)]
Bug 25045: DBRev 19.11.06.001

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: (follow-up) Add a note to OpacPublic
Tomas Cohen Arazi [Mon, 13 Apr 2020 14:47:30 +0000 (11:47 -0300)]
Bug 25045: (follow-up) Add a note to OpacPublic

This patch tweaks the OpacPublic system preference description so users
don't expect, incorrectly, this syspref to disable the public API
anonymous access.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d3a07c5ee0098c3fe504009144b5c0545c0e75f)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: Allow restricting anonymous requests on the public API
Tomas Cohen Arazi [Mon, 13 Apr 2020 14:40:48 +0000 (11:40 -0300)]
Bug 25045: Allow restricting anonymous requests on the public API

This patch introduces a check on the authenticate_api_request method for
the RESTPublicAnonymousRequests system preference. If disabled,
anonymous  requests get rejected.

The idea is to replicate the homologous OpacPublic system preference
behaviour.

To test:
1. Apply the Unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail, 200 is answered instead of 401 on the route.
3. Apply this patch
4. Repeat 2.
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ec99043a2ede2f994dae72ee2f68884174f94d4c)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: Unit tests
Tomas Cohen Arazi [Mon, 13 Apr 2020 14:40:44 +0000 (11:40 -0300)]
Bug 25045: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 78cb447c7cd13bd37a48f7b3e2d2aa47b5d7b4d9)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25045: Add the RESTPublicAnonymousRequests syspref
Tomas Cohen Arazi [Mon, 13 Apr 2020 14:36:12 +0000 (11:36 -0300)]
Bug 25045: Add the RESTPublicAnonymousRequests syspref

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5394e8443fcba3e307c4add97bef1216fcaa2b11)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24862: Handle annonymous sessions gracefuly
Tomas Cohen Arazi [Fri, 13 Mar 2020 15:03:03 +0000 (12:03 -0300)]
Bug 24862: Handle annonymous sessions gracefuly

This patch introduces code to detect (cookie) annonymous sessions and
act as expected.

Right now, as check_cookie_auth is not passed the required permissions
(because there aren't always required permissions, and the code to check
permissions is shared with other authentication mechanisms) it returns
'ok' and the session id. This use case was overlooked when this was
coded, and yeilds unexpected error codes (500) when the user logs out
and the annonymous session cookie is used to hit the API. The end result
doesn't pose any security issue (i.e. the resource access is rejected)
but the returned error code is not correct and should be fixed.

This patch verifies for an anonymous session (and avoids querying the
corresponding patron) and then verifies if there is an authorization
config on the route and if the patron object is defined.

To test:
1. Apply the tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail, 500 instead of the expected 401
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Repeat the original 'steps to reproduce' from the bug report using
   the browser
=> SUCCESS: Problem solved!
6. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit de07356028d5b98af3a7cd7cbae02a7ad6402a43)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 24862: Regression tests
Tomas Cohen Arazi [Fri, 13 Mar 2020 14:44:03 +0000 (11:44 -0300)]
Bug 24862: Regression tests

This patch introduces tests for the expected behaviour on API routes
that expect a logged in user, but the request is made with an anonymous
session cookie.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail because the situation is not handled correctly in
the code

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>
(cherry picked from commit 0547ad34dfe01ca7d7660df59e29bc30fdf3cf1d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 17084: Automatic debian/control updates
Mason James [Mon, 1 Jun 2020 05:20:17 +0000 (17:20 +1200)]
Bug 17084: Automatic debian/control updates

update for 20.05 release cycle

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b5626ab3f886ee7dd35af6d4f591bb532a2a9d86)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25507: Fix table in basket group PDF German 2-pages
Katrin Fischer [Fri, 22 May 2020 23:22:53 +0000 (01:22 +0200)]
Bug 25507: Fix table in basket group PDF German 2-pages

A variable was doubled up which made the columns in the
table of orders no longer line up (different number of headers
to columns).

To test:
- Create at least one basket with one or more orders
- Close the basket
- Add the basket to a basket group manually or let Koha do it
  on closing
- Change the OrderPdfFormat system preference to 'German 2-page'
- Go to the basket group page and print the PDF of the basket
- Verify the table of orders doesn't look right and runs outside
  the page
- Apply patch
- Repeat the PDF print - now table should look right

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7acffaa03f690a2104afbfeaa3cc12277670db04)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25521: Remove cart_to_shelf note from NewItemsDefaultLocation syspref
Andrew Fuerste-Henry [Fri, 15 May 2020 20:20:05 +0000 (20:20 +0000)]
Bug 25521: Remove cart_to_shelf note from NewItemsDefaultLocation syspref

To test:
1- find the NewItemsDefaultLocation syspref
2- confirm it says "NOTE: This system preference requires the misc/cronjobs/cart_to_shelf.pl cronjob. Ask your system administrator to schedule it."
3- apply patch
4- restart all
5- reload syspref, it doesn't say that anymore!

Signed-off-by: Holly Cooper <hc@interleaf.ie>
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 d21ad9fe11bdbd8c49eb3d64bb24c414bea8a1f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64ea0e5a34d1751a8fd7cec3fe5697083a3ebab4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25545: (follow-up) Fix capitalization
Katrin Fischer [Sat, 30 May 2020 00:56:04 +0000 (00:56 +0000)]
Bug 25545: (follow-up) Fix capitalization

Total + Adjustments + Shipment cost ($)

changed to:
Total + adjustments + shipment cost ($)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 31969accb3dd74ee103c1d7d9fb77141210b1658)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25545: Add adjustments to total tax included
Nick Clemens [Wed, 27 May 2020 10:38:03 +0000 (10:38 +0000)]
Bug 25545: Add adjustments to total tax included

Adjustments are not affected by tax, they are meant as a way to alter invoice
values after receiving (damaged items, refuneds, extra charges, etc)

When adjustments were added the tax included column was missed

To test:
- Add a basket with at least one order
- Close it
- Receive shipment
- Receive the order
- Finish receiving
- Add an adjustment of any amount
- Verify in the invoice details table:
  - Total tax exc. is showing including the adjustmnt
  - Total tax inc. is missing the adjustment
- Apply patch
- Reload
  - Total tax exc. is showing including the adjustmnt
  - Total tax inc. is showing including the adjustment

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 286a739b5cd906a55b2dc97e6ab1ef9ffb00a6f7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4be984e5e037b2c9767cb6c085e37ba20b3a8448)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25597: Add missing Javascript libraries to sco printslip
David Cook [Mon, 25 May 2020 06:25:06 +0000 (16:25 +1000)]
Bug 25597: Add missing Javascript libraries to sco printslip

This patch adds missing Javascript libraries to the self-checkout
print slip. These missing libraries were preventing the auto print
prompt and close. There was also a font error.

To Test:
0) Apply patch
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Press F12 on keyboard and choose Console
5) Note no Javascript errors
6) Note that print dialog appears and closes after
a print option is chosen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8e00a96cf17f9c429050ce2ce5e3095fe566121a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f83d9e683f7f24126e0bba5b36ab4a55d8673de9)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25701: Remove sort on removed field
Nick Clemens [Wed, 10 Jun 2020 10:58:25 +0000 (10:58 +0000)]
Bug 25701: Remove sort on removed field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 35bb41dfc14603d85a6ddb85fec9b4de8d1a4001)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2605cbb912a6259c46e9083789100577a02e498e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25701: (bug 14419 follow-up) Always display facet groups in the same order
Jonathan Druart [Wed, 10 Jun 2020 10:03:20 +0000 (12:03 +0200)]
Bug 25701: (bug 14419 follow-up) Always display facet groups in the same order

It seems that this regression comes from bug 14419, but I have not found
a logic reason behind that.
This patch restores the behaviour we always had: facet groups must be
displayed in a given order: the Zebra index (au, ccode, holdingbranch,
etc.)

Test plan:
Apply this patch, restart all and confirm that the facets are not moving
up and down when you refresh your search result page.

QA note:
I think the following line must be removed
@facets_loop = sort {defined $a->{expand} && defined $b->{expand} && $a->{expand} cmp $b->{expand}} @facets_loop;

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>
(cherry picked from commit d6696944267ca1afd7682193ddf3680a905a773d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91ad11021609bc15e9099f7fe9d4afeb69786647)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25492: Your Account Menu button does nothing on mobile devices
Owen Leonard [Sat, 23 May 2020 14:35:45 +0000 (14:35 +0000)]
Bug 25492: Your Account Menu button does nothing on mobile devices

This patch removes some redundant code from the OPAC JavaScript which
was causing problems with the show/hide action on two controls which are
shown only at narrower browser widths: The "Your account" menu shown
when the user is on a user-related page, and the "Refine your search"
menu shown on the search results page.

To test, apply the patch and go to the OPAC. Narrow your browser width
to below 768 pixels.

 - Perform a search.
 - On the search results page you should see a "Refine your search"
   link at the top of the results. Clicking it should expand and
   collapse the facets menu.
 - Log in to the OPAC.
 - On the "Your summary" page there should be a "Your account menu" link
   at the top of the main part of the page. Clicking it should expand
   and collapse the account menu.
 - Verify that these menus display correctly when you widen and narrow
   the browser window.

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>
(cherry picked from commit 9ac43fd97b58120560a33e26509d5acc712c97fb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5b263c80dc647778bd0a4e23dbfd65167cf4c336)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 25526: Equality matching is case sensative
Martin Renvoize [Mon, 8 Jun 2020 09:23:53 +0000 (10:23 +0100)]
Bug 25526: Equality matching is case sensative

TEST PLAN:
1. Have a fine on a Patron's account.
2. Choose the "Write off Selected" button
3. Enter an amount less than the amount owed by the patron.
4. Koha will give a yellow box with a note "You must collect a value
   greater than or equal to 2.00." The $2.00 is the amount that is
   attempted to write off (the amount less than the amount owed).
5. Apply patch
6. Again try to writeoff an amount less than the amount owed.
7. You should be able to write it off.
8. Try paying an amount more than owed, you should still get an
   error. You shouldn't be able to write off more than the amount.
9. Follow the above steps via 'Pay selected' as aposed to 'Writeoff
   selected'.
10. You should not be able to 'Tender' less than the amount you have
    'Paid'.
11. Disable Javascript and run through all the above steps. You should
    still be blocked where relevant.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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 bbac95d9fbbcc0b586a7bc094f421c35a7d71011)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 433fe0710043660404feb45b54ef5235974fa9a4)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
4 years agoBug 17842: Simplify the code
Jonathan Druart [Tue, 2 Jun 2020 09:05:12 +0000 (11:05 +0200)]
Bug 17842: Simplify the code

There is no need for all the conditions.
From Encode::encode POD:
  "If the $string is undef, then undef is returned."

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 74c7530e3dacd7a1df9ed72d031bc1a5b7063142)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6802d1a67e47fae0982c969f414b05f4f6a7cc28)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>