koha.git
3 years agoUpdate release notes for the 20.05.02 release v20.05.02
Lucas Gass [Wed, 22 Jul 2020 21:05:42 +0000]
Update release notes for the 20.05.02 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoIncrement version for 20.05.02 release
Lucas Gass [Wed, 22 Jul 2020 20:59:18 +0000]
Increment version for 20.05.02 release

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoTranslation updates for Koha 20.05.02
Koha translators [Wed, 22 Jul 2020 20:41:50 +0000]
Translation updates for Koha 20.05.02

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 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]
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>

3 years agoBug 25752: Stay in cwd after koha-shell
Jonathan Druart [Mon, 15 Jun 2020 14:11:49 +0000]
Bug 25752: Stay in cwd after koha-shell

After bug 25538, after a koha-shell we are not longer in the current directory:

root@cec7bffd8100:koha(master)$ pwd
/kohadevbox/koha
root@cec7bffd8100:koha(master)$ sudo koha-shell kohadev
kohadev-koha@cec7bffd8100:~$ pwd
/var/lib/koha/kohadev

Test plan:
Repeat the commands above and confirm that with this version of the
script you get /kohadevbox/koha inside the koha-shell

Search for possible regressions

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 7555ecaafa3bd8bbf0514f3c2672cb41ff7e0aa7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25864: Lower case fields for searching
Nick Clemens [Wed, 24 Jun 2020 12:20:03 +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>

3 years agoBug 25864: Unit test adjustment
Nick Clemens [Wed, 24 Jun 2020 12:22:48 +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>

3 years agoBug 25851: DBRev 20.05.01.003
Lucas Gass [Fri, 17 Jul 2020 19:52:49 +0000]
Bug 25851: DBRev 20.05.01.003

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string
Jonathan Druart [Wed, 24 Jun 2020 06:37:18 +0000]
Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string

On the interface, if "Hold policy" is "Not set", the rule does not exist
in the table. We should reflect that during the update DB process.

Test plan:
1. Set "Hold policy" to "Not set"
2. Confirm that you can place holds
3. Confirm that the rule does not exist in the DB table
4. Set the value to an empty string (manually)
5. Confirm that you cannot longer place holds
6. Go to the circulation rules page and confirm that the value of "Hold
policy" is "Not set"
7. Execute the update DB entry
8. Confirm that you can place holds
9. Confirm that the rule does not exist in the DB table

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Fix misc/admin/koha-preferences
Julian Maurice [Mon, 29 Jun 2020 13:23:35 +0000]
Bug 21395: Fix misc/admin/koha-preferences

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Fix C4/Barcodes/ValueBuilder.pm
Julian Maurice [Mon, 29 Jun 2020 13:13:10 +0000]
Bug 21395: Fix C4/Barcodes/ValueBuilder.pm

$DEBUG variable was always set to 0, so it was useless

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Ignore .perlcriticrc in t/Makefile.t
Julian Maurice [Mon, 29 Jun 2020 13:01:25 +0000]
Bug 21395: Ignore .perlcriticrc in t/Makefile.t

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Fix creation of PO file
Julian Maurice [Mon, 29 Jun 2020 12:57:11 +0000]
Bug 21395: Fix creation of PO file

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25440: Fixed list of 'show_rule' forming variables in the template
Andrew Nugged [Wed, 17 Jun 2020 20:18:01 +0000]
Bug 25440: Fixed list of 'show_rule' forming variables in the template

In smart-rules.tt we have `SET show_rule = ...` section which filled
with 'all used in the loop' variables. Because if historical reasons it
seems that there are some missing, few old, and even doubled ones.
This list is fixed now by:

  - variable names 'article_requests' and 'renewalsallowed' repeated
    so duplicates are removed;

  - 'hardduedatebefore' and 'hardduedateexact' not present in the whole
    site code anywhere anymore;
    IMPORTANT NOTE: these 'hardduedatebefore/hardduedateexact' also
                    exists as remnants in .po-translation files, a lot.

  - 'note', 'hardduedatecompare', 'renewalperiod', 'rentaldiscount'
    template variables were missing from this 'show_rule =' checking
    code so they are added.

Order of fields updated to match with above "SET field = ..." pack.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 25440: (QA follow-up) Correction for typo

'engthunit -> lengthunit

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25440: Fix for "uninitialized $maxsuspensiondays" in smart-rules.pl
Andrew Nugged [Tue, 19 May 2020 08:20:41 +0000]
Bug 25440: Fix for "uninitialized $maxsuspensiondays" in smart-rules.pl

This warning emitted:

Use of uninitialized value $maxsuspensiondays in string eq
at /admin/smart-rules.pl line 257.

But that not just undef-warning, there is broken logic,
these two lines are mutually contradictory and goes one-by-one:

    $maxsuspensiondays = undef if $maxsuspensiondays eq q||;
    $maxsuspensiondays = '' if $maxsuspensiondays eq q||;

Fix is simple: to make it '' if it comes undef.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25440: Fix for "uninitialized value in string eq" in smart-rules.pl
Andrew Nugged [Tue, 19 May 2020 08:03:13 +0000]
Bug 25440: Fix for "uninitialized value in string eq" in smart-rules.pl

This warning emitted:

Use of uninitialized value in string eq at /admin/smart-rules.pl line 289.

It is solved by one line added to exclude comparison with 'on' string
when variable is 'undef'.

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 5eebfcf68747b4886b23a9d4c8df37ea7d103edb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25440: Fix for "uninitialized value in hash" warning in smart-rules.pl
Andrew Nugged [Sun, 10 May 2020 15:18:35 +0000]
Bug 25440: Fix for "uninitialized value in hash" warning in smart-rules.pl

This warning emitted:

Use of uninitialized value in hash element
at /admin/smart-rules.pl line 569.

that happened because we have NULLs in SQL results for 'categorycode'
and 'itemtype' which later used as 'any' kind of category/item in the
template, so for the template it passed this way:

    $rules->{ $r->{categorycode} }->{ $r->{itemtype} }->...

but undef will stringify as "" to become a hash key ("Hashes are
unordered collections of scalar values indexed by their associated
string key" https://perldoc.perl.org/perldata.html),

that's why "undef warning". To prevent warning here is the simple fix:

    $rules->{ $r->{categorycode} // '' }->{ $r->{itemtype} // '' }->...

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25440: Fix for "CGI::param called in list context" in smart-rules.pl
Andrew Nugged [Sun, 10 May 2020 10:28:40 +0000]
Bug 25440: Fix for "CGI::param called in list context" in smart-rules.pl

This warning emitted:

CGI::param called in list context from /admin/smart-rules.pl line 262,
this can lead to vulnerabilities. See the warning in "Fetching the value
or values of a single named parameter" at CGI.pm line 412.

Explained here: https://metacpan.org/pod/CGI#Fetching-the-value-or-values-of-a-single-named-parameter

And because all these params are not multi-params, so simple "scalar .."
forcing for CGI->param is the fix. Changes are transparent and same
values should be assigned as before, just no more warnings.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25440: Extra duplicated call to CGI->param method removed
Andrew Nugged [Sun, 10 May 2020 10:54:29 +0000]
Bug 25440: Extra duplicated call to CGI->param method removed

In code CGI param 'no_auto_renewal_after_hard_limit' assigned to
"$no_auto_renewal_after_hard_limit" var, and then just in the next line
again variable "$no_auto_renewal_after_hard_limit" reassigned with
call to same "$input->param('no_auto_renewal_after_hard_limit')".

Fixed. No logic or results should be changed.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Remove 'variable $DEBUG masks earlier declaration in same scope' warning
Jonathan Druart [Mon, 29 Jun 2020 11:42:55 +0000]
Bug 21395: Remove 'variable $DEBUG masks earlier declaration in same scope' warning

% prove t/db_dependent/Serials.t
t/db_dependent/Serials.t .. 8/49 "my" variable $DEBUG masks earlier declaration in same scope at /kohadevbox/koha/C4/Barcodes/ValueBuilder.pm line 45.
"my" variable $DEBUG masks earlier declaration in same scope at /kohadevbox/koha/C4/Barcodes/ValueBuilder.pm line 87.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: (QA follow-up) POD fixes
Martin Renvoize [Thu, 25 Jun 2020 12:48:36 +0000]
Bug 21395: (QA follow-up) POD fixes

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: (QA follow-up) Remove some introduced issues
Martin Renvoize [Thu, 25 Jun 2020 10:31:49 +0000]
Bug 21395: (QA follow-up) Remove some introduced issues

This patch removes some new error cases introduced during rebase

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Fix QA errors
Julian Maurice [Mon, 27 Apr 2020 08:31:19 +0000]
Bug 21395: Fix QA errors

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@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 1682341b5849c34e59597cda780d4c877d6f3278)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 21395: Make perlcritic happy
Julian Maurice [Fri, 21 Sep 2018 16:05:42 +0000]
Bug 21395: Make perlcritic happy

This patch adds a .perlcriticrc (copied from qa-test-tools) and fixes
almost all perlcrictic violations according to this .perlcriticrc
The remaining violations are silenced out by appending a '## no critic'
to the offending lines. They can still be seen by using the --force
option of perlcritic
This patch also modify t/00-testcritic.t to check all Perl files using
the new .perlcriticrc.
I'm not sure if this test script is still useful as it is now equivalent
to `perlcritic --quiet .` and it looks like it is much slower
(approximatively 5 times slower on my machine)

Test plan:
1. Run `perlcritic --quiet .` from the root directory. It should output
   nothing
2. Run `perlcritic --quiet --force .`. It should output 7 errors (6
   StringyEval, 1 BarewordFileHandles)
3. Run `TEST_QA=1 prove t/00-testcritic.t`
4. Read the patch. Check that all changes make sense and do not
   introduce undesired behaviour

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@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 b168f4a2e9a03ed56ce857353d4dde940980caba)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25322: fix for not selected "relationship" defaults to father
Petro Vashchuk [Wed, 17 Jun 2020 13:44:42 +0000]
Bug 25322: fix for not selected "relationship" defaults to father

When a user creates a patron's guarantor on /cgi-bin/koha/members/memberentry.pl but doesn't select the relationship from a dropdown, the relationship defaults to first value, which in default sysprefs is "father". This may or may not be correct as this is not a conscious choice from the user.

The solution is to make the "Relationship" field mandatory when there is no empty entry in the system preferences, always starting with an empty option but not allowing the user to save an empty entry.
And if there is an empty option in sysprefs, it allows to save empty, as well as makes it default choice.

To reproduce with default system preferences:
    1) Create a new patron who is assumed to have a guarantor or modify the existing one.
    2) Under "Guarantor Information" click on "Search to add" button. After performing the search, select a user to act as guarantor. Don't use the dropdown menu to select a relationship. Save your changes.
    3) Observe that relationship is set as "father".
    4) Apply the patch.
    5) Repeat steps 1 and 2.
    6) Observe that it doesn't allow you to save the form until you pick a relationship type.

