]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 22678: (follow-up) Array ref expected in context key
Marcel de Rooy [Mon, 29 Aug 2022 12:51:05 +0000 (12:51 +0000)]
Bug 22678: (follow-up) Array ref expected in context key

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 22678: Replace a few unneeded Koha::Logger calls
Marcel de Rooy [Mon, 29 Aug 2022 09:58:38 +0000 (09:58 +0000)]
Bug 22678: Replace a few unneeded Koha::Logger calls

We have Koha::Logger via the Mojo app now.

Test plan:
Run perl t/db_dependent/api/v1/unhandled_exceptions.t
Your plack-api-error.log should contain something like:
    [2022/08/29 12:15:25] [ERROR] DELETE /api/v1/patrons/1052: unhandled exception (Koha::Exception)<<Exception 'Koha::Exception' thrown 'delete died'>>

Bonus:
Add one line to Koha/REST/Plugin/PluginRoutes.pm:
    $app->log->error('PluginRoutes L49');
Before the line with if ( C4::Context->config("enable_plugins") )
Restart and hit the API once again.
Your log should contain: [2022/08/29 12:21:55] [ERROR] PluginRoutes L49
This serves to demonstrate that the $api->log change in PluginRoutes works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 22678: Use Koha::Logger for Mojolicious API logger
David Cook [Thu, 25 Aug 2022 23:59:42 +0000 (23:59 +0000)]
Bug 22678: Use Koha::Logger for Mojolicious API logger

This patch adds Koha::Logger as the Mojolicious logging object
for the API Mojolicious app.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Add $c->app->log->debug('DEBUG') and
$c->app->log->warn('WARN') to a API controller like
Koha::REST::V1::Libraries
2. koha-plack --restart kohadev
3. Go to the API route tied to that API controller method
4. Look at /var/log/koha/kohadev/api-error.log
5. Note that 'WARN' appears but 'DEBUG' does not

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Adding a context sub to Koha::Logger to get it working.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31715: Fix dbrev permissions
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:34:36 +0000 (14:34 -0300)]
Bug 31715: Fix dbrev permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31577: DBRev 22.06.00.070
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:19:42 +0000 (14:19 -0300)]
Bug 31577: DBRev 22.06.00.070

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31577: Use patron category multi-select for OpacHiddenItemsExceptions system...
Katrin Fischer [Mon, 19 Sep 2022 21:32:12 +0000 (21:32 +0000)]
Bug 31577: Use patron category multi-select for OpacHiddenItemsExceptions system preference

We are now using the patron category selects on almost all system
preferences, but OpacHiddenItemsExceptions was still missing.

To test:
- Before applying the patch:
- Add patron categories to OpacHiddenItemsExceptions using |
- Add configuration to OpacHiddenItems
- Verify all works as expected in the OPAC
- Apply patch, run database update
- Verify the system preference shows the correct settings from before
- Verify feature still works as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31739: Password recovery from staff fails if previous expired reset-entry exists.
Björn Nylén [Wed, 12 Oct 2022 11:54:11 +0000 (11:54 +0000)]
Bug 31739: Password recovery from staff fails if previous expired reset-entry exists.

SendPasswordRecoveryEmail relies on the calling script to tell if there is an
existing valid recovery already. If there's an expired recovery-entry the
members/notices.pl script will try to create a new entry resulting in a duplicate
key error.

This patch fixes the bug by removing the need for the calling script to do the check as
since SendPasswordRecoveryEmail does the same thing anyway.
SendPasswordRecoveryEmail will now use DBIx ->update_or_create instead of looking at
the $update param to determine if it should update an existing entry or create a new.

The update param is removed from all calling scripts and test are updated.

To test:
1. Generate a password recovery mail for a patron
2. Let it expire.
3. Generate a new password recovery from staff to the same patron - Fail!
4: Apply patch
5. Generate a new password recovery from staff to the same patron - Success!
6. Opac password recovery flow should also work.
7. Tests pass.

Sponsored-by: Lund University Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: (QA follow-up) Use more specific permission for sidebar link
Katrin Fischer [Mon, 24 Oct 2022 17:02:55 +0000 (17:02 +0000)]
Bug 31115: (QA follow-up) Use more specific permission for sidebar link

Moves from any acq permission to edit_invoices.

Manage order baskets uses order_manage, to this is supposed to make
things a little more consistent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: (QA follow-up) Remove hr
Katrin Fischer [Mon, 24 Oct 2022 16:53:16 +0000 (16:53 +0000)]
Bug 31115: (QA follow-up) Remove hr

The hr created a visible white line with a darker background and
doesn't make sense here style wise.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add additional field filtering for invoice search
Tomás Cohen Arazi [Thu, 20 Oct 2022 14:10:25 +0000 (16:10 +0200)]
Bug 31115: Add additional field filtering for invoice search

This patch adds support for filtering invoice searches on additional
fields. To test:

1. Generate additional fields for invoices
2. Have invoices with additional fields
3. Use invoice searching and play with filtering by additional fields.
=> SUCCESS: It works!
4. Sign off :-D

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add additional_attributes support to GetInvoices
Tomas Cohen Arazi [Wed, 19 Oct 2022 20:13:13 +0000 (17:13 -0300)]
Bug 31115: Add additional_attributes support to GetInvoices

This patch adds support for searching additional_fields when retrieving
invoices using C4::Acquisition::Invoices.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Acquisition.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add invoice fields manage link
Tomas Cohen Arazi [Tue, 18 Oct 2022 21:43:53 +0000 (18:43 -0300)]
Bug 31115: Add invoice fields manage link

This patch adds a link on the acquisitions page for reaching the
additional fields config for invoices in an easy way.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31115: Add support for additional fields for invoices
Tomas Cohen Arazi [Wed, 19 Oct 2022 20:12:38 +0000 (17:12 -0300)]
Bug 31115: Add support for additional fields for invoices

