]> git.koha-community.org Git - koha.git/log
koha.git
3 years agoBug 28695: Add shelving location column to overdue.tt
Lucas Gass [Thu, 8 Jul 2021 20:57:58 +0000 (20:57 +0000)]
Bug 28695: Add shelving location column to overdue.tt

To test:
1. have some overdues
2. go to the overdue report on the circulation page (overdue.tt)
3. no shelving location
4. apply patch and restart the things
5. look at the overdue report again and there should be a Shelving location column
6. make sure it is accurate
7. go to table settings and make sure you can properly hide the column. test other columns in the table and make sure they are still hiding correctly as well

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28893: Remove unused opac/rss directory
Jonathan Druart [Wed, 25 Aug 2021 08:49:30 +0000 (10:49 +0200)]
Bug 28893: Remove unused opac/rss directory

RSS feeds are now generated using opac/opac-search.pl (format=rss).

But prior to
  commit 09df0de35fcb5b1645490bd3ec9d9a77ec7923a1
  Removing obsolete RSS <link> tags and the scripts
it was using opac/opac-rss.pl, which used opac/rss

The directory should have been removed by this commit.

Test plan:
Confirm that this directory is useless and can be removed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28744: Better handling of undefined to_api_mapping
Tomas Cohen Arazi [Fri, 23 Jul 2021 03:39:16 +0000 (00:39 -0300)]
Bug 28744: Better handling of undefined to_api_mapping

We always had some mapping because of the DB vs. API object definition discrepancies. But bug 25260 revamps the reserves table, and it is a perfect match. It highlights this edge case: if no mapping defined, then and undef from_api_mapping is generated (as opposed to an empty hashref) and this leads to errors in the query translation from the API.

This patch makes a small change so this method always returns an empty
hashref.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> FAIL: Test fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: remove uneeded commented lines

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28744: Regression tests
Tomas Cohen Arazi [Fri, 23 Jul 2021 03:35:49 +0000 (00:35 -0300)]
Bug 28744: Regression tests

This patch adds tests for the following cases:
- to_api_mapping not defined
- to_api_mapping returning an empty hashref

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Object.t
=> FAIL: Tests fail :-(

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch: remove uneeded commented lines

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28891: (bug 23916 follow up) Always use 'Checkout on' as default Checkout history...
Didier Gautheron [Mon, 23 Aug 2021 13:19:03 +0000 (15:19 +0200)]
Bug 28891: (bug 23916 follow up) Always use 'Checkout on' as default Checkout history sort column

To test:
1 - Unset RecordStaffUserOnCheckout
2 - Check out an item
3 - Display Checkout history, table is sorted by 'Checkout on' column
4 - Set RecordStaffUserOnCheckout
5 - Display Checkout history, table is sorted by 'Renewed' column
6 - Apply patch
7 - Redo 1, 3, 4 and 5, table is always sorted by 'Checkout on'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 7703: (follow-up) Treat no items like none available
Owen Leonard [Fri, 6 Aug 2021 12:54:46 +0000 (12:54 +0000)]
Bug 7703: (follow-up) Treat no items like none available

This patch modifies the holds template so that during the
multi-hold process, titles with no items attached are treated the same
way as titles with no items available (items exist but cannot be place
don hold):

 - The row showing such a record will say "No items are available to be
    placed on hold."
 - The pickup location dropdown will be hidden.

To test, follow the previous test plan and confirm that these change are
reflected. Now that the pickup location field isn't present for titles
without items you should be able to complete the holds process.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 7703: (QA follow-up)
Kyle M Hall [Fri, 6 Aug 2021 11:46:12 +0000 (11:46 +0000)]
Bug 7703: (QA follow-up)

Revised test plan from Owen:

This patch modifies the hold process so that if one of the titles in a
multi-hold process has no items the process doesn't abort completely.

To test, apply the patch and perform a search in the catalog which will
return one or more records with no items attached.

 - Check checkboxes for multiple results, some of which have items and
   at least one of which has no items.
 - Click "Place hold."
 - You should be taken to the page for placing multiple holds, with a
   heading, "Cannot place hold on some items."
 - Note: You will not be able to complete the holds process without the
   next patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 7703: Don't block bulk hold action on search results if some items can't be place...
Kyle M Hall [Fri, 6 Aug 2021 11:19:12 +0000 (11:19 +0000)]
Bug 7703: Don't block bulk hold action on search results if some items can't be placed on hold

If you select multiple titles on the search results page in order to
place a bulk hold and some of those titles have no items you get a
JavaScript alert warning you can some cannot be placed on hold. You are
blocked from completing the action until you deselect the invalid hold.

This is unnecessary because the bulk hold process will safely refuse to
place a hold on these titles later in the process.

This patch removes the check that prevents submitting a multi-hold if
one or more records in the multi-hold have no items.

Test plan:
1) Apply patch
2) On the staff interface, do a search
3) On the search results, select at least one record with items and one
   record with no items.
4) Click the 'Place hold' button.
5) You should be redirected to reserve/request.pl with the message
   "Cannot place hold: this record has no items attached."

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28902: Compiled CSS
Jonathan Druart [Mon, 30 Aug 2021 14:31:43 +0000 (16:31 +0200)]
Bug 28902: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28902: Grey color on label for record metadata
Fridolin Somers [Thu, 26 Aug 2021 06:31:12 +0000 (20:31 -1000)]
Bug 28902: Grey color on label for record metadata