To reproduce with empty entry added to system preferences:
    1) Add an empty entry to borrowerRelationship at /cgi-bin/koha/admin/preferences.pl?tab=patrons in Patron relationships section (example: "|father|mother").
    2) Create a new patron who is assumed to have a guarantor or modify the existing one.
    3) Under "Guarantor Information" click on "Search to add" button. After performing the search, select a user to act as guarantor. Don't use the dropdown menu to select a relationship. Save your changes.
    4) Observe that relationship is set as "father".
    5) Apply the patch.
    6) Repeat steps 1, 2 and 3.
    7) Observe when you save the empty entry it does set the relationship as empty.

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 029f41a667da8f054633432997bc818c1b26a27f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 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]
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>

3 years agoBug 25875: Unit test
Nick Clemens [Thu, 25 Jun 2020 10:38:16 +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>

3 years agoBug 25875: Move check for module_bit and code to the JOIN
Nick Clemens [Thu, 25 Jun 2020 10:38:26 +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>

3 years agoBug 25793: OAI 'Set' and 'Metadata' dropdowns broken by OPAC jQuery upgrade
Owen Leonard [Mon, 22 Jun 2020 23:57:29 +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>

3 years agoBug 25807: Add Template 3.008 to the exclude list
Martin Renvoize [Wed, 24 Jun 2020 10:34:32 +0000]
Bug 25807: Add Template 3.008 to the exclude list

This patch adds version 3.008 of Template to the excludes list in our
cpanfile. It also adds support for displaying this version on the about
page.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25491: Fix for "Use of uninitialized value" in InstallAuth.pm
Slava Shishkin [Wed, 13 May 2020 17:20:27 +0000]
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>

3 years agoBug 25858: Use bitwise OR for setting a bit in borrowers.flag
Julian Maurice [Fri, 26 Jun 2020 06:55:44 +0000]
Bug 25858: Use bitwise OR for setting a bit in borrowers.flag

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Thanks-to: Didier Gautheron <didier.gautheron@biblibre.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25858: (bug 25858 follow-up) Don't attempt to set flag if already set
Nick Clemens [Wed, 24 Jun 2020 10:06:57 +0000]
Bug 25858: (bug 25858 follow-up) Don't attempt to set flag if already set

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.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 e38634ceb8ae5d30d43055711b97395f580f0310)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25232: DBRev 20.05.01.002
Lucas Gass [Mon, 13 Jul 2020 15:41:05 +0000]
Bug 25232: DBRev 20.05.01.002

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25232: Add ability to specify multiple notforloan values to skip
Kyle M Hall [Thu, 7 May 2020 13:16:37 +0000]
Bug 25232: Add ability to specify multiple notforloan values to skip

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25232: Add ability to skip trapping items with a given notforloan value
Kyle M Hall [Tue, 21 Apr 2020 17:52:40 +0000]
Bug 25232: Add ability to skip trapping items with a given notforloan value

This is a companion/alternative to bug 25184, in that it allows an
explicit workflow for placing returned books into temporary storage for
a few days for decontamination purposes.

The idea here is to create a specific notforloan value for "In
Decontamination" or something along along those lines. This notforloan
value would never be trappable. At the end of decon,
UpdateNotForLoanStatusOnCheckin  could be used to remove the
notforloan status and allow checkins to be trapped to fill holds.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Give an item a negative notforloan value
4) Place a hold on the item
5) Check the item in
6) Note the item is trapped for hold
7) Set SkipHoldTrapOnNotForLoanValue to the same notforloan value
   you used in step 3
