koha.git
2 years agoBug 30405: Reduce font-size for address in patron search result
Jonathan Druart [Fri, 8 Apr 2022 08:22:05 +0000 (10:22 +0200)]
Bug 30405: Reduce font-size for address in patron search result

The address has a font-size: 110%, it's not needed here, 100% is enough.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29155: (follow-up) Work around change to jQueryUI tab API
Owen Leonard [Fri, 15 Apr 2022 11:45:08 +0000 (11:45 +0000)]
Bug 29155: (follow-up) Work around change to jQueryUI tab API

For some reason, with the combination of jQuery 3.6.0 and jQueryUI
1.13.1, the way to access the current active tab's link has changed.
Previously the tab activate event would provide information about the
link as "ui.newTab.context." It appears that "context" is no longer
available.

This patch updates the two instances in Koha where this process is
broken.

To test, apply the patch and check out to a patron with holds on their
account.

- When the checkout page loads, confirm that each tab loads its contents
  correctly when clicked.
- Check that the correct tab is activated when you append the tab link
  to the page url, e.g.

  /cgi-bin/koha/circ/circulation.pl?borrowernumber=XXX#reldebarments

  ...which should select the "Restrictions" tab for you. You may need to
  try this in a new tab or shift-reload to get the browser to look for
  the hash.

- Perform the same tests on the patron details page.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29155: Update links to jQuery and jQuery Migrate files
Owen Leonard [Thu, 3 Feb 2022 17:38:44 +0000 (17:38 +0000)]
Bug 29155: Update links to jQuery and jQuery Migrate files

With these patches, jQuery versions in the OPAC and staff interface are
both updated to 3.6.0. The latest version of jQuery Migrate is installed
to allow us to take a slower approach to updating out-of-date syntax.

To test, apply the patch and try as many pages as you can, paying
attention to the browser console to watch for errors.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29155: Upgrade jQuery and jQuery Migrate to latest versions
Owen Leonard [Thu, 3 Feb 2022 17:33:17 +0000 (17:33 +0000)]
Bug 29155: Upgrade jQuery and jQuery Migrate to latest versions

jQuery is upgraded from 2.2.3 to 3.6.0.
jQuery Migrate is upgraded from 1.3.0 to 3.3.2.

The next patch will update links to point to the new assets.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30584: Fix ES mapping creation
Jonathan Druart [Thu, 21 Apr 2022 17:23:14 +0000 (19:23 +0200)]
Bug 30584: Fix ES mapping creation

We need to tell DT that we are adding/removing row, not only deal
manually with the DOM.

This patch also fixes the following bug: if you add or remove a row from
the "biblio" tab, then go to another tab and back to "biblio", all
changes were gone (bug existed prior to bug 29893).

Test plan:
Add, edit and remove mappings, switch from tabs and save.
Use the filters, save (29893 regression test)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30461: Fix BatchUpdateAuthority
Jonathan Druart [Wed, 6 Apr 2022 09:35:41 +0000 (11:35 +0200)]
Bug 30461: Fix BatchUpdateAuthority

Use of inherited AUTOLOAD for non-method Koha::BackgroundJob::BatchUpdateAuthority::ModAuthority() is
no longer allowed

Test plan:
Use the batch authority tools to edit authority record and confirm that
the task processes correctly

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30288: (follow-up) Use CSS for separator pipes
Aleisha Amohia [Thu, 21 Apr 2022 02:09:23 +0000 (02:09 +0000)]
Bug 30288: (follow-up) Use CSS for separator pipes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28840: (QA follow-up) Update id to ID
Katrin Fischer [Sun, 24 Apr 2022 12:29:26 +0000 (14:29 +0200)]
Bug 28840: (QA follow-up) Update id to ID

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28840: Better texts in batch record modification/deletion
Fridolin Somers [Tue, 10 Aug 2021 22:03:58 +0000 (12:03 -1000)]
Bug 28840: Better texts in batch record modification/deletion

Tools batch record modification/deletion form contains texts in legends, labels, hints.

I feel like :
Labels are sometimes too long, showing them on multi-lines, like "Modify record using the following template". Long texts should be in legend or hint.
Legend are sometimes contains redundant text, like in tabs.
Also I propose to use "record id" instead of "record number".

Test plan :
Compare texts in page without and with patch

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed...
Nick Clemens [Wed, 25 Aug 2021 15:26:23 +0000 (15:26 +0000)]
Bug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed AV at once

This patch updates the searchResuls code to pass through the pre-constructed branches and itemtype lookups
to XSLTParse4Display to avoid repeating this

It also updates getAuthorisedValues4MARCSubfields to fetch the values for mapped subfields and pass
then through to transforMarc4XSLT

Note that we currently blank invalid branches and itemtypes - I presrve this, we should open another bug
if we want to change this behaviour

Changes are covered by tests

To test:
1 - Perform searches in OPAC and staff client that return many records
2 - Use the 'Network' tab on the browser console (opened with F12 usually) to see the time taken
3 - Note the speed before the patch
4 - Apply patch
5 - restart all the things
6 - Note improvement in speed

**Note: The improvement is more drastic the more items per record, try adding large numbers of items to your search results to test**

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28371: Unit tests
Nick Clemens [Wed, 25 Aug 2021 15:25:56 +0000 (15:25 +0000)]
Bug 28371: Unit tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27253: (follow-up) Fix UNIXTIME(0) in db_revs/211200037.pl
Marcel de Rooy [Mon, 25 Apr 2022 10:29:05 +0000 (10:29 +0000)]
Bug 27253: (follow-up) Fix UNIXTIME(0) in db_revs/211200037.pl

MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(0) ) where borrowernumber=51;
ERROR 1292 (22007): Incorrect datetime value: '1970-01-01 00:00:00' for column `koha_myclone`.`borrowers`.`updated_on` at row 1

MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(1) ) where borrowernumber=51;
Query OK, 1 row affected (0.008 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by switching updated_on to datetime. Remove NOT NULL, etc.
Copied dbrev to atomicupdate folder.
Resulted in:
    Updated all NULL values of borrowers.updated_on to GREATEST(date_renewed, dateenrolled, lastseen): 51 rows updated

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Fix xt/find-license-problems.t
Jonathan Druart [Fri, 22 Apr 2022 10:02:40 +0000 (12:02 +0200)]
Bug 30373: Fix xt/find-license-problems.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Fix unimarc authorised values
Jonathan Druart [Fri, 22 Apr 2022 08:18:08 +0000 (10:18 +0200)]
Bug 30373: Fix unimarc authorised values

1. Replace
  authorised_value: ""
with
  authorised_value:
to match what is done for marc21

2. Fix some wrong category names
-          authorised_value: 146a
+          authorised_value: unimarc_146a

-          authorised_value: 182a
+          authorised_value: unimarc_182a

-          authorised_value: 182c
+          authorised_value: unimarc_182c

3. Remove some category that have not been inserted (should we insert
them then?)
-          authorised_value: 183a
+          authorised_value:

-          authorised_value: qualif
+          authorised_value:

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 30373: (follow-up) Fix license"
Fridolin Somers [Fri, 22 Apr 2022 18:46:48 +0000 (08:46 -1000)]
Revert "Bug 30373: (follow-up) Fix license"

This reverts commit 15405829bffec99e82a23f221fa4a75ada2f0ac5.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30595: Prevent update_child_to_adult.t to fail randomly
Jonathan Druart [Fri, 22 Apr 2022 09:42:09 +0000 (11:42 +0200)]
Bug 30595: Prevent update_child_to_adult.t to fail randomly

t/db_dependent/selenium/update_child_to_adult.t ..         # Looks like you planned 3 tests but ran 2.

    #   Failed test 'Update child to adult'
    #   at t/db_dependent/selenium/update_child_to_adult.t line 132.
    # Looks like you planned 3 tests but ran 2.
    # Looks like you failed 1 test of 2 run.
t/db_dependent/selenium/update_child_to_adult.t .. 1/1
 #   Failed test 'Update child to patron'
 #   at t/db_dependent/selenium/update_child_to_adult.t line 153.
Cannot wait more for element '//input[@type="submit"]' to be visible at /kohadevbox/koha/t/lib/Selenium.pm line 189.

It happens when there are too many patron's categories and the submit
button is not in the viewport.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Fix 2FA selenium tests
Jonathan Druart [Fri, 22 Apr 2022 08:54:42 +0000 (10:54 +0200)]
Bug 28786: Fix 2FA selenium tests

Looks like there was a bad rebase at some point.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 years agoBug 30446: (follow-up) Remove warning
Tomas Cohen Arazi [Wed, 20 Apr 2022 12:17:03 +0000 (09:17 -0300)]
Bug 30446: (follow-up) Remove warning

This patch removes a trivial warning caused by a parameter being
compared to a literal but not being defined. Doing a

$ git grep GetTagsLabels

shows the change is safe as the function is always called with a value
of either 0 or 1.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30446: Add a test for GetTagsLabels
Marcel de Rooy [Mon, 4 Apr 2022 11:50:01 +0000 (11:50 +0000)]
Bug 30446: Add a test for GetTagsLabels

Moved from obsoleted bug 2222 on its own.

Test plan:
Run t/db_dependent/AuthoritiesMarc_GetTagsLabels.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27253: DBRev 21.12.00.037
Fridolin Somers [Fri, 22 Apr 2022 06:07:39 +0000 (20:07 -1000)]
Bug 27253: DBRev 21.12.00.037

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27253: Fix definition of updated_on in borrowers and deletedborrowers
Julian Maurice [Thu, 31 Mar 2022 13:38:07 +0000 (15:38 +0200)]
Bug 27253: Fix definition of updated_on in borrowers and deletedborrowers

Test plan:
1. First you have to be in a state where updated_on is NULL-able. You
   can do that by either:
   a) do a fresh install of Koha 16.05 and update to master, or
   b) execute the following SQL queries:

     ALTER TABLE borrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'

     ALTER TABLE deletedborrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'