This patch adds support for additional fields for invoices. A new option
is added to the 'Additional fields' admin page, for the 'aqinvoices'
table.

Adding/editing invoices now supports this additional fields.

To test:
1. Apply this patches
2. Verify the original test plan works
=> SUCCESS: It does!
3. Sign off :-D

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31945: Add page-section container to patron categories page
Martin Renvoize [Mon, 24 Oct 2022 12:10:08 +0000 (13:10 +0100)]
Bug 31945: Add page-section container to patron categories page

This patch adds the page-section container to the patron categories
administration page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31690: Add see from tracings in See-from index (Elasticsearch, MARC21)
Caroline Cyr La Rose [Wed, 5 Oct 2022 15:36:56 +0000 (11:36 -0400)]
Bug 31690: Add see from tracings in See-from index (Elasticsearch, MARC21)

This patch adds the following fields to the See-from index

- 450(abvxyz)
- 451(avxyz)
- 455(avxyz)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31532: Add preprocessor to Zebra indexing pipeline to index 880 as linked field
David Cook [Thu, 8 Sep 2022 05:06:38 +0000 (05:06 +0000)]
Bug 31532: Add preprocessor to Zebra indexing pipeline to index 880 as linked field

This patch adds a preprocessor XSLT to the Zebra indexing pipeline,
so that 880 fields get indexed as the fields they're linked to. For example,
a "880 $6 245" field would be indexed as a "245" field.

However, because the preprocessor only occurs in the indexing part of the pipeline,
it does not affect the retrieval of MARCXML from Zebra. That MARCXML will be
the same MARCXML that was sent to Zebra from Koha.

Test plan:

0. Revert bug 15187, and apply patch for 31532
1. cp ./etc/zebradb/biblios/etc/dom-config.xml /etc/koha/zebradb/biblios/etc/dom-config.xml
2a. cp etc/zebradb/marc_defs/marc21/biblios/preprocess_marcxml.xsl /etc/koha/zebradb/marc_defs/marc21/biblios/.
2b. cp etc/zebradb/marc_defs/normarc/biblios/preprocess_marcxml.xsl /etc/koha/zebradb/marc_defs/normarc/biblios/.
2c. cp etc/zebradb/marc_defs/unimarc/biblios/preprocess_marcxml.xsl /etc/koha/zebradb/marc_defs/unimarc/biblios/.
3. koha-rebuild-zebra -b -f -v kohadev
4. Note that in search results the 880$6245$a data appears before the 245$a data
5. Note that you can do a title index search on the 880$6245$a data

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoRevert "Bug 15187: (QA follow-up) Add unit test"
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:04:07 +0000 (14:04 -0300)]
Revert "Bug 15187: (QA follow-up) Add unit test"

This reverts commit 058d411643c4b868553b97896fb065cf9870e456.

2 years agoRevert "Bug 15187: (QA follow-up) Fix test permissions"
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:03:54 +0000 (14:03 -0300)]
Revert "Bug 15187: (QA follow-up) Fix test permissions"

This reverts commit e6947b740883670b48f002bba7a64103016bc4ef.

2 years agoRevert "Bug 15187: Index 880 in Zebra the same as Elasticsearch"
Tomas Cohen Arazi [Mon, 24 Oct 2022 17:03:44 +0000 (14:03 -0300)]
Revert "Bug 15187: Index 880 in Zebra the same as Elasticsearch"

This reverts commit 85690a14f8685a2eb6cb88316bb4a3145c024cc2.

2 years agoBug 31850: Patron import: welcome email option style as list
Owen Leonard [Tue, 18 Oct 2022 17:53:53 +0000 (17:53 +0000)]
Bug 31850: Patron import: welcome email option style as list

This patch corrects the markup around the "Send email to new patrons"
checkbox on the patron import page. The list should be an ordered list,
not an unordered list.

To test, apply the patch and go to Tools -> Import patrons.

In the "Welcome email" section, there should be no bullet point before
the "Send email to new patrons" line.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31879: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 16:19:42 +0000 (13:19 -0300)]
Bug 31879: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31879: Convert mainpage.css to SCSS
Owen Leonard [Wed, 19 Oct 2022 18:45:48 +0000 (18:45 +0000)]
Bug 31879: Convert mainpage.css to SCSS

This patch creates a new SCSS file to be used to generate mainpage.css,
the stylesheet used specifically for the staff interface home page.

The patch makes visible changes in only two places: Removing borders
from two elements to make them consistent with the new staff interface
design:
 - div.pending-info, where pending actions like patrons requesting
   modifications are shown.
 - div#area-userblock, where the contents of the IntranetmainUserblock
   system preference are displayed.

Otherwise the changes are all for the purpose of properly nesting
elements according to SCSS rules and other fixes related to stylelint
rules.

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

View the main page of the staff interface. Everything should look like
it did before except for those elements which have had their borders
removed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31936: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 16:18:07 +0000 (13:18 -0300)]
Bug 31936: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31936: Restore link to advanced search in acquisitions header
Owen Leonard [Mon, 24 Oct 2022 13:33:45 +0000 (13:33 +0000)]
Bug 31936: Restore link to advanced search in acquisitions header

This patch adds back the link to the advanced order search page which
was previously in the acquisitions header search. Some CSS is tweaked to
make the form style comfortable.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Acquisitions.
- In the header search form, click "Orders search"
- Click the icon in the search form to expand the additional options.
- You should see an "Advanced search" link which is the same style as
  other standard links.
- The link should take you to the order search form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25716: (QA follow-up) Move additional options to etc/z3950/config.xml
Kyle Hall [Mon, 24 Oct 2022 14:58:59 +0000 (10:58 -0400)]
Bug 25716: (QA follow-up) Move additional options to etc/z3950/config.xml