8) Check the item in again
9) Note Koha did not ask you to trap the item for hold!

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 24986: DBIC
Lucas Gass [Mon, 13 Jul 2020 15:29:31 +0000]
Bug 24986: DBIC

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 24986: DBRev 20.05.01.001
Lucas Gass [Mon, 13 Jul 2020 15:21:55 +0000]
Bug 24986: DBRev 20.05.01.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 24986: Modify some borrowers DB fields to (TINY|MEDIUM)TEXT
Jonathan Druart [Thu, 4 Jun 2020 10:12:23 +0000]
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>

3 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]
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>

3 years agoBug 25805: Regression tests
Tomas Cohen Arazi [Thu, 18 Jun 2020 19:54:42 +0000]
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>

3 years agoBug 4985: Fix Plack scope errors
Emmi Takkinen [Thu, 19 Mar 2020 07:12:19 +0000]
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>

3 years agoBug 4985: Edit a calendar entry for all branches
Emmi Takkinen [Fri, 7 Feb 2020 10:43:54 +0000]
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>

3 years agoBug 18911: (follow-up) We should save changes with a POST
Marcel de Rooy [Wed, 17 Jun 2020 11:50:26 +0000]
Bug 18911: (follow-up) We should save changes with a POST

Test plan:
Verify if changes to messaging table and language are still saved.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 18911: Add the ability to set the preferred lang for notice at the OPAC
Jonathan Druart [Wed, 17 Jun 2020 10:20:36 +0000]
Bug 18911: Add the ability to set the preferred lang for notice at the OPAC