Actually looking at a record search or details, we see a black label
(for example "Author:") and a grey metadata (for example "J.R.R Tolkien").

Seems bad for accessibility.
In my opinion the most important to see is the metadata not the label.

It is possible to change with a custom CSS but I open this report to
propose to change default display.

Test plan :
1) Apply patch and build CSS in OPAC and staff interface
2) Search for any record in OPAC/Staff interface
3) You see grey label and black metadata

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28554: Fix t/db_dependent/AuthorisedValues.t
Fridolin Somers [Wed, 4 Aug 2021 08:11:10 +0000 (22:11 -1000)]
Bug 28554: Fix t/db_dependent/AuthorisedValues.t

Fixes where sort on lib breaks the test.

Also removes useless params in search_by_koha_field()

Run prove t/db_dependent/AuthorisedValues.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28554: In itemsearch sort item types filter by description
Fridolin Somers [Fri, 11 Jun 2021 11:42:00 +0000 (13:42 +0200)]
Bug 28554: In itemsearch sort item types filter by description

In itemsearch form, the item types filter should be sorted by description.

Test plan :
1) Create several values and descriptions in item types
2) Go to itemsearch
3) See filter by item types sorts on description and not on value

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28554: In Koha::AuthorisedValues sort by description
Fridolin Somers [Fri, 11 Jun 2021 11:35:41 +0000 (13:35 +0200)]
Bug 28554: In Koha::AuthorisedValues sort by description

In itemsearch form, there are several filters build with authorized values.
There values should be sorted by description.

Test plan :
1) Create several values and descriptions in authorized values LOC
2) Go to itemsearch
3) See filter by location sorts on description and not on value

Seems change in search_by_marc_field can not be tested in interface

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28812: Improve robustness of selector
Jonathan Druart [Mon, 30 Aug 2021 12:43:35 +0000 (14:43 +0200)]
Bug 28812: Improve robustness of selector

Use the same fix as bug 28828.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28812: (bug 7882 follow up) Copy all subfields in plugin editor
Didier Gautheron [Thu, 26 Aug 2021 13:27:45 +0000 (15:27 +0200)]
Bug 28812: (bug 7882 follow up) Copy all subfields in plugin editor

To test:
1- Create a notice with a 700$a and 700$d
2- Click on 700 $a field Tag Editor
3- Only 700$a is copied in search windows eg /authorities/auth_finder.pl pop up
4- Apply patch
5- Redo 2
6- 700$a is copied in 'Search main heading ($a only)' and $d is copied in 'Search main heading'

Signed-off-by: George Veranis <gveranis@dataly.gr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: Add koha_object[s]_class to fix TestBuilder.t
Jonathan Druart [Fri, 27 Aug 2021 15:06:09 +0000 (17:06 +0200)]
Bug 22690: Add koha_object[s]_class to fix TestBuilder.t

'Can't locate object method "_new_from_dbic" via package "Koha::Linktracker" (perhaps you forgot to load "Koha::Linktracker"?) at /kohadevbox/koha/Koha/Object.pm line 334.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25619: Adjust POD and move date check before logging
Nick Clemens [Thu, 26 Aug 2021 19:07:53 +0000 (19:07 +0000)]
Bug 25619: Adjust POD and move date check before logging

Potentially we could have logged a change when no date was passed.

This patch moves the test before logging and updates POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25619: Adjust POD
Jonathan Druart [Wed, 11 Aug 2021 11:17:13 +0000 (13:17 +0200)]
Bug 25619: Adjust POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25619: (QA follow-up) Fix subtest description
Kyle M Hall [Thu, 22 Jul 2021 10:24:12 +0000 (06:24 -0400)]
Bug 25619: (QA follow-up) Fix subtest description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25619: Unit Tests
Kyle M Hall [Fri, 16 Jul 2021 18:26:37 +0000 (14:26 -0400)]
Bug 25619: Unit Tests

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25619: Add ability to adjust expiration date for waiting holds
Kyle M Hall [Fri, 16 Jul 2021 17:50:29 +0000 (13:50 -0400)]
Bug 25619: Add ability to adjust expiration date for waiting holds

There are times when an item that is waiting for pickup needs to have the expiration date extended. This would give staff the ability to modify one by one, as needed, the reserves.expirationdate for a given item awaiting pickup.

Test Plan:
1) Place a hold, trap an item for it such that is is waiting
2) Attempt to update the expiration date
3) Note the new date is not saved
4) Apply this patch, restart all the things!
5) Attempt to update the expiration date
6) The new date should be saved!

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: DBRev 21.06.00.018
Jonathan Druart [Fri, 27 Aug 2021 12:39:51 +0000 (14:39 +0200)]
Bug 22690: DBRev 21.06.00.018

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: Remove uneeded return and add no_triggers
Jonathan Druart [Fri, 27 Aug 2021 12:34:00 +0000 (14:34 +0200)]
Bug 22690: Remove uneeded return and add no_triggers

* C4/Items.pm
  - Koha::Biblios not used

* Koha/Item.pm
  - Koha::Item->orders must return an empty set if no order attached
  - no_triggers should be passed to other update calls