This followup moves the configuration to the z3950 etc file, either the
default and or the custom file is used as per the existing script code.

In addition, the options and be set using an environment variable named Z3950_ADDITIONAL_OPTS.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25716: Don't exit if config doesn't exist in Koha conf file
Kyle M Hall [Thu, 3 Dec 2020 20:37:40 +0000 (15:37 -0500)]
Bug 25716: Don't exit if config doesn't exist in Koha conf file

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 25716: Add ability to specify additional options in koha-conf.xml for z3950_respo...
Kyle M Hall [Thu, 11 Jun 2020 15:17:23 +0000 (11:17 -0400)]
Bug 25716: Add ability to specify additional options in koha-conf.xml for z3950_responder.pl when using koha-z3950-responder

The z39.50 responder has a number of command line options that are not
accessible if using the debian scripts to control it. We should be able
to set those options in the koha conf file to be passed to the script
itself.

Test Plan:
1) Apply this patch
2) Copy your kohaclone's koha-z3950-responder to /usr/sbin/koha-z3950-responder if necessary
3) Add "<z3950_responder_options>--add-item-status k</z3950_responder_options>" inside your <config> block in your koha-conf.xml file
4) Use koha-z3950-responder to start/restart the z39.50 responder, note the item status is now in subfield k!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31952: Add page-section to authorized values admin
Martin Renvoize [Mon, 24 Oct 2022 11:50:18 +0000 (12:50 +0100)]
Bug 31952: Add page-section to authorized values admin

This patch adds the page-section container to the authorized_values
administration area.

Test plan
1) Confirm that the AV admin area looks reasonable for all area's of
   display

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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31941: Add page-section container to item types
Martin Renvoize [Mon, 24 Oct 2022 11:39:06 +0000 (12:39 +0100)]
Bug 31941: Add page-section container to item types

This patch adds the page-section container to the item types
adminstration page

Test plan
1) Confirm the item types administration page uses the card view around
   the main table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31939: Add page-section to branches template
Martin Renvoize [Mon, 24 Oct 2022 11:19:07 +0000 (12:19 +0100)]
Bug 31939: Add page-section to branches template

This patch adds the page-section class to the appropriate blocks in the Libraries administration area.

Test plan
1) Confirm that Administration > Libraries correctly displays the table
   inside a page-section card
2) Confirm that Administration > Libraries > 'A library' correctly
   displays a card for the main information at the top and a separate
   card for OPAC Information if added.
3) Confirm that the 'Add' and 'Edit' library forms still look good.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31806: Add page-section container to existing holds
Martin Renvoize [Fri, 21 Oct 2022 09:10:17 +0000 (10:10 +0100)]
Bug 31806: Add page-section container to existing holds

This patch adds a page-section container around the existing holds
content section

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31806: Add page-section to holds tables
Martin Renvoize [Fri, 21 Oct 2022 08:56:08 +0000 (09:56 +0100)]
Bug 31806: Add page-section to holds tables

This patch adds the page-section class to each holds view on
reserve/request.pl

Test plan
1) Find an biblio to test on and add holds items of different types and
   homebranches.
2) Work through each setting of the HoldsSplitQueue preference and
   confirm the page-sections appear as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31864: (follow-up) Fix breadcrumbs in batchMod and batch_record_mod
Lucas Gass [Wed, 19 Oct 2022 22:29:48 +0000 (22:29 +0000)]
Bug 31864: (follow-up) Fix breadcrumbs in batchMod and batch_record_mod

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31864: Correct breadcrumbs for pages in new cataloging module
Lucas Gass [Tue, 18 Oct 2022 23:30:08 +0000 (23:30 +0000)]
Bug 31864: Correct breadcrumbs for pages in new cataloging module

To test:
1. Apply patch
2. Set system preference 'StockRotation' to enable.
3. Be logged in as a superlibrarian
4. Check the breadcrumbs on the following pages, accessible from the Cataloging module homepage:

barcode-print.tt
label-edit-batch.tt
label-edit-layout.tt
label-edit-profile.tt
label-edit-range.tt
label-edit-template.tt
label-home.tt
label-manage.tt
spinelabel-home.tt
automatic_item_modification_by_age.tt
batchMod-edit.tt
batchMod.tt
batch_delete_records.tt
export.tt
inventory.tt
manage-marc-import.tt
marc_modification_templates.tt
stage-marc-import.tt
stockrotation.tt
upload-images.tt

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31903: Fix missing Edit URL link
Marcel de Rooy [Fri, 21 Oct 2022 09:26:08 +0000 (09:26 +0000)]
Bug 31903: Fix missing Edit URL link

We need to pass format too for New tab (see Pending/Processing).

Test plan:
* Include SCAN format in ArticleRequestSupportedFormats system preferences.
* Check circ rules to allow article requests.
* Add a new request for digital copy and another for photocopy.
* Check Circulation - Article requests - New tab.
* Verify that the Actions menu for a single row for the digital copy
  does contain the "Edit URL(s)" option now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Amended test plan.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31644: (QA follow-up) Add two missing shebang lines
Marcel de Rooy [Fri, 21 Oct 2022 07:44:50 +0000 (07:44 +0000)]
Bug 31644: (QA follow-up) Add two missing shebang lines

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31644: Add copy test and clarify some functions
Nick Clemens [Thu, 29 Sep 2022 16:13:10 +0000 (16:13 +0000)]
Bug 31644: Add copy test and clarify some functions

This patch adds a tst for copy without subfields. I also clarify what eachstep does
so the next user/coder understands current behaviour

Update existing or add new: In the case where the field/subfield exists
we update, if we have two fields - one with the subfield, and one without, we
add the subfield to the one without

Copy field:
 - If given a subfield - we will add to existing fields in the record
 - If not given a subfield - we create an entirely new field