Patron should be allowed to modify this setting without asking a staff
member.

The setting is not configurable and cannot be hidden via a syspref.

Test plan:
- Turn the pref TranslateNotices on
- Install some languages
- Edit your messaging settings at the OPAC
=> Notice the "Preferred language for notices" dropdown list
- Select one
=> Confirm that the value is saved in DB

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25097: Add option to message_queue to allow for only specific sending notices
Kyle M Hall [Thu, 9 Apr 2020 15:23:04 +0000]
Bug 25097: Add option to message_queue to allow for only specific sending notices

The message_queue.pl currently will send all the messages queued up.  It would be nice to have some control over which messages are to be sent.

Example: We have libraries who only wanted to send 'hold notices' but not overdue, advance notice, etc during the covid-19 quarantine.  And some that were the opposite - turn off hold notices, but send other generated notices.

Test Plan:
1) Apply this patch
2) Enqueue some messages with different letter codes
3) Run process_message_queue.pl with the new -c parameter using one of the letter codes enqueued
4) Note that only the messages with the selected code were processed!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 22807: Compile CSS
Lucas Gass [Fri, 10 Jul 2020 17:31:08 +0000]
Bug 22807: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 22807: (follow-up) Update style of skip button
Owen Leonard [Wed, 10 Jun 2020 18:30:50 +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>

3 years agoBug 22807: (follow-up) Add .maincontent class to libraries page
Owen Leonard [Wed, 10 Jun 2020 18:42:06 +0000]
Bug 22807: (follow-up) Add .maincontent class to libraries page

This patch adds a missing "maincontent" class to the "all libraries"
view. Previously it was only present on the single library view.

To test, apply the patch and go to the "Libraries" page in the OPAC.

 - Hit the "tab" key to highlight the "Skip to main content" link.
 - Hit "Enter."
 - The page should scroll to the top of the list of libraries.
 - Open one of the library detail pages and confirm that the "Skip to
   main content" link works on that page too.

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 78cfac8dd5d089960e7d34068415b8c7f0bd7775)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 22807: Ensure .maincontent appears on all pages
Martin Renvoize [Wed, 10 Jun 2020 15:56:40 +0000]
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>