* Item.t
  - No need to build a fund
  - Add new test to test Koha::Item->orders when no order attached

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: DBIC schema changes
Jonathan Druart [Fri, 27 Aug 2021 08:43:38 +0000 (10:43 +0200)]
Bug 22690: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Fix indexing for Items sets
Martin Renvoize [Thu, 5 Aug 2021 13:19:55 +0000 (14:19 +0100)]
Bug 22690: (QA follow-up) Fix indexing for Items sets

This patch adds tests and handling for calling move_to_biblio on a
Koha::Items set that contains items from more than one source biblio.

Test plan
1/ Inspect the changes to t/db_dependent/Koha/SearchEngine/Indexer.t
2/ Run t/db_dependent/Koha/SearchEngine/Indexer.t and confirm it passes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Correct variable name
Joonas Kylmälä [Thu, 22 Jul 2021 14:32:09 +0000 (14:32 +0000)]
Bug 22690: (QA follow-up) Correct variable name

The $from_biblio variable name doesn't exists after a refactoring that
happened. Here we need to re-index both the $self biblio and $to_biblio
biblio.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Add TrackedLink classes and use them
Martin Renvoize [Thu, 22 Jul 2021 10:40:20 +0000 (11:40 +0100)]
Bug 22690: (QA follow-up) Add TrackedLink classes and use them

This patch adds Koha::TrackedLink(s) classes based on Koha::Object(s)
and then adds the relationship accessor to Koha::Item and uses it within
the move_to_biblio method.

Tests for new relationship also added to t/db_dependent/Koha/Item.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Use relationship accessor
Martin Renvoize [Thu, 22 Jul 2021 09:57:17 +0000 (10:57 +0100)]
Bug 22690: (QA follow-up) Use relationship accessor

With the addition of foreign key relationships to the linktracker table
we now get a DBIC relationship accessor we can use. This clarifies the
code slightly by using the _result->relationship form to get the DBIC
resultset.  We should still introduce a Koha::Object based class for
this table at some point.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Add relationships to linktracker
Martin Renvoize [Thu, 22 Jul 2021 09:37:26 +0000 (10:37 +0100)]
Bug 22690: (QA follow-up) Add relationships to linktracker

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Clarify uses of DBIC
Martin Renvoize [Thu, 22 Jul 2021 09:25:28 +0000 (10:25 +0100)]
Bug 22690: (QA follow-up) Clarify uses of DBIC

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Move adopt_items_from_biblios to Koha::Items
Martin Renvoize [Thu, 22 Jul 2021 09:13:42 +0000 (10:13 +0100)]
Bug 22690: (QA follow-up) Move adopt_items_from_biblios to Koha::Items

This patch moves the Koha::Biblio->adopt_items_from_biblio method to the
Koha::Items set class and updates all calls from
Biblio2->adopt_items_from_biblio(Biblio1) to Biblio->items->move_to_biblio(Biblio2)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Improve negation syntax
Martin Renvoize [Thu, 22 Jul 2021 09:01:32 +0000 (10:01 +0100)]
Bug 22690: (QA follow-up) Improve negation syntax

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Rename 'item_orders' to 'orders'
Martin Renvoize [Thu, 22 Jul 2021 08:56:49 +0000 (09:56 +0100)]
Bug 22690: (QA follow-up) Rename 'item_orders' to 'orders'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: Remove MoveItemFromBiblio import
Jonathan Druart [Mon, 19 Jul 2021 09:30:32 +0000 (11:30 +0200)]
Bug 22690: Remove MoveItemFromBiblio import

Added in the meanwhile by bug 17600.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: Add missing txn_begin in subtest
Jonathan Druart [Mon, 19 Jul 2021 09:59:10 +0000 (11:59 +0200)]
Bug 22690: Add missing txn_begin in subtest

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Make bib-level hold object actually bib-level
Joonas Kylmälä [Fri, 28 May 2021 10:57:53 +0000 (13:57 +0300)]
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Index also source biblio when calling move_to_biblio()
Joonas Kylmälä [Tue, 25 May 2021 15:34:33 +0000 (18:34 +0300)]
Bug 22690: (QA follow-up) Index also source biblio when calling move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: (QA follow-up) Silence manually generated warnings
Joonas Kylmälä [Tue, 25 May 2021 15:09:30 +0000 (18:09 +0300)]
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: Add more tests
Ere Maijala [Mon, 9 Nov 2020 12:28:16 +0000 (14:28 +0200)]
Bug 22690: Add more tests

- Tests for adopt_items_from_biblio
- Tests for the relationship between items and acquisition orders
- Tests for indexer calls in adopt_items_from_biblio

Signed-off-by: Michal Denar <black23@gmail.com>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 22690: Refactor merging of records to improve performance (Elasticsearch)
Ere Maijala [Mon, 16 Sep 2019 10:55:37 +0000 (13:55 +0300)]
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click "Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar <black23@gmail.com>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26223: (QA follow-up) Fix filter order
Tomas Cohen Arazi [Thu, 26 Aug 2021 12:06:50 +0000 (09:06 -0300)]
Bug 26223: (QA follow-up) Fix filter order

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26223: include item information in OPAC ISBD view
Andreas Roussos [Mon, 17 Aug 2020 08:57:03 +0000 (10:57 +0200)]
Bug 26223: include item information in OPAC ISBD view

The ISBD view in the OPAC interface does not display item information.

This patch fixes that.