2. Create two borrowers (let's name them X and Y)
3. Delete borrower Y
4. Set the column updated_on to NULL for both borrowers by executing the
   following SQL query:
   UPDATE borrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of X>
   UPDATE deletedborrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of Y>
5. Apply patch and run updatedatabase
6. Verify that borrowers.updated_on and deletedborrowers.updated_on are
   not NULL-able.
   Verify that updated_on for X and Y have taken the value of
   dateenrolled.
7. Repeat step 2 to 6 but this time renew the patron and/or log in with
   its account in order to set the columns borrowers.date_renewed and
   borrowers.lastseen before executing updatedatabase
   borrowers.updated_on should take the greatest value among
   dateenrolled, date_renewed, and lastseen

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30531: Add mock of UseRecalls to Search.t
Nick Clemens [Thu, 14 Apr 2022 11:24:48 +0000 (11:24 +0000)]
Bug 30531: Add mock of UseRecalls to Search.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30512: Staff interface search results template error
Owen Leonard [Tue, 12 Apr 2022 11:56:43 +0000 (11:56 +0000)]
Bug 30512: Staff interface search results template error

This patch removes some markup from the search results template which
was causing markup to be output on the screen. Rather than correct the
markup so that the "p1" class is correctly added to the relevant links
I'm removing it. The "p1" class isn't used anywhere.

The patch also corrects two incorrect template filters on one of the
page's links.

To test, apply the patch and enable the following system preferences:

- AmazonCoverImages
- IntranetCoce (if available)
- LocalCoverImages

- Perform a catalog search in the staff interface which will return
  results with cover images from each of the enabled services.
- The covers should show correctly in the search results with no markup
  being output on screen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Fix license
Fridolin Somers [Fri, 22 Apr 2022 05:58:57 +0000 (19:58 -1000)]
Bug 30373: (follow-up) Fix license

Copy from MARC21 files

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30583: Fix hold system for translated templates
Jonathan Druart [Thu, 21 Apr 2022 14:30:24 +0000 (16:30 +0200)]
Bug 30583: Fix hold system for translated templates

There are missing quotes, and the translate script is messing up with
the generated template.

Error is:
Template process failed: file error - parse error - holds_table.inc line 216-217: unexpected token (hold)

The generated line, without this patch is:
216 <td><input %]="%]" class="printholdslip" data-reserve_id="[%" hold.reserve_id="hold.reserve_id" html="html" name="printholdslip" type="button" value="Recibo" |="|"></td>
With this patch applied:
216  <td><input class="printholdslip" data-reserve_id="[% hold.reserve_id | html %]" name="printholdslip" type="button" value="Recibo"></td>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30532: (bug 29957 follow-up) Fix '$cookie->value'
Jonathan Druart [Thu, 21 Apr 2022 13:05:24 +0000 (15:05 +0200)]
Bug 30532: (bug 29957 follow-up) Fix '$cookie->value'

We got
 Can't call method "value" on unblessed reference at /kohadevbox/koha/opac/opac-messaging.pl line 86

$cookie can be an arrayref, we should retrieve the session id using
CGI->cookie('CGISESSID')

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30525: Items batch modification broken
Owen Leonard [Wed, 13 Apr 2022 14:07:53 +0000 (14:07 +0000)]
Bug 30525: Items batch modification broken

This patch modifies instances in the code which try to get cookies
using:

my %cookies = parse CGI::Cookie($cookie);

In some cases the relevant lines can be removed because they are unused.
In others it can be replaced with:

my %cookies = CGI::Cookie->fetch();

To test, apply the patch and restart_all. Test the following pages to
confirm they load without errors:

- Circulation -> Offline circulation file upload
- Circulation -> Offline circulation -> Add to queue

- Tools -> Batch item modification
- Tools -> Stage MARC for import
- Tools -> Staged MARC management
- Tools -> Batch patron modification
- Tools -> Upload local cover image

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Fix visibility, authorised values and descriptions
Bernardo Gonzalez Kriegel [Fri, 8 Apr 2022 20:51:02 +0000 (17:51 -0300)]
Bug 30373: Fix visibility, authorised values and descriptions

This patch fixes certain values of default bibliographic
framework.

It fixes hidden values using as reference default framework
from biblibre demo site.

Also adds some missing subfields, authorised values and
fixes capitalization on some descriptions.

To test:
1) On biblibre demo site, run a report
   SELECT tagfield,tagsubfield,hidden
   FROM marc_subfield_structure
   WHERE frameworkcode = ''
   ORDER BY tagfield,tagsubfield;
2) Download as tab separated values, ej. biblibre-hidden.txt
3) Apply the patch, remove bib frameworks, load YAML file
4) Run something like this to check correct hidden values

   while read -r -a l; do
    t="${l[0]}";
    s="${l[1]}";
    h="${l[2]}";
    b=$( mysql koha -N -B -e "select hidden from marc_subfield_structure where frameworkcode = '' and tagfield = '$t' and tagsubfield = '$s'");
    [ -n "$b" -a "$b" != "$h" ] && echo "$t:$s: -> change $b to $h";
   done < <( cat biblibre-hidden.txt )

   there must be no output

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Add TYPEDOC authorised_values_category
Bernardo Gonzalez Kriegel [Fri, 8 Apr 2022 21:18:00 +0000 (18:18 -0300)]
Bug 30373: Add TYPEDOC authorised_values_category

TYPEDOC authorised value category is needed to permit
correct loading of default UNIMARC bibliographic framework.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Show 325$a
Jonathan Druart [Thu, 7 Apr 2022 08:48:48 +0000 (10:48 +0200)]
Bug 30373: Show 325$a

It was not hidden in unimarc_complet/Obligatoire/framework_DEFAULT.sql

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Hide items.dateaccessioned from the editor
Jonathan Druart [Thu, 7 Apr 2022 08:46:35 +0000 (10:46 +0200)]
Bug 30373: Hide items.dateaccessioned from the editor

-6 was used in unimarc_complet/Obligatoire/framework_DEFAULT.sql

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30477: Add new UNIMARC installer translation files
Bernardo Gonzalez Kriegel [Wed, 6 Apr 2022 19:46:21 +0000 (16:46 -0300)]
Bug 30477: Add new UNIMARC installer translation files

Depends on Bug 30373

This patch adds *-installer-UNIMARC.po translation files.

For fr, it, uk and ru languages matching strings have been
extracted from master (fr-FR) or 21.05 (it,ru,uk) UNIMARC SQL
files. The mentioned languages shows some level of completion:

    fr-FR 76%
    ru-RU 61%
    it-IT 55%
    uk-UA 54%