3 years agoBug 22807: Ensure only one maincontent on searcresults
Martin Renvoize [Wed, 10 Jun 2020 12:57:42 +0000]
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>

3 years agoBug 22807: Add 'Skip to content' option
Martin Renvoize [Tue, 9 Jun 2020 13:10:53 +0000]
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>

3 years agoBug 25151: Fixing semantic headings in opac-basket.tt
Hayley Mapley [Wed, 10 Jun 2020 23:48:54 +0000]
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>

3 years agoBug 25154: Add heading where content is introduced in opac-results.tt
Martin Renvoize [Thu, 11 Jun 2020 12:23:32 +0000]
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>

3 years agoBug 25236: Compile CSS
Lucas Gass [Fri, 10 Jul 2020 17:05:31 +0000]
Bug 25236: Compile CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25236: Fix semantic heading for opac-full-serial-issues.tt
Martin Renvoize [Thu, 11 Jun 2020 10:54:22 +0000]
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>

3 years agoBug 25236: Fix semantic heading for opac-topissues.inc
Martin Renvoize [Thu, 11 Jun 2020 10:44:53 +0000]
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>

3 years agoBug 25236: Fix semantic heading for opac-facets.inc
Martin Renvoize [Thu, 11 Jun 2020 10:37:26 +0000]
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>

3 years agoBug 25238: Fix semantic heading for opac-details
Martin Renvoize [Thu, 11 Jun 2020 11:15:21 +0000]
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>

3 years agoBug 25239: Fix semantic heading for opac-reserve.tt
Martin Renvoize [Thu, 11 Jun 2020 12:05:31 +0000]
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>

3 years agoBug 25402: (QA follow-up) Remove unused downloadBasket function
Owen Leonard [Thu, 18 Jun 2020 11:31:40 +0000]
Bug 25402: (QA follow-up) Remove unused downloadBasket function

This patch removes the now-unused downloadBasket function from
basket.js. The patch should have no effect on the functionality of the
download process.

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 6d73c08e7351a772a388b1e1c6157b307fcbc1a8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25402: Put OPAC cart download options into dropdown menu
Owen Leonard [Wed, 6 May 2020 20:30:32 +0000]
Bug 25402: Put OPAC cart download options into dropdown menu

This patch modifies the process of downloading a cart so that it doesn't
involve a separate popup window.

To test, apply the patch and add some titles to the cart in the OPAC.

 - Open the cart
 - The "Download" button should now be a dropdown menu.
 - Selecting any of the download options should trigger a download
   prompt.
 - Test with and without some CSV profiles which have been configured
   for use in the OPAC

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 174ea44dccd8f0a151a82ba5f8c70e3194065539)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25471: Add DataTables to MARC subfield structure admin page
Owen Leonard [Tue, 12 May 2020 21:27:05 +0000]
Bug 25471: Add DataTables to MARC subfield structure admin page

This patch adds DataTables sorting and filtering to the table of
subfields shown on the MARC subfield structure administration page.

To test, apply the patch and go to Administration -> MARC bibliographic
framework.

 - From the 'Actions' menu, select 'MARC structure.'
 - From the 'Actions' menu, select the 'View subfields' link for a tag
   with multiple subfields.
 - On the page showing all the subfields for the tag, confirm that the
   table is sorted by default by subfield and that sorting works
   correctly.
 - Confirm that the search form at the top of the table works.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25699: Add edition information to "Holds to pull" report