Test plan:
0) Have a biblio with at least one item attached to it and include one
   of the following snippets in the OPACISBD system preference,
   depending on your MARC flavour:

   MARC21:
   #952|<br/><h2>Items</h2><table><th>Copy number</th><th>Shelving
   location</th><th>Koha item type</th><th>Barcode</th><th>Call number
   (Full call number)</th><th>Materials specified (bound volume or
   other part)</th>|<tr><td>{952t} </td><td> {952c} </td><td> {952y}
   </td><td> {952p} </td><td> {952o} </td><td> {9523}</td></tr>|</table>

   UNIMARC:
   #995|<br/><h2>Items</h2><table><th>Copy number</th><th>Shelving
   location</th><th>Koha collection</th><th>Barcode</th><th>Call number
   (Full call number)</th><th>Numbering (volume or other part)</th>|
   <tr><td>{9956} </td><td> {995e} </td><td> {995h} </td><td> {995f}
   </td><td> {995k} </td><td> {995l}</td></tr>|</table>

   Switch to the OPAC ISBD view for your biblio; notice how it does
   not display item information.
1) Apply the patch, and restart Plack/memcached if necessary.
2) Refresh the OPAC ISBD view page, this time you should see item
   information as per the OPACISBD system preference setting.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28881: (bug 23376 follow-up) Fix suggestion display on order receive page
Jonathan Druart [Thu, 19 Aug 2021 10:34:58 +0000 (12:34 +0200)]
Bug 28881: (bug 23376 follow-up) Fix suggestion display on order receive page

On bug 23376 we replaced $order, from hashref Koha::Acq::Order, but 2
occurrences have not been corrected.

It causes a bug on the order receive page when the bib is linked with a
suggestion.

Test plan:
Create an order from bib A, create a suggestion for purchase on bib A
(OPAC)
Receive the order.
Without the patch: Notice the "Suggested by: (suggestion #)"
With the patch you see the info of the suggester

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28784: (QA follow-up) Remove num_paragraph cookie from include
Marcel de Rooy [Fri, 6 Aug 2021 08:03:27 +0000 (08:03 +0000)]
Bug 28784: (QA follow-up) Remove num_paragraph cookie from include

Still found in opac-bottom.inc.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28784: (follow-up) Always make three search boxes
Nick Clemens [Tue, 3 Aug 2021 12:17:02 +0000 (12:17 +0000)]
Bug 28784: (follow-up) Always make three search boxes

The previous patch removed search_boxes_loop - that's okay, it was always
getting the same three values.

If we don't do something in the template though, we get no boxes

Ultimately this should be a include, and not a hardcoded loop, but keeping changes
small for backporting

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28784: Remove code related to num_paragraph cookie
Jonathan Druart [Tue, 3 Aug 2021 08:58:47 +0000 (10:58 +0200)]
Bug 28784: Remove code related to num_paragraph cookie

It could lead to server freeze if set to a big value (we are pushing
into an array and so RAM is being fulfilled, and CPU is looping).

I don't understand the point of this cookie.

        var numPar = $("#booleansearch fieldset p").size();
        if (numPar > [% search_boxes_count | html %]){
            jQuery.cookie("num_paragraph", numPar,{ path: '/'});
        }else{
            jQuery.removeCookie("num_paragraph", { path: '/'});
        }

But "#booleansearch fieldset p" does not exist, it's not 'p' but 'div'
elements.

I've removed the code related to num_paragraph and the "Return to the
last advanced search" feature still works as before.

From this comment:
    # determine what to display next to the search boxes (ie, boolean option
    # shouldn't appear on the first one, scan indexes should, adding a new
    # box should only appear on the last, etc.

The only bit that is not working as described is "adding a new box
should only appear on the last", but it has been working this way for
a long time already I think, and I don't see it as a bug.

Test plan:
Read the code, check that the above is correct.
Search for regression in this "return to last adv search" feature added
by bug 13307.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28872: DBRev 21.06.00.017
Jonathan Druart [Thu, 19 Aug 2021 07:55:51 +0000 (09:55 +0200)]
Bug 28872: DBRev 21.06.00.017

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28872: Fix QA issues on atomicupdate
Jonathan Druart [Wed, 18 Aug 2021 11:03:09 +0000 (13:03 +0200)]
Bug 28872: Fix QA issues on atomicupdate

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28872: Atomicupdate to correct existing values
Andrew Fuerste-Henry [Tue, 17 Aug 2021 23:57:54 +0000 (23:57 +0000)]
Bug 28872: Atomicupdate to correct existing values

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28872: make AcquisitionLog, NewsLog, NoticesLog use 1/0 for their values
Andrew Fuerste-Henry [Tue, 17 Aug 2021 17:29:02 +0000 (17:29 +0000)]
Bug 28872: make AcquisitionLog, NewsLog, NoticesLog use 1/0 for their values

To test:
1 - edit AcquisitionLog, NewsLog, NoticesLog to change their values
2 - in About Koha, see the errors noted above
3 - apply patch, restart services
4 - re-edit AcquisitionLog, NewsLog, NoticesLog to change their values again
5 - reload About, see errors are cleared
6 - confirm that actions are logged as expected when logs are on, not logged when logs are off

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28819: Fix advanced search button on mainpage.pl incorrectly links to item search
Fridolin Somers [Thu, 19 Aug 2021 06:35:26 +0000 (20:35 -1000)]
Bug 28819: Fix advanced search button on mainpage.pl incorrectly links to item search

The previous follow-up changed the link for the Advanced search button on mainpage.pl.