To test:
1) Apply the patch
2) Verify new files are present
   misc/translator/po/*-installer-UNIMARC.po
3) Verify fr-FR, it-IT, ru-RU and uk-UA files
   have translated strings (inspect the files or use poedit)
4) Install any of those languages, ej.

     misc/translator/translate install fr-FR

   then do a clean UNIMARC install and verify that
   authority and bibliographic frameworks shows translated
   strings.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Enable translation of UNIMARC frameworks
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 03:50:01 +0000 (00:50 -0300)]
Bug 30373: Enable translation of UNIMARC frameworks

This patch adds a new translation file, *-installer-UNIMARC.po

To test:
1. On top of all previous patches
2. Apply this patch
3. Create (or update) some language
Ej.
    misc/translation/translate create xx-YY

    verify new file misc/translation/po/xx-YY-installer-UNIMARC.po
4. Install new language
    misc/translation/translate install xx-YY

    verify new dirs:
        installer/data/mysql/xx-YY/marcflavour/unimarc/{mandatory,optional}

5. Repeat install procedure selecting xx-YY language and UNIMARC
   verify all frameworks are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Rewrite authorities_normal_unimarc to YAML
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 04:36:38 +0000 (01:36 -0300)]
Bug 30373: Rewrite authorities_normal_unimarc to YAML

YAML version of authorities_normal_unimarc + sample auth types
Includes

This files works like it's marc21 counterpart:
* Defines an authority default framework
* Creates sample auth types by copy

Auth type codes and select fields/subfields are based on
french files in fr-FR install directory.

To test:
1. Apply this patch
2. Repeat UNIMARC install procedure as previous patches
3. Verify authorities_normal_unimarc.yml is loaded without problem
4. In the staff interface verify all auth types are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Add UNIMARC FA (fast add) framework
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 04:27:11 +0000 (01:27 -0300)]
Bug 30373: Add UNIMARC FA (fast add) framework

This parch creates optional folder and a sample
fast add framework

To test:
0. On top of first patch, repeat procedure to do an UNIMARC install
1. Verify existence of FA framework

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: Rewrite unimarc_framework_DEFAULT to YAML
Bernardo Gonzalez Kriegel [Mon, 28 Mar 2022 04:07:34 +0000 (01:07 -0300)]
Bug 30373: Rewrite unimarc_framework_DEFAULT to YAML

YAML version of unimarc_framework_DEFAULT + ACQ framework

To test:
0. Apply this patch, recreate database and restart_all
1. Follow web installer, selecting UNIMARC, finish
2. Default UNIMARC framework must load without problem
3. In staff interface check existence of Default and ACQ frameworks

ACQ is buit in the thame way as marc21, by copome fields/subfields.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Fix Patrons/Import.t
Jonathan Druart [Thu, 21 Apr 2022 11:51:11 +0000 (13:51 +0200)]
Bug 28786: Fix Patrons/Import.t

DBI Exception: DBD::mysql::st execute failed: Data truncated for column 'auth_method' at row 1 at /kohadevbox/koha/Koha/Object.pm line 170

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Don't set auth_method to NULL in ->anonymize
Jonathan Druart [Thu, 21 Apr 2022 09:41:55 +0000 (11:41 +0200)]
Bug 28786: Don't set auth_method to NULL in ->anonymize

DBI Exception: DBD::mysql::st execute failed: Column 'auth_method' cannot be null

caught by t/db_dependent/Koha/Patrons.t

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2 years agoBug 28786: decrease Auth::GoogleAuth version to 1.02
Mason James [Thu, 21 Apr 2022 07:21:27 +0000 (19:21 +1200)]
Bug 28786: decrease Auth::GoogleAuth version to 1.02

https://bugs.koha-community.org/show_bug.cgi?id=28786
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: add Auth::GoogleAuth module to cpanfile
Mason James [Thu, 21 Apr 2022 04:20:26 +0000 (16:20 +1200)]
Bug 28786: add Auth::GoogleAuth module to cpanfile

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: DBRev 21.12.00.036
Fridolin Somers [Wed, 20 Apr 2022 19:14:40 +0000 (09:14 -1000)]
Bug 28786: DBRev 21.12.00.036

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: (follow-up) Improve style of 2FA code input
Owen Leonard [Tue, 12 Apr 2022 16:32:20 +0000 (16:32 +0000)]
Bug 28786: (follow-up) Improve style of 2FA code input

This patch cleans up login.css a little bit so that the same style rules
which apply to the login screen apply to the 2FA input form as well.

The patch also changes the "Log out" link on the 2FA form to a "Cancel"
link alongside the "Verify" button.

To test, apply the patch and start the process of logging in to the
staff client using an account with 2FA enabled.

On both the login form and 2FA code views, confirm that everything is
styled consistently.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: DBIC schema changes
Jonathan Druart [Thu, 24 Mar 2022 13:25:43 +0000 (14:25 +0100)]
Bug 28786: DBIC schema changes

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Don't expose secret and auth_method to the REST API
Jonathan Druart [Thu, 20 Jan 2022 14:47:11 +0000 (15:47 +0100)]
Bug 28786: Don't expose secret and auth_method to the REST API

This can be done later if needed.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: (QA follow-up) Check the returned CSRF token
Marcel de Rooy [Tue, 18 Jan 2022 12:45:17 +0000 (12:45 +0000)]
Bug 28786: (QA follow-up) Check the returned CSRF token

We're doing this in the registering stage and at disabling.

Test plan:
Ënable two-factor auth but logout/login on another tab. You should
get the Wrong CSRF token when submitting.
Do similar thing while disabling.
Verify that you can register / disable when in the same session.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: (QA follow-up) Do not call generate_secret32
Marcel de Rooy [Mon, 17 Jan 2022 12:53:46 +0000 (12:53 +0000)]
Bug 28786: (QA follow-up) Do not call generate_secret32

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: (QA follow-up) Fix qa warnings
Marcel de Rooy [Thu, 13 Jan 2022 07:52:33 +0000 (07:52 +0000)]
Bug 28786: (QA follow-up) Fix qa warnings

 FAIL   members/two_factor_auth.pl
   FAIL   file permissions
                File must have the exec flag
 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt
   FAIL   filters
                missing_filter at line 42 (                        <p>Account: [% issuer %]</p>)
                missing_filter at line 43 (                        <p>Key: [% key_id %]</p>)
                missing_filter at line 54 (                            <input type="hidden" name="secret32" value="[% secret32 %]" />)
                missing_filter at line 58 (                                    <img id="qr_code" src="[% qr_code_url %]" />)
 FAIL   Koha/Auth/TwoFactorAuth.pm
   FAIL   pod coverage
                POD is missing for 'new'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: (QA follow-up) Upgrade atomicupdate to new style
Marcel de Rooy [Tue, 21 Dec 2021 15:07:56 +0000 (15:07 +0000)]
Bug 28786: (QA follow-up) Upgrade atomicupdate to new style

Test plan:
Run dbrev again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Add tests for checkauth
Jonathan Druart [Mon, 13 Sep 2021 21:19:24 +0000 (23:19 +0200)]
Bug 28786: Add tests for checkauth

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Correctly inherit from Auth::GoogleAuth
Jonathan Druart [Mon, 13 Sep 2021 21:13:44 +0000 (23:13 +0200)]
Bug 28786: Correctly inherit from Auth::GoogleAuth

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Improve readability in C4::Auth::checkauth
Jonathan Druart [Fri, 30 Jul 2021 10:36:46 +0000 (12:36 +0200)]
Bug 28786: Improve readability in C4::Auth::checkauth

Sponsored-by: Orex Digital
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Two-factor authentication for staff client - TOTP
Jonathan Druart [Thu, 29 Jul 2021 14:08:25 +0000 (16:08 +0200)]
Bug 28786: Two-factor authentication for staff client - TOTP

This patchset introduces the Two-factor authentication (2FA) idea in
Koha.

It is far for complete, and only implement one way of doing it, but at
least it's a first step.
The idea here is to offer the librarian user the ability to
enable/disable 2FA when logging in to Koha.

It will use time-based, one-time passwords (TOTP) as the second factor,
an application to handle that will be required.

https://en.wikipedia.org/wiki/Time-based_One-Time_Password

More developements are possible on top of this:
* Send a notice (sms or email) with the code
* Force 2FA for librarians
* Implementation for OPAC
* WebAuthn, FIDO2, etc. - https://fidoalliance.org/category/intro-fido/

Test plan:
 0.
  a. % apt install -y libauth-googleauth-perl && updatedatabase && restart_all
  b. To test this you will need an app to generate the TOTP token, you can
 use FreeOTP that is open source and easy to use.
 1. Turn on TwoFactorAuthentication
 2. Go to your account, click 'More' > 'Manage Two-Factor authentication'
 3. Click Enable, scan the QR code with the app, insert the pin code and
 register
 4. Your account now requires 2FA to login!
 5. Notice that you can browse until you logout
 6. Logout
 7. Enter the credential and the pincode provided by the app
 8. Logout
 9. Enter the credential, no pincode
10. Confirm that you are stuck on the second auth form (ie. you cannot
access other Koha pages)
11. Click logout => First login form
12. Enter the credential and the pincode provided by the app

Sponsored-by: Orex Digital
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Add controller script and template
Jonathan Druart [Thu, 29 Jul 2021 13:25:18 +0000 (15:25 +0200)]
Bug 28786: Add controller script and template

Sponsored-by: Orex Digital
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Add new DB column borrowers.auth_method
Jonathan Druart [Thu, 29 Jul 2021 13:40:07 +0000 (15:40 +0200)]
Bug 28786: Add new DB column borrowers.auth_method

Sponsored-by: Orex Digital
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Add new DB column borrowers.secret
Jonathan Druart [Thu, 29 Jul 2021 13:12:49 +0000 (15:12 +0200)]
Bug 28786: Add new DB column borrowers.secret

Sponsored-by: Orex Digital
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28786: Add new syspref TwoFactorAuthentication
Jonathan Druart [Wed, 28 Jul 2021 18:49:55 +0000 (20:49 +0200)]
Bug 28786: Add new syspref TwoFactorAuthentication

Sponsored-by: Orex Digital
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30204: Add subtitle to serial search results
Lucas Gass [Tue, 1 Mar 2022 16:11:40 +0000 (16:11 +0000)]
Bug 30204: Add subtitle to serial search results

To test:
1. Make some new serial subscriptions and connect them to biblios that contain subtitles.
2. Do a serial search that will return your newly created subscription.
3. Notice the subtitle doesn't appear.
4. Apply patch and restart_all
5. Again try step 2.
6. Notice the subtitle appears alongside the title now.
7. Make sure it still sorts that column correctly.

Signed-off-by: shiyao <shiyao@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30204: Add unit test
Kyle M Hall [Tue, 5 Apr 2022 16:54:37 +0000 (12:54 -0400)]
Bug 30204: Add unit test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30205: Add subtitle to subscription detail page
Lucas Gass [Tue, 1 Mar 2022 16:30:04 +0000 (16:30 +0000)]
Bug 30205: Add subtitle to subscription detail page

To test:
1. Make some new serial subscriptions and connect them to biblios that contain subtitles.
2. Do a serial search that will return your newly created subscription.
3. Click on one of those subscription to be taken to the subscription detail page.
4. Look at the main heading (h1) and the "Biblio:" line. Notice there is no subtitle in either place
5. Apply patch, restart_all, and reload the subscription detail page.
6. You should now see the subtitle on both the main heading (h1) and on the 'Biblio:' line.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30346: Correctly transfer values when editing rules
Lucas Gass [Mon, 11 Apr 2022 19:35:14 +0000 (19:35 +0000)]
Bug 30346: Correctly transfer values when editing rules

To test:
--Create a circulation rule with a value in "Overdue fines cap (amount), or edit an existing rule to add it
-Save the new (or edited) rule.
-Edit the same rule again to change any other field. Note that "Overdue fines cap (amount)" is now blank
-Save your edited rule - "Overdue fines cap (amount)" will save as blank.

Apply patch

--Create a circ rule with a value in Overdue fines cap (amount) and check "Cap fine at replacement price" for that same rule.
-Save the rule
-Try ediding the rule and make sure both of those values now save correctly.
-Add several more rules and try playing with both "Cap fine at replacement price" and "Overdue fines cap (amount)". Make sure everything saves right.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 18392: Add noExport of rows and don't export 'edit' row
Nick Clemens [Wed, 13 Apr 2022 19:42:06 +0000 (19:42 +0000)]
Bug 18392: Add noExport of rows and don't export 'edit' row

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 18392: use KohaTable for circ rules to allow export of matrix
Nick Clemens [Wed, 13 Apr 2022 19:10:43 +0000 (19:10 +0000)]
Bug 18392: use KohaTable for circ rules to allow export of matrix

To test:
1 - Define some circ rules
2 - View them, note the appearance
3 - Apply patch
4 - Reload and note change of header
5 - Use the new button to export, try various formats
6 - Test the filter and export

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30288: Provide links to OPACUserJS and OPACUserCSS in tools
Owen Leonard [Tue, 15 Mar 2022 10:41:57 +0000 (10:41 +0000)]
Bug 30288: Provide links to OPACUserJS and OPACUserCSS in tools

This patch provides easy access to the OPACUserJS and OPACUserCSS
system  preferences in the Additional Contents (News and HTML
customisations) sections.

To test:

1. In the staff client, go to Tools -> News. Notice there is a button to
   add a New entry. Confirm this button is also there when you go to
   Tools -> HTML customisations.
2. Apply the patch and refresh the page.
3. Confirm there are now two new buttons to take you to OPACUserJS and
   OPACUserCSS. Confirm these buttons take you to the correct system
   preference.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Bug 30288: (follow-up) Add permissions check

This follow-up wraps the system preference links in a check for
"parameters_manage_sysprefs" permission so that the links don't display
to those without permission to access system preferences.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30226: DBRev 21.12.00.035
Fridolin Somers [Thu, 21 Apr 2022 00:58:42 +0000 (14:58 -1000)]
Bug 30226: DBRev 21.12.00.035

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30226: (follow-up) Remove text from database update
Fridolin Somers [Thu, 21 Apr 2022 00:56:16 +0000 (14:56 -1000)]
Bug 30226: (follow-up) Remove text from database update

The text displayed by database update is not really helpful.
And it will be incorrect if update is run several times.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30226: (QA follow-up) Sync atomicupdate with sysprefs.sql
Marcel de Rooy [Fri, 15 Apr 2022 09:43:26 +0000 (09:43 +0000)]
Bug 30226: (QA follow-up) Sync atomicupdate with sysprefs.sql

Description and remove choices.
Set items => flag items (as in circulation.pref)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30226: Add system preference AllowSetAutomaticRenewal
Lucas Gass [Fri, 4 Mar 2022 21:06:17 +0000 (21:06 +0000)]
Bug 30226: Add system preference AllowSetAutomaticRenewal

To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.

Signed-off-by: Kelly mcElligott <kelly@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29815: Pre-populate 'Date acquired' field when adding/editing items
Alex Buckley [Mon, 10 Jan 2022 04:27:27 +0000 (04:27 +0000)]
Bug 29815: Pre-populate 'Date acquired' field when adding/editing items

This patch pre-fills the 952$d (Date acquired) item subfield on page
load. Users can still click on the field to fill this subfield.

Test plan:
1. Visit a biblio. Add an item, observe on page load the 'Date acquired' subfield is
empty
2. Visit a subscription. Receive a serial, observe after setting the serial status to 'Arrived' the item form loads with an empty 'Date acquired' subfield
3. Apply patch and restart services
4. Repeat step 1 and confirm now on page load the 'Date acquired'
subfield populates with today's date
5. Delete the populated 'Date acquired' subfield value. Click in the
field and confirm the field is populated and the calendar input displays
6. Delete the 'Date acquired' subfield value again. Confirm that tabbing
from a different field into the date acquired field behaves the same as
click
7. Repeat step 2. This time confirm on page load the 'Date acquired' subfield
contains the current date
8. Delete the populated 'Date acquired' subfield value. Click in the
field and confirm it is populated
9. Delete the populated 'Date acquired' subfield value. Tab to the field
from another field and confirm it behaves the same as click
10. Visit a biblio. Edit an item with a date acquired value in
the past. Confirm the date acquired value is unchanged after saving.

Sponsored-By: Brimbank Library, Australia
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29602: (follow-up) fix TemplateToolkit.t
Fridolin Somers [Thu, 21 Apr 2022 00:37:23 +0000 (14:37 -1000)]
Bug 29602: (follow-up) fix TemplateToolkit.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29602: (follow-up) Fix missing filters
Fridolin Somers [Wed, 20 Apr 2022 19:40:40 +0000 (09:40 -1000)]
Bug 29602: (follow-up) Fix missing filters

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30544: Add font awesome version to licenses page
Nick Clemens [Thu, 14 Apr 2022 13:26:59 +0000 (13:26 +0000)]
Bug 30544: Add font awesome version to licenses page

This patch simply adds the version number we are using
and updates the link to point to our version

To test:
1 - Confirm the About->Licenses page points to the correct Font Awesome
    version

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26370: (QA follow-up) Add new option to templates
Martin Renvoize [Mon, 11 Apr 2022 09:51:26 +0000 (10:51 +0100)]
Bug 26370: (QA follow-up) Add new option to templates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories
Kyle Hall [Mon, 11 Apr 2022 10:37:58 +0000 (06:37 -0400)]
Bug 26370: (QA follow-up) Rename option never_demagnitize to inhouse_patron_categories

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron...
Kyle M Hall [Tue, 11 May 2021 11:51:45 +0000 (07:51 -0400)]
Bug 26370: Add ability to disable demagnetizing items via SIP2 for arbitrary patron categories

Some libraries have certain patron categories that can only do in house checkouts via SIP self check machines.
In these cases, the items should not be demagnetized since the items cannot leave the library.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/SIP/Message.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: DBRev 21.12.00.034
Fridolin Somers [Wed, 20 Apr 2022 15:06:12 +0000 (05:06 -1000)]
Bug 30237: DBRev 21.12.00.034

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 9097: Add option to manually send welcome email
Martin Renvoize [Tue, 8 Mar 2022 16:43:01 +0000 (16:43 +0000)]
Bug 9097: Add option to manually send welcome email

This patch adds a new 'Send welcome email' option to the 'More' dropdown
menu in the patrons toolbar.

Clicking the button will queue the welcome email again for the patron and
redirect the user to the Notices tab to view it's contents.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jessie Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: (QA follow-up) Spelling
Marcel de Rooy [Fri, 15 Apr 2022 09:26:53 +0000 (09:26 +0000)]
Bug 30237: (QA follow-up) Spelling

Thankyou => Thank you
No thanks ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: (follow-up) Make LibraryName conditional
Martin Renvoize [Mon, 11 Apr 2022 14:13:49 +0000 (15:13 +0100)]
Bug 30237: (follow-up) Make LibraryName conditional

It's easy to forget to set the LibraryName preference.. as such we can
make this a conditional and fall back to a default of 'the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: Add a note about WELCOME notice to system preference
Martin Renvoize [Mon, 11 Apr 2022 14:00:39 +0000 (15:00 +0100)]
Bug 30237: Add a note about WELCOME notice to system preference

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: (follow-up) Add french sample notice
Martin Renvoize [Mon, 11 Apr 2022 13:55:48 +0000 (14:55 +0100)]
Bug 30237: (follow-up) Add french sample notice

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: (follow-up) Update Notice
Martin Renvoize [Mon, 11 Apr 2022 13:52:51 +0000 (14:52 +0100)]
Bug 30237: (follow-up) Update Notice

This patch updates the sample notice as suggested by Katrin.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: Replace AutoEmailOpacUser with AutoEmailNewUser
Martin Renvoize [Tue, 8 Mar 2022 16:15:52 +0000 (16:15 +0000)]
Bug 30237: Replace AutoEmailOpacUser with AutoEmailNewUser

This patch replaces the AutoEmailOpacUser system preference with a new
AutoEmailNewUser preference. This makes the functionof the preference
clearer.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: Reference new WELCOME notice
Martin Renvoize [Tue, 8 Mar 2022 13:42:38 +0000 (13:42 +0000)]
Bug 30237: Reference new WELCOME notice

This patch updates all references to the former ACCTDETAILS notice to
use the new WELCOME email notice instead.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30237: Replace ACCDETAILS notice with WELCOME notice
Martin Renvoize [Tue, 8 Mar 2022 16:01:44 +0000 (16:01 +0000)]
Bug 30237: Replace ACCDETAILS notice with WELCOME notice

This patch drops the ACCDETAILS notice in preference to a new WELCOME
notice.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29005: Unit tests
Martin Renvoize [Wed, 2 Mar 2022 14:18:55 +0000 (14:18 +0000)]
Bug 29005: Unit tests

Add a unit test for the additional functionality of sending welcome
emails from Koha::Patrons::Import.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29005: Add support for the command line script
Martin Renvoize [Wed, 2 Mar 2022 13:41:16 +0000 (13:41 +0000)]
Bug 29005: Add support for the command line script

This patch adds welcome email for new users support to the command line
patron import tool.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29005: Add option to send welcome email from patron imports
Martin Renvoize [Fri, 1 Oct 2021 09:40:50 +0000 (10:40 +0100)]
Bug 29005: Add option to send welcome email from patron imports

This patch adds the ability to send the ACCTDETAILS notice for new users
added using the patron import tool.

Test plan
1. Create a valid csv for patron import that includes some new users,
   ensuring you add a valid email address for which you have access.
2. Import the users using the patron import tool and select the new
   'Send email to new patrons' checkbox.
3. Check that the notice appears in the new patrons notices
4. Check that you received a welcome email for the user.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29420: HTTP status code incorrect when calling error pages directly under Plack...
David Cook [Wed, 1 Dec 2021 01:31:27 +0000 (01:31 +0000)]
Bug 29420: HTTP status code incorrect when calling error pages directly under Plack/PSGI

The error pages wrote a HTTP status code of 200 for all PSGI requests, even
though it should have only done it for PSGI requests from the ErrorDocument
middleware. This patch fixes that.

0) Do not apply patch
1) Open F12 dev tools and go to Network tab
2) Go to http://localhost:8081/files/blah
3) Note that the webpage is a 404 error but HTTP status code is 200
4) Go to http://localhost:8081/cgi-bin/koha/circ/blah
5) Note that the webpage is a 404 error and HTTP status code is 404

6) Apply patch
7) Go to http://localhost:8081/files/blah
8) Note that the webpage is a 404 error and HTTP status code is 404
9) Go to http://localhost:8081/cgi-bin/koha/circ/blah
10) Note that the webpage is a 404 error and HTTP status code is 404

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (RM follow-up) Fix missing h1 to div
Fridolin Somers [Wed, 20 Apr 2022 14:47:34 +0000 (04:47 -1000)]
Bug 27631: (RM follow-up) Fix missing h1 to div

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: Compiled CSS
Fridolin Somers [Wed, 20 Apr 2022 14:36:00 +0000 (04:36 -1000)]
Bug 27631: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) Various corrections
Owen Leonard [Tue, 1 Mar 2022 15:22:55 +0000 (15:22 +0000)]
Bug 27631: (follow-up) Various corrections

This patch addresses issues found during QA:

- Double headings (patron details page)
- Inconsistent heading position (check out, patron accounting)
- Missing headings when there is no data (Library EANs, Item search
  fields, MARC modification templates).
- Typo: Z19.50 => Z39.50
- Reword "Classification sources" heading: "Classification
  configuration"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) Modify logo CSS to give better alignment
Owen Leonard [Mon, 8 Nov 2021 12:57:41 +0000 (12:57 +0000)]
Bug 27631: (follow-up) Modify logo CSS to give better alignment

This patch modifies the CSS of the Koha logo and its container so that
it more closely matches the previous version and so that alignment is
handled better at various browser widths.

To test, apply the patch and build the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Check various pages in the staff interface to confirm that the position
of the Koha logo is correct. Adjust your browser width to confirm that
the alignment adapts at narrow widths.

Test also on pages where the header search form can be expanded, e.g.
Patrons -> [+] to expand search options. Or Acquisitions -> Orders
search -> [+]. Confirm that logo alignment is correct on these pages
too.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) Some minor corrections
Owen Leonard [Thu, 30 Sep 2021 15:57:32 +0000 (15:57 +0000)]
Bug 27631: (follow-up) Some minor corrections

This patch makes some corrections to issues found during testing:

Some duplicate headings, a markup error in labeledMARCdetail.tt, a
change of the transfers heading from "Branch transfers" to "Item
transfers."

This patch also undoes the changes to the position of the toolbar on
several pages. I think those changes don't belong in this bug.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) circ/branchtransfers.tt
Wainui Witika-Park [Wed, 2 Jun 2021 08:44:35 +0000 (08:44 +0000)]
Bug 27631: (follow-up) circ/branchtransfers.tt

Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this will be
dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to circ/branchtransfers and check that it has an obvious and
   descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) reports/guided_reports_start.tt
Wainui Witika-Park [Tue, 1 Jun 2021 04:40:40 +0000 (04:40 +0000)]
Bug 27631: (follow-up) reports/guided_reports_start.tt

Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this wil be dealt
with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to reports/guided_reports_start and check that it has an obvious
   and descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) tools/marc_modification_templates.tt
Wainui Witika-Park [Fri, 28 May 2021 03:33:22 +0000 (03:33 +0000)]
Bug 27631: (follow-up) tools/marc_modification_templates.tt

Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this will be
dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to tools/marc_modification_templates and check that it has an
   obvious and descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: (follow-up) course_reserves/course-details.tt
Wainui Witika-Park [Mon, 24 May 2021 15:08:11 +0000 (15:08 +0000)]
Bug 27631: (follow-up) course_reserves/course-details.tt

Changed file to have one <h1> tag showing that describes the page,
rather than the <h1> around the logo.

The hierarchy of other heading tags may be wrong, but this will be
dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to course_reserves/course-details and check that it has an obvious
   and descriptive heading
4) Ensure that the heading is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: admin folder
Wainui Witika-Park [Mon, 19 Apr 2021 05:31:07 +0000 (05:31 +0000)]
Bug 27631: admin folder

Changed each of the pages in the admin folder to have one <h1> tag
showing that describes the page, rather than the <h1> describing the
logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the admin folder and check that they have
   an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: Hidden <h1> on intranet-main.tt
Wainui Witika-Park [Wed, 14 Apr 2021 02:58:19 +0000 (02:58 +0000)]
Bug 27631: Hidden <h1> on intranet-main.tt

This patch visually hides a <h1> on intranet-main.tt so that the
heading is available to be read out by screenreaders in the summary of
headings on the page.

Test plan:

1) Ensure the <h1> "Koha home" heading on the staff client main/home
   page is hidden visually, but in the source code you can see it

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27631: acqui folder
Wainui Witika-Park [Mon, 5 Apr 2021 21:50:20 +0000 (21:50 +0000)]
Bug 27631: acqui folder

Changed each of the pages in the acqui folder to have one <h1> tag
showing that describes the page, rather than the <h1> describing the
logo.

The hierarchy of heading tags may be broken in many pages, but this
will be dealt with in an additional bug.

To test:
1) Go to the Staff Client
2) Apply patch
3) Go to each of the pages in the acqui folder and check that they have
   an obvious and descriptive heading
4) Ensure that the heading in the page is <h1>

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>