Petro Vashchuk [Wed, 10 Jun 2020 12:36:01 +0000]
Bug 25699: Add edition information to "Holds to pull" report

Added a feature that displays edition information of the book
together with title in "Holds to pull" report.

Edition information is fetched from "biblioitem" table
as "editionstatement" and transferred to template.

Those changes don't have performance impact as all tables
including "biblioitem" were already used and joined in this request.

Mentored-by: Andrew Nugged <nugged@gmail.com>

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 2e14a0a3fa317191bf0ee735988a83b8f59d4ed5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25747: Don't display a comma when patron has no firstname
Owen Leonard [Mon, 15 Jun 2020 11:14:22 +0000]
Bug 25747: Don't display a comma when patron has no firstname

This patch adds a check for the existence of "firstname" to
patron-title.inc so that if the patron has no firstname the "invert
name" setting doesn't cause an unnecessary comma to appear.

To test, apply the patch and locate or create a patron with no first
name.

- When checking out to the patron, examine the page title. It should say
  "Checking out to <lastname> (<cardnumber>).
- When checking out to a patron with first and last name it should show
  as before, "Checking out to <lastname>, <firstname> (<cardnumber)

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25789: Don't allow past date as holds expiration date
Emmi Takkinen [Thu, 18 Jun 2020 06:36:55 +0000]
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>

3 years agoBug 25756: remove erroneous hyphen
Andreas Roussos [Mon, 15 Jun 2020 14:58:38 +0000]
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>

3 years agoBug 25611: Use selected vendor when creating a basket
Jonathan Druart [Fri, 5 Jun 2020 09:15:33 +0000]
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>