Test plan :
1) Go to intranet main page
2) Click on big button "Advanced search"
=> Without patch you go to item search /cgi-bin/koha/catalogue/itemsearch.pl
=> With patch you go to advanced search /cgi-bin/koha/catalogue/search.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 21670: Add debug to Plugins.t
Jonathan Druart [Wed, 18 Aug 2021 14:50:03 +0000 (16:50 +0200)]
Bug 21670: Add debug to Plugins.t

It's failing randomly (at least on Jenkins, cannot recreate locally).
Maybe the plugin is not actually installed?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27523: (follow-up) Add copy of image to carredart in the OPAC
Owen Leonard [Fri, 22 Jan 2021 17:09:16 +0000 (17:09 +0000)]
Bug 27523: (follow-up) Add copy of image to carredart in the OPAC

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27523: Adding new itemtype lock image to carredart
Victoria Faafia [Wed, 20 Jan 2021 12:56:03 +0000 (12:56 +0000)]
Bug 27523: Adding new itemtype lock image to carredart

Test Plan
1. Go to Administration>item types>modify item type
2. There should be a lock item type under the carredart

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27522: (follow-up) Add copy of image to carredart icons in the OPAC
Owen Leonard [Fri, 22 Jan 2021 17:15:57 +0000 (17:15 +0000)]
Bug 27522: (follow-up) Add copy of image to carredart icons in the OPAC

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27522: Adding new itemtype info image to carredart
Victoria Faafia [Wed, 20 Jan 2021 12:22:28 +0000 (12:22 +0000)]
Bug 27522: Adding new itemtype info image to carredart

Test Plan
1. Go to Administration>Item Types>Modify Item Type
2. Under carredart you should see an info item type

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27521: (follow-up) Add copy of image to carredart icons in the OPAC
Owen Leonard [Fri, 22 Jan 2021 17:21:44 +0000 (17:21 +0000)]
Bug 27521: (follow-up) Add copy of image to carredart icons in the OPAC

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27521: Add new item type headset image for carredart
ava li [Thu, 21 Jan 2021 06:44:28 +0000 (06:44 +0000)]
Bug 27521: Add new item type headset image for carredart

TEST PLAN:
1) Go to administration
2) Go to item types
3) Click edit on one of the item types
4) Go to the category "carredart"
5) Check that there is a small headset icon

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27520: (follow-up) Add copy of images to carredart icons in the OPAC
Owen Leonard [Fri, 22 Jan 2021 17:53:03 +0000 (17:53 +0000)]
Bug 27520: (follow-up) Add copy of images to carredart icons in the OPAC

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27520: Adding new itemtype images to carredart
Victoria Faafia [Wed, 20 Jan 2021 10:43:54 +0000 (10:43 +0000)]
Bug 27520: Adding new itemtype images to carredart

This patch adds 3 new itemtype images to carredart: boardgame(domino), zoom-in and zoom-out

Test Plan
1. Go to Administration>item types>Modify item type
2. Click on the carredart tab that under choose an icon
3. Check that a these 3 icons have been added

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27505: (follow-up) Add copy of image to carredart icons in the OPAC
Owen Leonard [Fri, 22 Jan 2021 17:13:39 +0000 (17:13 +0000)]
Bug 27505: (follow-up) Add copy of image to carredart icons in the OPAC

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 27505: Add new item type controller image for carredart
ava li [Thu, 21 Jan 2021 02:17:24 +0000 (02:17 +0000)]
Bug 27505: Add new item type controller image for carredart

TEST PLAN:
1) Go to administration
2) Go to item types
3) Click edit on one of the item types
4) Go to the category "carredart"
5) Check that there is a small controller icon

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28802: Fix Asset.t
Jonathan Druart [Wed, 18 Aug 2021 14:25:26 +0000 (16:25 +0200)]
Bug 28802: Fix Asset.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28390: Move timestamp into grouping row
Martin Renvoize [Wed, 19 May 2021 13:55:01 +0000 (14:55 +0100)]
Bug 28390: Move timestamp into grouping row

This patch moves the timestamp that was getting repeated for each
transaction breakdown row into the group header row.

Test plan
1/ Add a series of transactions to to a register (via Point of Sale
or/and Borrower Accounts)
2/ View the transactions (and past transactions tables) on the Register
details page
3/ Apply the patch and compare the display

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28346: (QA follow-up) Add `-action` for consistency
Martin Renvoize [Wed, 18 Aug 2021 08:45:59 +0000 (09:45 +0100)]
Bug 28346: (QA follow-up) Add `-action` for consistency

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28346: Add classes to account action buttons
Martin Renvoize [Thu, 13 May 2021 10:54:07 +0000 (11:54 +0100)]
Bug 28346: Add classes to account action buttons

This patch adds identifiable classes to each action button that may be
displayed next to an accountline on the borrower account page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28868: Add back mastheadsearch class name
Lucas Gass [Mon, 16 Aug 2021 21:23:47 +0000 (21:23 +0000)]
Bug 28868: Add back mastheadsearch class name

In masthead.inc there is a wrapper for the main search bar called #opac-main-search. Prior to Bug 20168 that warpper had a class name of 'mastheadsearch'.

Historically CSS/JS customization of the main search bar was done via the mastheadsearch class.