The logic of all of this is tricky, makes sense in a certain light, any complaints
are for a new bug :-)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31644: Check if subfield defined, not for truth
Nick Clemens [Wed, 28 Sep 2022 18:53:28 +0000 (18:53 +0000)]
Bug 31644: Check if subfield defined, not for truth

To test:
1 - Define a new MARC Modification template with actions:
        Copy field 600$a to 942$0
2 - Define a new record like:
    LDR 00334nam a22001217a 4500
    003 ff
    005 20201102111604.0
    008 201102b        xxu||||| |||| 00| 0 eng d
    040 _ _ ‡cvsd
    100 1 _ ‡012345‡aKnuth, Donal Ervin‡d1938
    245 _ _ ‡012345‡aThe aty of computer programming‡cDonald E. Knuth
    600 _ 0 ‡042‡aComputer programming‡9462
3 - Modify this record using the template above
4 - Note that entire  field is copied to 942
5 - Apply patch
6 - Now only subfield 0 is copied

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31644: Unit test
Nick Clemens [Thu, 29 Sep 2022 12:36:11 +0000 (12:36 +0000)]
Bug 31644: Unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31871: Date due not shown on items tab
Stefan Berndtsson [Wed, 19 Oct 2022 12:48:38 +0000 (14:48 +0200)]
Bug 31871: Date due not shown on items tab

Changed ITEM_DAT to checkout in moredetail.tt

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31869: Unable to save thesaurus value to frameworks subfields
Nick Clemens [Wed, 19 Oct 2022 11:17:37 +0000 (11:17 +0000)]
Bug 31869: Unable to save thesaurus value to frameworks subfields

This patch correct a typo authtypecodes for authtypecode

To test:
1. Edit e.g. default frameworks subfield 100$a
2. Add or change fields thesaurus value
3. Save your changes
   => note that on subfield listing there is no mention that 100$a is linked to any thesaurus
   => if you edit 100$a thesaurus input is empty
4. Apply patch
5. Edit subfield 100$a and set a thesaurus value
6. Confirm it saves and displays correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31847: Add page-section class to item search results
Lucas Gass [Tue, 18 Oct 2022 14:14:30 +0000 (14:14 +0000)]
Bug 31847: Add page-section class to item search results

To test:
1. Apply patch
2. Look at item search results ( itemsearch.tt )
3. Make sure everthing looks right.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31715: DBRev 22.06.00.069
Tomas Cohen Arazi [Mon, 24 Oct 2022 14:49:42 +0000 (11:49 -0300)]
Bug 31715: DBRev 22.06.00.069

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31715: Add German translations for language descriptions
Katrin Fischer [Fri, 7 Oct 2022 19:46:16 +0000 (19:46 +0000)]
Bug 31715: Add German translations for language descriptions

This adds the German translations for the different languages to
subtag_registry.sql that is used by all languages during installation.

* Apply patch
* Run database update
* Install de-DE and activate it for the OPAC
* Go to advanced search
* Look at the language pull down - it shows the languages in their
  language and then translated to English
* Switch to German - verify the German translations are used now
  There are 2-3 cases where the translation = name, so only name is shown.
* Drop your database, create your database
* Run the web installer
* Everything should complete without error and the language pull down
  should look exactly the same and be translated

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31718: Others facilitate translation in frameworks administration
Fridolin Somers [Sat, 8 Oct 2022 01:08:44 +0000 (15:08 -1000)]
Bug 31718: Others facilitate translation in frameworks administration

Some other IF/ELSE/END can be changed to facilitate translation

Test plan :
Always test with default framework and with another framework and
compare with and without patch
1) View subfields of field
=> Check the h1 in page
2) Perform actions on a field (create, modify, delete)
=> Check breadcrumbs and h1 in page
3) View the framework table
=> Check columns Repeatable, Mandatory, Important

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facil...
Caroline Cyr La Rose [Fri, 7 Oct 2022 20:45:02 +0000 (16:45 -0400)]
Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation

This patch changes the strings in the IF ELSE for the framework
name in the breadcrumbs on the marc_subfields_structure.pl page.

To test:
1) Apply patch
2) In the intranet, go to Administration > MARC bibliographic framework
3) Click 'Actions' next to the default framework and choose 'MARC
structure'
4) Click 'Actions' next to a MARC tag and choose 'View subfields'
5) Check the breadcrumbs, they should show
Home > Administration > MARC frameworks > Default framework structure >
...
6) Redo steps 2-5, using a different framework, e.g. ACQ
The breadcrumbs for ACQ should look like
Home > Administration > MARC frameworks > ACQ framework structure > ...

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 18556: Clarify lost and gonenoaddress messages
Nick Clemens [Wed, 14 Sep 2022 12:21:44 +0000 (12:21 +0000)]
Bug 18556: Clarify lost and gonenoaddress messages

This patch alters the message for the patron flasg slightly, and adds
a title to provide explicit info when hoevered

To test:
1 - Edit a patron and set gonenoaddress and lost flags
2 - Note new info in the flags section
3 - Go to 'Checkout' or 'Details' tab for patron
4 - Confirm the messages make sense
5 - Confirm you see a tool tip when hovering on messages

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31888: Define save button as primary in Elasticsearch mappings page
Fridolin Somers [Thu, 20 Oct 2022 08:31:29 +0000 (22:31 -1000)]
Bug 31888: Define save button as primary in Elasticsearch mappings page

Like Bug 31810, save button in Elasticsearch mappings page is the most important action on this form, it should be yellow.

Test plan :
Go to Administration > Search engine configuration (Elasticsearch)
=> Check save button has class btn-primary and is yellow

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31870: Add license, remove unused modules
Marcel de Rooy [Wed, 19 Oct 2022 12:05:12 +0000 (12:05 +0000)]
Bug 31870: Add license, remove unused modules

Test plan:
Run test again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31870: Context.t: Reorganize subtests
Marcel de Rooy [Wed, 19 Oct 2022 12:00:37 +0000 (12:00 +0000)]
Bug 31870: Context.t: Reorganize subtests