3 years agoBug 11994: (follow-up) Make things work when LibraryName is empty
Katrin Fischer [Fri, 1 May 2020 20:11:29 +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>

3 years agoBug 11994: OpenSearch plugins needs to be delivered with Content-Type application...
Katrin Fischer [Fri, 1 May 2020 17:20:43 +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>

3 years agoBug 11994: Fix OpenSearch discovery in the OPAC
Owen Leonard [Tue, 28 Apr 2020 14:41:47 +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>

3 years agoBug 24352: Correct location and collection labels in OPAC search results
Owen Leonard [Tue, 16 Jun 2020 19:48: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>

3 years agoBug 25189: Don't create authority if results found
Nick Clemens [Tue, 28 Apr 2020 15:34:20 +0000]
Bug 25189: Don't create authority if results found

Automatic authority creation assumes that if we don't match we need a new authority.

Using the Default linker, however, we don't match if there exists more than one match.
This leads to repeatedly generating authorities once there is a duplicate in the system

We shoudl instead only create a new authority if there are no results

To test:
1 - Set Linker Module to 'Default'
2 - Enable  AutoCreateAuthorities  and  BiblioAddsAuthorities and  CatalogModuleRelink and LinkerRelink
3 - Add two copies of a single authority via Z39
4 - Add a heading for that authority to a bib record
5 - Save the record and note a new authority is generated
6 - Repeat and see another is generated
7 - Apply patch
8 - Restart all the things
9 - Save the record again, no new authority created

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 980419ed15cd4e5ae8be552218f939f5faea18c4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25189: Unit tests
Nick Clemens [Tue, 28 Apr 2020 13:29:52 +0000]
Bug 25189: Unit tests

Adds new test for not adding authority if some already exist

Also replaces use of 'SearchAuthorities' as it is Zebra specific

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 258d0b0ecd6450fea09677f0607efdedb33cc16c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 25509: Remove useless libjs-jquery dependency
David Cook [Fri, 15 May 2020 04:55:49 +0000]
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>

3 years agoBug 25570: (follow-up) Fix tests
Tomas Cohen Arazi [Thu, 21 May 2020 21:25:46 +0000]
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>

3 years agoBug 25570: Paginate results by default in objects->search
Tomas Cohen Arazi [Thu, 21 May 2020 21:23:01 +0000]
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>

3 years agoBug 25570: Regression tests
Tomas Cohen Arazi [Thu, 21 May 2020 20:48:21 +0000]
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>

3 years agoBug 25804: Remove HTML from title tag of bibliographic detail page
Owen Leonard [Thu, 18 Jun 2020 11:56:38 +0000]
Bug 25804: Remove HTML from title tag of bibliographic detail page

This patch removes <span> tags from the bibliographic detail page's
<title> tag.

To test, apply the patch and view the bibliographic detail page for
any title in the staff interface. In the page title shown in the browser
tab you should see no <span> tags.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 12093: (QA follow-up) Fix typo 'noteforloan'
Katrin Fischer [Sun, 14 Jun 2020 12:02:49 +0000]
Bug 12093: (QA follow-up) Fix typo 'noteforloan'

Just changes one character in the noteforloan class to notforloan.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoBug 12093: Add CSS classes to item statuses in detail view
David Roberts [Sat, 9 May 2020 22:14:10 +0000]
Bug 12093: Add CSS classes to item statuses in detail view

This patch adds classes where necessary to detail.pl

To test:

1) Apply patch
2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there
are no orphaned statuses without classes.

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

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 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]
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>

3 years agoBug 25553: Make date columns sortable on the edit items table
Jonathan Druart [Fri, 22 May 2020 09:02:39 +0000]
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>

3 years agoBug 25447: Terminology: Fix button text "Edit biblio"
Owen Leonard [Mon, 11 May 2020 19:17:57 +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>

3 years agoRevert "Bug 25828: Update cpanfile for 20.05 release cycle"
Jonathan Druart [Wed, 24 Jun 2020 09:38:24 +0000]
Revert "Bug 25828: Update cpanfile for 20.05 release cycle"

This reverts commit 876a2316ace9d6409e03e6851d221dc999ca1d6f.

3 years agoUpdate release notes for 20.05.01 release v20.05.01
Jonathan Druart [Tue, 23 Jun 2020 14:37:49 +0000]
Update release notes for 20.05.01 release

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoIncrement version for 20.05.01 release
Jonathan Druart [Tue, 23 Jun 2020 14:31:32 +0000]
Increment version for 20.05.01 release

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoFixing po files for 20.05.01
Jonathan Druart [Tue, 23 Jun 2020 14:23:01 +0000]
Fixing po files for 20.05.01

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoTranslation updates for Koha 20.05.01
Koha translators [Tue, 23 Jun 2020 13:33:05 +0000]
Translation updates for Koha 20.05.01

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

3 years agoBug 25828: Update cpanfile for 20.05 release cycle
Mason James [Sat, 20 Jun 2020 03:03:25 +0000]
Bug 25828: Update cpanfile for 20.05 release cycle

to test...
 1/ check about.pl, see old module versions

 2/ apply patch

 3/ check about.pl, see updated module versions

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

3 years agoBug 25842: Fix typo streetype in member-main-address-style.inc
Fridolin Somers [Tue, 23 Jun 2020 07:25:33 +0000]
Bug 25842: Fix typo streetype in member-main-address-style.inc

There are several more instances of the incorrect variable "streetype" in member-main-address-style.inc. Must be corrected with DB column name "streettype" in order to be able to set this field as mandatory.

See also :
Bug 25839 - Typo patron.streetype in member-main-address-style.inc

Test plan :
1) Add "streettype" in system preference "BorrowerMandatoryField"
2) Create a new patron
3) Without patch "Street type" field is not mandatory/required, with
   patch it is
4) Remove "streettype" from system preference "BorrowerMandatoryField"
5) Create a new patron
6) Check "Street type" field is not mandatory/required
7) Select a value and save
8) Edit again patron
9) Check value is selected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

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

3 years agoBug 25839: Fix typo patron.streetype in member-main-address-style.inc
Fridolin Somers [Mon, 22 Jun 2020 09:58:56 +0000]
Bug 25839: Fix typo patron.streetype in member-main-address-style.inc

Typo in member-main-address-style.inc : patron.streetype > patron.streettype

Generates error :
Template process failed: undef error - The method Koha::Patron->streetype is not covered by tests!

Test plan : try create a new patron

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 0de7b6093e86410c022e252b554a5e6305c86480)

3 years agoBug 25774: Handle utf8 chars in REST API queries
Jonathan Druart [Wed, 17 Jun 2020 07:43:40 +0000]
Bug 25774: Handle utf8 chars in REST API queries

We must utf8 encode the string before json decoding it.

Test plan:
Use "❤" and play with the library search (bug 25288) and Postman to
generate queries using it.