Test plan:
1. Inscept the element on the OPAC main page and see the element with an ID of 'opac-main-search'.
2. Apply patch
3. Inscept that same element and you should now also see a class of 'mastheadsearch'.
4. Nothing visually should be different with the patch applied.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28525: Dont let TinyMCE do code cleanup
Lucas Gass [Mon, 7 Jun 2021 22:17:46 +0000 (22:17 +0000)]
Bug 28525: Dont let TinyMCE do code cleanup

If you look at Bug 24764 and Bug 26942 we adjusted the TinyMCE for the News tool so it will not do some types of automatic code clean up.

The TinyMCE editor for system preferences which can be enabled by 'UseWYSIWYGinSystemPreferences' has the same problems.

We should make the configurations the same.

To Test:
1. Turn on 'UseWYSIWYGinSystemPreferences'
2. Go to a system preference like 'RestrictedPageContent'
3. Try entering something like '<i class="fa fa-facebook-official" aria-hidden="true">TEST</i>' in the Source Code window
4. It gets cleaned up by the editor
5. Try something like '<a href="https://www.test.com" referrerpolicy="&quot;no-referrer-when-downgrade">TEST</a>'
6. It's cleaned up by the editor.
7. Try something like '<link href="https://fonts.googleapis.com/css?family=Open+Sans” rel=“stylesheet">'
8. Cleaned up by editor.
9. Apply patch
10. Try step 3, 5, and 7 again.
11. It should not be changed by the editor

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28839: Better texts in stage MARC for import
Fridolin Somers [Tue, 10 Aug 2021 21:47:26 +0000 (11:47 -1000)]
Bug 28839: Better texts in stage MARC for import

Tool stage MARC for import is /cgi-bin/koha/tools/stage-marc-import.pl.
Its form contains texts in legends, labels, hints.

I feel like :
Labels are sometimes too long, showing them on multilines, like "Modify record using the following template". Long texts should be in legend or hint.
Legend are sometimes contains redundant text, like "Stage records into the reservoir".
Section beginning with "Comments about this file" is missing a legend, it looks like it is part of the upper section for profile.

Also lengends should be driving the user, that is why optional parts
contains a legend with "?".

Test plan :
Compare texts in page without and with patch

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 28839: (QA follow-up) Fix tabs/indentation in code paragraph

QA tools complained about a tab char. Cleaned up the template paragraph
it pointed out, removing tabs and correcting indentation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28861: Item type column always hidden in OPAC holds history
Tomas Cohen Arazi [Fri, 13 Aug 2021 20:00:38 +0000 (17:00 -0300)]
Bug 28861: Item type column always hidden in OPAC holds history

This patch fixes the 'Requested item  type' column not showing for holds
history in OPAC.

It was due to a template variable not being set. When solved, it become
clear that an import was missing for a template plugin.

To test:
1. Enable AllowHoldItemTypeSelection
2. Add a couple item-type constrained holds
3. See them in the holds history page
=> SUCCESS: Item type column shows
4. Enable OPACHoldsHistory
5. Look for them in the OPAC
=> FAIL: The item type column doesn't show
6. Apply this patch
7. Repeat 5
=> SUCCESS: The column shows! The item type is described!
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28776: Warns from GetItemsInfo when biblio marked as serial
Nick Clemens [Wed, 28 Jul 2021 13:32:24 +0000 (13:32 +0000)]
Bug 28776: Warns from GetItemsInfo when biblio marked as serial

GetItemsInfo sorts the items using serial fields if the biblio is
defined as a serial

The fields may not be defined. We can add a fallback to blank in this case

To test:
1 - Mark a record with items as serial in the marc (942$s)
2 - At least one of the items should have no enumchron defined
3 - Load the detail page
4 - Warns in logs:
    [WARN] Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/C4/Items.pm line 811.
5 - Apply patch and restart all
6 - Reload the details page
7 - No more warns

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28873: Fix age displayed in db_dependent/Koha/Patrons.t
Fridolin Somers [Tue, 17 Aug 2021 20:19:29 +0000 (10:19 -1000)]
Bug 28873: Fix age displayed in db_dependent/Koha/Patrons.t

In test suite db_dependent/Koha/Patrons.t actually shows :

    1..10
    ok 1 - Patron with no dateofbirth is always valid for any category
    ok 2 - Today=2020-02-28, dob=2015-03-01, is 5, should be valid=0
    ok 3 - Today=2020-02-28, dob=2015-02-27, is 5, should be valid=1
    ok 4 - Today=2020-02-28, dob=2009-02-28, is 11, should be valid=0
    ok 5 - Today=2020-02-28, dob=2015-02-28, is 7, should be valid=1
    ok 6 - Today=2020-02-28, dob=2009-02-27, is 11, should be valid=0
    ok 7 - Today=2020-02-28, dob=2016-08-27, is 3, should be valid=0
    ok 8 - Today=2020-02-28, dob=2009-03-01, is 11, should be valid=1
    ok 9 - Today=2020-02-28, dob=2007-08-27, is 12, should be valid=0
    ok 10 - Today=2020-02-28, dob=2015-02-28, is 5, should be valid=1

Some ages are incorrect :

1) dob=2009-03-01, is 11
=> it is age 10
so valid=1 in category 5 to 10

2) dob=2015-03-01, is 5
=> it is age 4
so valid=0 in category 5 to 10

3) dob=2015-02-28, is 7
=> this date of birth is already tested
I suppose here dob is wrong, age wanted is 7 in the middle of age restrictions.
so dob=2013-02-28