Move a few tests into separate subtests.
Replace the BEGIN block.

Test plan:
Run test again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31870: Context.t: Fix indentation, remove old comments
Marcel de Rooy [Tue, 18 Oct 2022 14:34:19 +0000 (14:34 +0000)]
Bug 31870: Context.t: Fix indentation, remove old comments

Test plan:
Run test again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31870: Groundwork for Context.t
Marcel de Rooy [Tue, 18 Oct 2022 14:32:01 +0000 (14:32 +0000)]
Bug 31870: Groundwork for Context.t

Replacing the vars statement.
Adding a larger subtest.
Removing TransformVersionToNum.

Test plan:
Run t/db_dependent/Context.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31689: Add see from tracings in Match-heading-see-from index (Elasticsearch,...
Caroline Cyr La Rose [Wed, 5 Oct 2022 15:27:12 +0000 (11:27 -0400)]
Bug 31689: Add see from tracings in Match-heading-see-from index (Elasticsearch, MARC21)

This patch adds the following fields to the Match-heading-see-from index

- 430(adfghklmnoprstvxyz)
- 448(avxyz)
- 450(abvxyz)
- 451(avxyz)
- 455(avxyz)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31813: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 14:19:09 +0000 (11:19 -0300)]
Bug 31813: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31813: (follow-up) Add missing colon for managed staged MARC records
David Nind [Wed, 19 Oct 2022 17:18:48 +0000 (17:18 +0000)]
Bug 31813: (follow-up) Add missing colon for managed staged MARC records

Add colon after "Matching rule applied" when viewing details for a
batch already imported.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31813: Specify white-space: normal for spans styled as labels
Owen Leonard [Tue, 18 Oct 2022 15:51:30 +0000 (15:51 +0000)]
Bug 31813: Specify white-space: normal for spans styled as labels

This patch is necessary to override a CSS property being inherited from
Bootstrap. Allowing a <span> with the "label" class to wrap will keep
alignment correct when displaying information in the same layout as a
form.

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

- If necessary, stage a batch of MARC files (Cataloging -> Stage MARC
  records for import).
- Go to Cataloging -> Manage staged MARC records and click on one of the
  batches to view the details.
- In the list of information about the batch, longer labels like
  "Matching rule applied" should wrap so that they stay aligned with
  other labels in the list.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31861: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 14:15:15 +0000 (11:15 -0300)]
Bug 31861: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31861: (follow-up) Fix disabled clear search button
Owen Leonard [Mon, 24 Oct 2022 12:11:11 +0000 (12:11 +0000)]
Bug 31861: (follow-up) Fix disabled clear search button

The disabled clear search button should not have a border and background
set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31861: Table controls on checkouts table are buttons
Owen Leonard [Wed, 19 Oct 2022 15:36:37 +0000 (15:36 +0000)]
Bug 31861: Table controls on checkouts table are buttons

This patch updates the style of DataTables buttons (columns, export, and
configure), in cases where the buttons are the only control being
displayed (no page controls, filter, etc).

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

- Go to Circulation and check an item out to a patron.
- If necessary, click the "Show checkouts" button to reveal the table of
  checkouts.
- The "Columns," "Export," and "Configure" controls should look the same
  as they do in other situations, with no button-style border.
- Go to Circulation -> Check in and check in the item. The table of
  checked-in items should show the same style controls.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31754: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 14:10:30 +0000 (11:10 -0300)]
Bug 31754: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31754: (follow-up) Correct alignment of buttons
Owen Leonard [Wed, 19 Oct 2022 13:07:01 +0000 (13:07 +0000)]
Bug 31754: (follow-up) Correct alignment of buttons

This patch corrects the alignment of the "Columns," "Export," and
"Configure" buttons. The new design has them aligned to the right.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31754: Improve appearance of behavior of DataTables controls
Owen Leonard [Mon, 17 Oct 2022 17:55:50 +0000 (17:55 +0000)]
Bug 31754: Improve appearance of behavior of DataTables controls

This patch makes changes to CSS and to the default DataTables DOM
configuration in order to make toolbars work better at various screen
widths.

The patch also makes stylelint corrections to _tables.scss.

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

- Test pages in the staff interface where tables contain multiple pages
  of results, e.g. a patron search.
- Confirm that table information (entries) and controls look correct.
- Confirm that all controls work correctly, including the search field.
- Resize your browser to check how the controls respond at various
  browser widths.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31676: Fix db_dependent/Circulation.t tests
David Gustafsson [Tue, 4 Oct 2022 17:23:28 +0000 (19:23 +0200)]
Bug 31676: Fix db_dependent/Circulation.t tests

To test:
1) Set "RenewalPeriodBase" syspref to "the current date",
   "CircControl" to "the library the item is from." and
   "HomeOrHoldingBranch" to "the item's home library (homebranch)."
2) Run tests in t/db_dependent/Circulation.t and verify
   that fails (the script should actually crash before all
   can be run).
3) Apply the patch
4) Verifiy that all tests now pass

Sponsored-by: Gothenburg University Library
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31920: Add transaction to subtest in t/db_dependent/Holds.t
Kyle Hall [Fri, 21 Oct 2022 15:31:09 +0000 (11:31 -0400)]
Bug 31920: Add transaction to subtest in t/db_dependent/Holds.t

A subest in t/db_dependent/Holds.t leaves behind database cruft.

Test Plan:
Using koha-testing-docker:
1) SELECT branchcode FROM branches
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   Note cruft
4) reset_all
2) prove t/db_dependent/Holds.t
3) SELECT branchcode FROM branches
   No cruft!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31886: Fix no sidebar problem in system pref search
Lucas Gass [Fri, 21 Oct 2022 14:57:08 +0000 (14:57 +0000)]
Bug 31886: Fix no sidebar problem in system pref search