This patch prevents 500:
[2020/06/16 14:11:37] [ERROR] GET /api/v1/libraries: unhandled exception (Mojo::Exception)<<Wide character in subroutine entry at /kohadevbox/koha/Koha/REST/Plugin/Objects.pm line 107.>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbox/koha/Koha/REST/Plugin/Exceptions.pm (73)

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

3 years agoBug 25702: Actions button on Search results from Z39.50 is displayed incorrectly
Owen Leonard [Fri, 12 Jun 2020 19:46:00 +0000]
Bug 25702: Actions button on Search results from Z39.50 is displayed incorrectly

This patch modifies, again, the way the actions popup is implemented in
Z39.50 search results, whether it be in cataloging, authorities, or
acquisitions. The solution for Bug 25282 changed some markup which was
being referred to in JavaScript. This patch makes the markup more
consistent and unifies handling of the menu in one JavaScript file.

The solution changes the way a menu is generated when the user clicks
within the row of Z39.50 search results (not on the "Actions" button).
The script now creates a clone of the actions menu in that row and
appends it to the <td> the user clicked on.

To test, apply the patch and clear your browser cache if necessary. Test
these three areas in the same way:

1. Cataloging -> New from Z39.50 -> Search
2. Authorities -> New from Z39.50 -> Search
3. Acquisitions -> Vendor -> Add to Basket -> From an external source ->
Search.

In each case, test the functionality of the "Actions" menu button in the
last column ("Preview" in Acquisitions search results). The menu
should be positioned correctly and menu choice works correctly

Click anywhere else in the search results table. The same actions menu
should be triggered in that table cell. Confirm that these menu items
work correctly according to the row which was clicked.

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 84230fcd798805c38c9ff16312121011cd0dc782)

3 years agoBug 25786: AddReserve now takes a hashref
Jonathan Druart [Thu, 18 Jun 2020 13:13:25 +0000]
Bug 25786: AddReserve now takes a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

3 years agoBug 25786: Holds Queue building may target the wrong item for item level requests...
Kyle M Hall [Wed, 17 Jun 2020 16:53:36 +0000]
Bug 25786: Holds Queue building may target the wrong item for item level requests that match holds queue priority

Bug 23934 removed the limitation that prevented item level holds from
getting local holds priority. The problem is the code has never checked
if the item level hold matches the given item! This means the wrong item
may be requested to fill an item level hold.

Test Plan:
1) Create 3 items on a record
2) Place a hold for the 2nd item you created
4) Ensure that hold would be picked up by local holds priority
5) Build the holds queue
6) Note the holds queue is asking for the wrong item!
7) Apply this patch
8) Rebuild the holds queue
9) Holds queue should now be asking for the correct item!

Signed-off-by: Kim Peine <kim@williston.lib.vt.us>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

3 years agoBug 25783: Holds Queue treating item-level holds as bib-level
Kyle M Hall [Wed, 17 Jun 2020 15:41:21 +0000]
Bug 25783: Holds Queue treating item-level holds as bib-level

The holds queue builder does not honor
the new item_level_hold flag. Instead, it only item_level_request if
in the loop dealing with item level holds. This is incorrect. Item level
holds may be trapped in the local holds priority loop as well. It's
trivial to just pass though the correct item/biblio level hold flag.

I do not know how to write a reproducable test plan for these issues.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kim Peine <kim@williston.lib.vt.us>

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

3 years agoBug 25783: Regression tests
Tomas Cohen Arazi [Wed, 17 Jun 2020 20:18:12 +0000]
Bug 25783: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kim Peine <kim@williston.lib.vt.us>

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

3 years agoRevert "Bug 12093: Add CSS classes to item statuses in detail view"
Lucas Gass [Thu, 18 Jun 2020 13:03:10 +0000]
Revert "Bug 12093: Add CSS classes to item statuses in detail view"

This reverts commit 4d50a8d1214ec9dfb1fbd1fcdeed5adee14e8d15.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

3 years agoRevert "Bug 12093: (QA follow-up) Fix typo 'noteforloan'"
Lucas Gass [Thu, 18 Jun 2020 13:02:53 +0000]
Revert "Bug 12093: (QA follow-up) Fix typo 'noteforloan'"

This reverts commit 47a28d356a0aff374ba01256093d1da6dad4419e.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>