This patch fixes ages.
Also adds the category code 'AGE_5_10' in messages to display age limits

Test plan :
Run prove -v t/db_dependent/Koha/Patrons.t without and with patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28802: Untranslatable strings in browser.js
Fridolin Somers [Tue, 3 Aug 2021 08:57:10 +0000 (22:57 -1000)]
Bug 28802: Untranslatable strings in browser.js

File koha-tmpl/intranet-tmpl/js/browser.js is not parsed by translation
process, which uses koha-tmpl/intranet-tmpl/prog/js/**/*.js
We must move it to prog/js.

Test plan :
1) Perform a search on staff interface
2) Click on a result
3) Check you see records browser

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28850: (QA follow-up) Add "patrons with fines" for clarification
Katrin Fischer [Tue, 17 Aug 2021 09:15:50 +0000 (09:15 +0000)]
Bug 28850: (QA follow-up) Add "patrons with fines" for clarification

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28850: Reword AllFinesNeedOverride
Andrew Fuerste-Henry [Fri, 13 Aug 2021 16:20:43 +0000 (16:20 +0000)]
Bug 28850: Reword AllFinesNeedOverride

To test:
Apply patch, look up AllFinesNeedOverride, confirm it now says that checkouts will be blocked via the web-based selfcheck and SIP.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Explicitely return from DB revs to avoid warnings
Jonathan Druart [Wed, 18 Aug 2021 10:57:51 +0000 (12:57 +0200)]
Bug 25078: Explicitely return from DB revs to avoid warnings

% perl -wc installer/data/mysql/atomicupdate/skeleton.pl
Useless use of anonymous hash ({}) in void context at installer/data/mysql/atomicupdate/skeleton.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Fix Letters/TemplateToolkit.t
Jonathan Druart [Mon, 16 Aug 2021 13:17:24 +0000 (15:17 +0200)]
Bug 24387: Fix Letters/TemplateToolkit.t

We must cast to date or the comparison does not work

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Fix AdditionalContents.t
Jonathan Druart [Mon, 16 Aug 2021 11:59:09 +0000 (13:59 +0200)]
Bug 24387: Fix AdditionalContents.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 24387: Fix one remaining occurrence of KohaNews
Jonathan Druart [Mon, 16 Aug 2021 11:54:46 +0000 (13:54 +0200)]
Bug 24387: Fix one remaining occurrence of KohaNews

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Add exec flags
Jonathan Druart [Mon, 16 Aug 2021 11:56:56 +0000 (13:56 +0200)]
Bug 25078: Add exec flags

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoRevert "Bug 26860: facets.inc refactor availability facet"
Jonathan Druart [Mon, 16 Aug 2021 10:24:58 +0000 (12:24 +0200)]
Revert "Bug 26860: facets.inc refactor availability facet"

This reverts commit 63d6c1d8c583a734bd289f01a423133f0c56bb0e.

3 years agoBug 25078: Don't process db revs if updatedatabase.pl failed
Jonathan Druart [Mon, 16 Aug 2021 09:44:14 +0000 (11:44 +0200)]
Bug 25078: Don't process db revs if updatedatabase.pl failed

The updatedatebase stops when something wrong happens, we should not
continue to process the new DB revs (db_revs dir) in that case.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Move skeleton file
Jonathan Druart [Mon, 16 Aug 2021 09:35:28 +0000 (11:35 +0200)]
Bug 25078: Move skeleton file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Keep atomic updates in "atomicupdate" dir
Jonathan Druart [Mon, 2 Aug 2021 09:06:57 +0000 (11:06 +0200)]
Bug 25078: Keep atomic updates in "atomicupdate" dir

The atomicupdate directory will contain all the atomic update files (old
and new version).
That will ease job for the RM and RMaints, no file (except skeletons)
must be in this directory before push.

This patch also fixes an inconsistency we had: the atomic update was run
before the other db revs on the UI but after when the CLI script was
used.

Now we make sure that the CLI does not deal with the atomic update files
when called from the installer (UI)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Fix 'Wide character' from CLI
Jonathan Druart [Fri, 16 Jul 2021 08:01:29 +0000 (10:01 +0200)]
Bug 25078: Fix 'Wide character' from CLI

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Fix encoding issue with db_revs output
Julian Maurice [Thu, 8 Jul 2021 14:01:41 +0000 (16:01 +0200)]
Bug 25078: Fix encoding issue with db_revs output

From `perldoc -f open`:

The scalars for in-memory files are treated as octet strings: unless the
file is being opened with truncation the scalar may not contain any code
points over 0xFF.

So $out need to be decoded first in order to be used in other Perl
strings

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Close open filehandle
Julian Maurice [Thu, 8 Jul 2021 14:01:38 +0000 (16:01 +0200)]
Bug 25078: Close open filehandle

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: (follow-up) Update 'NewVersion' for output_version changes
Martin Renvoize [Wed, 23 Jun 2021 11:16:11 +0000 (12:16 +0100)]
Bug 25078: (follow-up) Update 'NewVersion' for output_version changes

This patch updates the NewVersion compatability method to add arrayref
description handling to split it into description + report.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Separate update "report" from its description
Julian Maurice [Mon, 14 Jun 2021 16:44:06 +0000 (18:44 +0200)]
Bug 25078: Separate update "report" from its description

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Re-introduce NewVersion
Jonathan Druart [Tue, 15 Jun 2021 09:38:51 +0000 (11:38 +0200)]
Bug 25078: Re-introduce NewVersion