To test:
1. Go to Adminstration and click on 'Global system preferences'
2. From the left side bar click 'I18N/L10N' and notice no sidebar.
3. Also try 'Serials', no sidebar
4. Apply patch, restart_all
5. Try 1 & 2 again and the sidebar should be restored
6. Try clicking through each of the system preference groups (Accounting, Acquisitions, etc ) and make sure the sidebar is always present.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31863: Account for changelanguage element when adjusting editor height
Lucas Gass [Tue, 18 Oct 2022 20:53:03 +0000 (20:53 +0000)]
Bug 31863: Account for changelanguage element when adjusting editor height

To test:
1. Turn on 'EnableAdvancedCatalogingEditor'
2. Go to a record with enough MARC data that it should take up the entire width of your screen,
3. The CodeMirror editor will only be 300px.
4. Resize your screen, nothing happens to the editor height
5. Apply patch
6. Look at the same record in your editor, the editor should go to the bottom of the page now. Resizing your screen should resize the editor.
7. Have some additional language packs installed, and change the language system pref so the '#changelanguage' option will appear.
8. Make sure the editor height is still being properly set.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31837: (follow-up) Move page-section to include h2 headings
Katrin Fischer [Sun, 23 Oct 2022 11:51:54 +0000 (11:51 +0000)]
Bug 31837: (follow-up) Move page-section to include h2 headings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31837: Add page-section class to tables on basket.tt
Lucas Gass [Wed, 19 Oct 2022 23:07:07 +0000 (23:07 +0000)]
Bug 31837: Add page-section class to tables on basket.tt

This patch adds the page-section class to the orders and cancelled orders tables.

To test:
1. Have a vendor, basket, and create an order.
2. Go look at the table on basket.tt and make sure the orders table looks good.
3. Cancel some orders and look at the cancelled order table, make sure it also looks good.

Note: I made some indentation changes. I also did NOT add a new wrapper to the cancelled orders table, it already had one so I just added the page-section div to the existing div.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31765: Compiled CSS
Tomas Cohen Arazi [Mon, 24 Oct 2022 13:20:58 +0000 (10:20 -0300)]
Bug 31765: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31765: Add page-section and bg-info classes to 'Notes'
Martin Renvoize [Sat, 22 Oct 2022 08:20:20 +0000 (09:20 +0100)]
Bug 31765: Add page-section and bg-info classes to 'Notes'

This patch adds the page-section and bg-info classes to the 'Notes'
section of the patron imports page.

As part of this patch, we update the base 'card' mixin to allow
background colors to be overwridden with the standard bg-* options
available in [bootstrap](https://getbootstrap.com/docs/4.0/utilities/colors/)

Test plan
1) Build your CSS in the usual way
2) Confirm the Notes block looks OK on the patron imports tool

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31821: Add page-section class to the vendor search results
Martin Renvoize [Fri, 21 Oct 2022 15:33:15 +0000 (16:33 +0100)]
Bug 31821: Add page-section class to the vendor search results

This patch adds a page-section class to each supplier block

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31822: Add page-section to vendoer details page
Martin Renvoize [Fri, 21 Oct 2022 16:00:55 +0000 (17:00 +0100)]
Bug 31822: Add page-section to vendoer details page

This patch contains whitespace changes which an be safely ignored.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 17170: (follow-up) Hide existing filters section if no filters exist
Nick Clemens [Mon, 24 Oct 2022 12:45:33 +0000 (12:45 +0000)]
Bug 17170: (follow-up) Hide existing filters section if no filters exist

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 17170: (QA follow-up) Adjust t/Koha/Auth/Permissions.t
Tomas Cohen Arazi [Mon, 24 Oct 2022 12:11:55 +0000 (09:11 -0300)]
Bug 17170: (QA follow-up) Adjust t/Koha/Auth/Permissions.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31154: Avoid unecessary loop
Jonathan Druart [Mon, 17 Oct 2022 14:00:25 +0000 (16:00 +0200)]
Bug 31154: Avoid unecessary loop

We don't need to loop over the subfield and enter this block if there is
no record.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31154: Add test
Jonathan Druart [Mon, 17 Oct 2022 13:59:52 +0000 (15:59 +0200)]
Bug 31154: Add test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: DBRev 22.06.00.068
Tomas Cohen Arazi [Fri, 21 Oct 2022 14:44:49 +0000 (11:44 -0300)]
Bug 30588: DBRev 22.06.00.068

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: (QA follow-up) Clear waiting-for-2FA-setup in session
Marcel de Rooy [Mon, 12 Sep 2022 09:02:21 +0000 (09:02 +0000)]
Bug 30588: (QA follow-up) Clear waiting-for-2FA-setup in session

If we do not clear this session, the first login directly after setup
does not really enhances user experience ;)

Test plan:
Make sure 2FA is enforced.
Test the above. Disable your 2FA, logout and login.
Verify that you can access pages with this patch now. Without this
patch you could not.
Run these tests to provide more confidence:
t/db_dependent/Auth.t
t/db_dependent/api/v1/two_factor_auth.t
t/db_dependent/Koha/Auth/TwoFactorAuth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: (QA follow-up) Adjust flags for two_factor_auth.pl
Marcel de Rooy [Fri, 9 Sep 2022 09:46:29 +0000 (09:46 +0000)]
Bug 30588: (QA follow-up) Adjust flags for two_factor_auth.pl

Anyone with staff access (catalogue) should be able to go
to account and enable 2FA.

Test plan:
Have a staff user with minimum staff permission.
Access account, manage 2FA.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: (QA follow-up) Auth - remove two warns and second logout
Marcel de Rooy [Fri, 9 Sep 2022 09:18:10 +0000 (09:18 +0000)]
Bug 30588: (QA follow-up) Auth - remove two warns and second logout

Resolves:
Use of uninitialized value $request_method in string eq at /usr/share/koha/C4/Auth.pm line 1122.
Use of uninitialized value $return in numeric gt (>) at /usr/share/koha/C4/Auth.pm line 1155.

We also remove the double logout from Auth.t

Test plan:
Run t/db_dependent/Auth.t
Check if you do not see the warns anymore.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: (QA follow-up) Remove erroneous FIXME
Marcel de Rooy [Fri, 9 Sep 2022 09:09:48 +0000 (09:09 +0000)]
Bug 30588: (QA follow-up) Remove erroneous FIXME

Comment speaks for itself. Look at surrounding code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: (QA follow-up) Missing shebang in TwoFactorAuth.t
Marcel de Rooy [Fri, 9 Sep 2022 08:44:31 +0000 (08:44 +0000)]
Bug 30588: (QA follow-up) Missing shebang in TwoFactorAuth.t

Test plan:
Try t/db_dependent/Koha/Auth/TwoFactorAuth.t on cmd line.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: (QA follow-up) Typos in sysprefs.sql
Marcel de Rooy [Fri, 9 Sep 2022 08:38:33 +0000 (08:38 +0000)]
Bug 30588: (QA follow-up) Typos in sysprefs.sql

The codebase uses disabled and enforced which is imo better too.
So we need to fix this sql file.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add missing include file
Jonathan Druart [Thu, 28 Jul 2022 08:31:35 +0000 (10:31 +0200)]
Bug 30588: Add missing include file

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add missing atomic update
Jonathan Druart [Thu, 28 Jul 2022 08:05:03 +0000 (10:05 +0200)]
Bug 30588: Add missing atomic update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add tests for C4::checkauth
Jonathan Druart [Wed, 27 Jul 2022 07:52:06 +0000 (09:52 +0200)]
Bug 30588: Add tests for C4::checkauth

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add selenium tests
Jonathan Druart [Tue, 26 Jul 2022 12:51:54 +0000 (14:51 +0200)]
Bug 30588: Add selenium tests

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add tests for the REST API routes
Jonathan Druart [Tue, 26 Jul 2022 09:41:14 +0000 (11:41 +0200)]
Bug 30588: Add tests for the REST API routes

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Adjust existing selenium tests
Jonathan Druart [Tue, 26 Jul 2022 12:34:56 +0000 (14:34 +0200)]
Bug 30588: Adjust existing selenium tests

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add the option to require 2FA setup on first staff login
Jonathan Druart [Mon, 25 Jul 2022 14:53:02 +0000 (16:53 +0200)]
Bug 30588: Add the option to require 2FA setup on first staff login

Bug 28786 added the ability to turn on a two-factor authentication,
using a One Time Password (OTP).
Once enabled on the system, librarian had the choice to enable or
disable it for themselves.
For security reason an administrator could decide to force the
librarians to use this second authentication step.

This patch adds a third option to the existing syspref, 'Enforced', for
that purpose.

QA notes: the code we had in the members/two_factor_auth.pl controller
has been moved to REST API controller methods (with their tests and
swagger specs), for reusability reason. Code from template has been
moved to an include file for the same reason.

Test plan:
A. Regression tests
As we modified the code we need first to confirm the existing features
are still working as expected.
1. Turn off TwoFactorAuthentication (disabled) and confirm that you are not able to
enable and access the second authentication step
2. Turn it on (enabled) and confirm that you are able to enable it in your account
3. Logout and confirm then that you are able to login into Koha

B. The new option
1. Set the pref to "enforced"
2. You are not logged out, logged in users stay logged in
3. Pick a user that does not have 2FA setup, login
4. Notice the new screen (UI is a bit ugly, suggestions welcomed)
5. Try to access Koha without enabling 2FA, you shouldn't be able to
access any pages
6. Setup 2FA and confirm that you are redirected to the login screen
7. Login, send the correct pin code
=> You are fully logged in!

Note that at 6 we could redirect to the mainpage, without the need to
login again, but I think it's preferable to reduce the change to
C4::Auth. If it's considered mandatory by QA I could have a look on
another bug report.

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Adjust existing occurrences of TwoFactorAuthentication
Jonathan Druart [Mon, 25 Jul 2022 13:58:56 +0000 (15:58 +0200)]
Bug 30588: Adjust existing occurrences of TwoFactorAuthentication

We need to replace 0 with 'disabled', and 1 with 'enabled'

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30588: Add 'enforced' option to TwoFactorAuthentication
Jonathan Druart [Mon, 25 Jul 2022 13:34:47 +0000 (15:34 +0200)]
Bug 30588: Add 'enforced' option to TwoFactorAuthentication

Sponsored-by: Rijksmuseum, Netherlands
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29662: (QA folow-up) Add explanation for empty to system preference description
Katrin Fischer [Tue, 18 Oct 2022 20:25:37 +0000 (20:25 +0000)]
Bug 29662: (QA folow-up) Add explanation for empty to system preference description

This amends the system preference description for PrefillItem
to explain what happens when the pref is left empty.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill...
Jonathan Druart [Mon, 13 Dec 2021 10:50:33 +0000 (11:50 +0100)]
Bug 29662: (bug 27526 follow-up) Prefill all subfields if SubfieldsToUseWhenPrefill is empty

Signed-off-by: Thibault Keromnès <thibault.keromnes@univ-paris8.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31672: Remove 'Your' from tab descriptions in OPAC patron account
Katrin Fischer [Mon, 3 Oct 2022 16:48:52 +0000 (16:48 +0000)]
Bug 31672: Remove 'Your' from tab descriptions in OPAC patron account

I'll try to keep the test plan simple:
* Go to patron account in OPAC
* Verify that the your from the beginning of the tab
  descriptions has been removed