This is ugly, we re-add the code we removed in the previous patch.

We need to continue supporting "old" versions.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Put db revs into different files to handle them better
Jonathan Druart [Fri, 29 Jan 2021 11:50:27 +0000 (12:50 +0100)]
Bug 25078: Put db revs into different files to handle them better

This patch suggests to stop using updatedatabase.pl to add new DB revs.
Each DB rev will be in a separate pl files (installer/data/mysql/db_revs).

The switch should ideally be done from 21.06.00.000.

Each DBrev is executed in a try block and a transaction. If something
went wrong, the whole DB rev is rolled back.

Why do /var/log/koha/kohadev/updatedatabase_*.log (not -error) contain
    Status: 500
    Content-type: text/html

    <h1>Software error:</h1>
etc.

Test plan:
- git checkout c4b4db21d25 (master on 2021-07-08)
- Set the version syspref to 21.0500000:
    > update systempreferences set value="21.0500000" where variable="version";
- Apply "Bug 25078: [DO NOT PUSH] DB revs for testing" (restart_all)
- Read the different DBrevs created as examples
- Make sure the different use cases are covered
- execute the updatedatabase script (CLI)
- Set the version syspref to 21.0500000
- Update the DB from the UI
- Set the version syspref to 21.0500000
- execute the updatedatabase script with the --force parameter (for
testing purpose)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 25078: Move DB revs up to 21.06.00.016
Jonathan Druart [Thu, 8 Jul 2021 07:43:58 +0000 (09:43 +0200)]
Bug 25078: Move DB revs up to 21.06.00.016

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 26761: Use aria-disabled attribute in OPAC cart for disabled links
Owen Leonard [Wed, 21 Oct 2020 11:15:50 +0000 (11:15 +0000)]
Bug 26761: Use aria-disabled attribute in OPAC cart for disabled links

This patch adds "aria-disabled" attributes to disabled links in the
Cart, and adds JS to change the value from "true" to "false" when the
links are enabled. The goal is to make the interface more informative to
users of screen readers.

To test, apply the patch and add some items to the Cart in the OPAC.

- Inspect the markup of controls like "Remove", "Place hold," etc. Each
  should look disabled (grey) and has the correct aria-disabled
  attribute value.
- Select one or more checkboxes. The links should be come active, and
  the aria-disabled attribute shoulk now be "false."
- Deselect all checkboxes. The links should now be disabled.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: Compiled CSS
Jonathan Druart [Mon, 16 Aug 2021 08:29:15 +0000 (10:29 +0200)]
Bug 10902: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: Use prefetch and dbic rs
Jonathan Druart [Mon, 16 Aug 2021 08:49:48 +0000 (10:49 +0200)]
Bug 10902: Use prefetch and dbic rs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: (follow-up) Account for singleBranchMode
Owen Leonard [Tue, 10 Aug 2021 11:56:45 +0000 (11:56 +0000)]
Bug 10902: (follow-up) Account for singleBranchMode

This patch checks singleBranchMode before highlighting the current
branch in search results.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: (follow-up) Fix patron search autocomplete
Owen Leonard [Mon, 9 Aug 2021 11:43:32 +0000 (11:43 +0000)]
Bug 10902: (follow-up) Fix patron search autocomplete

The circulation search autocomplete (e.g. from circulation.pl search
header) was corrected in the previous patch to include library name
instead of branchcode. This patch makes the same correction for patron
search autocomplete (e.g. from members-home.pl search header).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: (QA follow-up) Show library name instead of code
Owen Leonard [Fri, 6 Aug 2021 13:48:42 +0000 (13:48 +0000)]
Bug 10902: (QA follow-up) Show library name instead of code

This patch modifies the patron search autocomplete so that library name
is shown instead of library code.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 10902: Highlight patrons from logged-in library in patron searches
Owen Leonard [Tue, 30 Mar 2021 16:21:06 +0000 (16:21 +0000)]
Bug 10902: Highlight patrons from logged-in library in patron searches

This patch alters a few different patron search interfaces so that
patrons from the currently-logged-in library are highlighted in a way
that differentiates them from other patrons.

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

- In Administration -> System preferences, make sure the
  PatronAutoComplete preference is enabled.
- In the "Check out" tab in the header, type a partial patron name which
  will return multiple results and wait for the autocomplete menu to
  appear..
  - Patrons in the autocomplete results should show the branchcode, and
    patrons from the currently-logged-in library should be highlighted
    in green.
- Submit your partial name in the "check out" tab.
  - In the search results the branch name of patrons from the
    currently-logged-in library should be similarly highlighted.
- Go to patrons browse for patrons. These results should be highlighted
  as in the previous steps.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3 years agoBug 28819: (follow-up) Use stacked icons for different searches
Owen Leonard [Fri, 13 Aug 2021 17:00:37 +0000 (17:00 +0000)]
Bug 28819: (follow-up) Use stacked icons for different searches

This patch modifies the staff interface home page so that the "Advanced
search" and "Item search" links are differentated using stacked Font
Awesome icons.

To test, apply the patch and view the staff interface home page. The
icons associated with advanced and item searches should be different:

- The Advanced search link should have a magnifying glass icon on top of
  a grey book icon.
- The Item search link should have a magnifying glass icon on top of a
  grey list icon.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>