Bonus: This moves the Recalls history tab below the Holds history
as this is the more logical place for it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31693: Remove non-existent fields from the See-also-from index (Elasticsearch...
Caroline Cyr La Rose [Wed, 5 Oct 2022 16:20:49 +0000 (12:20 -0400)]
Bug 31693: Remove non-existent fields from the See-also-from index (Elasticsearch, MARC21)

This patch removes fields from the See-from index that don't exist in
MARC21.

The existing fields can be found here: https://www.loc.gov/marc/authority/ad5xx.html

The following fields are removed:

- 511$b
- 511$m
- 511$o
- 511$r
- 530$b
- 530$c
- 530$e
- 547$b
- 547$e
- 547$f
- 547$h
- 547$j
- 547$k
- 547$l
- 547$m
- 547$n
- 547$o
- 547$p
- 547$q
- 547$r
- 547$s
- 547$t
- 548$b
- 548$c
- 548$d
- 548$e
- 548$f
- 548$g
- 548$h
- 548$k
- 548$l
- 548$m
- 548$n
- 548$o
- 548$p
- 548$r
- 548$s
- 548$t
- 550$c
- 550$d
- 550$e
- 550$f
- 550$h
- 550$j
- 550$k
- 550$l
- 550$m
- 550$n
- 550$o
- 550$p
- 550$q
- 550$r
- 550$s
- 550$t
- 551$b
- 551$c
- 551$d
- 551$e
- 551$f
- 551$h
- 551$k
- 551$l
- 551$m
- 551$n
- 551$o
- 551$p
- 551$r
- 551$s
- 551$t
- 555$b
- 555$c
- 555$d
- 555$e
- 555$f
- 555$g
- 555$h
- 555$j
- 555$k
- 555$l
- 555$m
- 555$n
- 555$o
- 555$p
- 555$q
- 555$r
- 555$s
- 555$t
- 562$b
- 562$c
- 562$d
- 562$e
- 562$f
- 562$g
- 562$h
- 562$k
- 562$l
- 562$m
- 562$n
- 562$o
- 562$p
- 562$r
- 562$s
- 562$t

Furthermore, the format of the mapping for 511 has been corrected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31691: Remove non-existent fields from the See-from index (Elasticsearch, MARC21)
Caroline Cyr La Rose [Wed, 5 Oct 2022 16:01:46 +0000 (12:01 -0400)]
Bug 31691: Remove non-existent fields from the See-from index (Elasticsearch, MARC21)

This patch removes fields from the See-from index that don't exist in
MARC21.

The existing fields can be found here: https://www.loc.gov/marc/authority/ad4xx.html

The following fields are removed:

- 411$b
- 411$m
- 411$o
- 411$r
- 430$b
- 430$c
- 430$e
- 440(abcdefghjklmnopqrstvxyz) (all of them, 440 doesn't exist at all)
- 441(abcdefghklmnoprstvxyz) (all of them, 441 doesn't exist at all)
- 444(abcdefghjklmnopqrstvxyz) (all of them, 444 doesn't exist at all)
- 447$b
- 447$e
- 447$f
- 447$h
- 447$j
- 447$k
- 447$l
- 447$m
- 447$n
- 447$o
- 447$p
- 447$q
- 447$r
- 447$s
- 447$t
- 448$b
- 448$c
- 448$d
- 448$e
- 448$f
- 448$g
- 448$h
- 448$k
- 448$l
- 448$m
- 448$n
- 448$o
- 448$p
- 448$r
- 448$s
- 448$t
- 462$b
- 462$c
- 462$d
- 462$e
- 462$f
- 462$g
- 462$h
- 462$k
- 462$l
- 462$m
- 462$n
- 462$o
- 462$p
- 462$r
- 462$s
- 462$t
- 462$v
- 462$x
- 462$y
- 462$z

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31687: Add see from and see also from tracings in Match index
Caroline Cyr La Rose [Wed, 5 Oct 2022 15:08:11 +0000 (11:08 -0400)]
Bug 31687: Add see from and see also from tracings in Match index

This patch adds see from and see also from terms for uniform title,
chronological term, topical term, geographic name, and genre/form term
to the Match index in Elasticsearch for MARC21.

Previously, only see from/see also from for personal names,
corporate names, and meeting names were indexed.

To test:

1. Without patch, import attached authority records
1.1. Download attached records
1.2. Go to Tools > Stage MARC records for import
1.3. Click 'Browse' and choose the downloaded file
1.4. Click 'Upload file'
1.5. Choose Record type = Authority
1.6. Click 'Stage for import'
1.7. From the job details, click 'View batch'
1.8. Click 'Import this batch into the catalog'

2. Without patch, search for see from and see also from tracings
2.1. Go to Authorities
2.2. In the 'Default' drop-down menu, choose 'Uniform title'
2.3. Choose the 'Search all headings' tab
2.4. Enter the search term 'Five hundred'
2.5. Click 'Submit' or press 'Enter'
 --> No results
2.6. Redo the search for the following search terms

Authority type Search term Should be found in
Uniform title five hundred 430
Uniform title films préférés 530
Chronological term fifteenth 448
Chronological term middle ages 548
Topical term lalopathie 450
Topical term troubles communication 550
Geographic name cécropia 451
Geographic name canada francophone 551
Genre/Form term filmiques 455
Genre/Form term films 555

3. Apply patch
4. Delete index, reset mappings and reindex authorities (with command line, -a -d -r)
5. Redo the searches from step 2, there should now be results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31588: Update cpanfile for new OpenAPI versions (master)
Mason James [Tue, 20 Sep 2022 16:25:38 +0000 (04:25 +1200)]
Bug 31588: Update cpanfile for new OpenAPI versions (master)

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 17170: DBRev 22.06.00.067
Tomas Cohen Arazi [Fri, 21 Oct 2022 14:19:39 +0000 (11:19 -0300)]
Bug 17170: DBRev 22.06.00.067

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