koha.git
6 years agoBug 18907: Build has deprecating message
Mark Tompsett [Thu, 6 Jul 2017 15:42:43 +0000 (15:42 +0000)]
Bug 18907: Build has deprecating message

Following the instructions at:
https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way
Receiving the following message in the build:
dpkg-source: warning: relation < is deprecated: use << or <=

This patch tweaks the list-deps.
git diff origin/master -- debian/list-deps shows just the one line
changed from < to << as per the messages suggestion and eythian's
suggestion on IRC:
http://irc.koha-community.org/koha/2017-07-06#i_1950698

The control file can be regenerated from the command-line:
./debian/update-control
However, it will be attached separately.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d8a16dd89a2853837e87eec1b1ec0d419ede1b55)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 12497: Fix OPAC search history reachable by URL even when disabled
Victor Grousset [Fri, 24 Nov 2017 11:02:47 +0000 (12:02 +0100)]
Bug 12497: Fix OPAC search history reachable by URL even when disabled

Test plan:
1. Set EnableOpacSearchHistory syspref to "Keep"
2. Make a search in the OPAC
3. Go to /cgi-bin/koha/opac-search-history.pl
4. Set the EnableOpacSearchHistory syspref to "Don't keep"
5. Refresh the OPAC page to show that history is still accessible
6. Apply the patch
7. Refresh the OPAC page, you should end on the 404 page
8. Set EnableOpacSearchHistory syspref to "Keep"
9. Go to /cgi-bin/koha/opac-search-history.pl which should be reachable

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b90824527b47e78e56e2f602199481325beeec15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 12497: Fix search history non-accessible when OPAC was private
Victor Grousset [Thu, 23 Nov 2017 15:03:14 +0000 (16:03 +0100)]
Bug 12497: Fix search history non-accessible when OPAC was private

(when the user didn't have the "borrowers" permission)

Test plan:
1. Set syspref "OpacPublic" to false (Disable)
2. Log in as a user without any permission
3. Try to access the search history. The link is next to "Log out"
4. Then you should see "Access denied"
5. Apply this patch
6. Refresh the page
7. Then you should see the search history

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit adb37ce8cf10fee1c81ee35d703ec3a81c82697d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19674: Broken indicators of changed fields in manage staged MARC records template
Owen Leonard [Tue, 21 Nov 2017 16:17:32 +0000 (16:17 +0000)]
Bug 19674: Broken indicators of changed fields in manage staged MARC records template

This patch returns some CSS to the manage staged MARC records template
which was incorrectly removed by Gug 16538.

To test, apply the patch and go to Tools -> Staged MARC management.
Choose a staged MARC file.

Changing any of the <select> fields in the first section should cause a
label to appear showing that the selection has changed, along with a
link to reset the option to its original state. Clicking 'Reset' should
make the label and the link disappear.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ca95a10d90ebfec7a82b6224569f29df6059fd5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19595: Clicking plugin link does not fill item's date acquired field
Owen Leonard [Fri, 10 Nov 2017 12:59:58 +0000 (12:59 +0000)]
Bug 19595: Clicking plugin link does not fill item's date acquired field

This patch updates the dateaccessioned plugin for the item edit form to
return functionality which was removed in a previous patch.

To test, apply the patch and open an item for editing. Clicking the
"..." link next to the "Date acquired" field should insert the current
date, overwriting the existing date.

Open a blank item add form. Putting the cursor in the "Date acquired"
field should automatically insert the current date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a comment line in set_to_today.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 18897829e4bd585d5adb16681ce6dd648b368c66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19724: DBRev 17.05.06.001
Fridolin Somers [Wed, 20 Dec 2017 11:25:32 +0000 (12:25 +0100)]
Bug 19724: DBRev 17.05.06.001

6 years agoBug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata
Nick Clemens [Thu, 14 Dec 2017 12:01:38 +0000 (12:01 +0000)]
Bug 19724: Add timestamp to biblio_metadata and deletedbiblio_metadata

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
We need to know the last modification time of the MARC record for some
features (like OAI-PMH parameters 'from' and 'until' for instance)

This patch only adds the missing column in biblio_metadata and
deletedbiblio_metadata

Test plan:
1. Run updatedatabase.pl
2. Verify that both tables have the new column, its value should be the
   greatest timestamp value from the corresponding biblio and
   biblioitems table entries
   You can verify with the following SQL query:
     SELECT b.biblionumber, b.timestamp as biblio_ts,
     bi.timestamp as biblioitems_ts, m.timestamp as biblio_metadata_ts
     FROM biblio_metadata m
     LEFT JOIN biblioitems bi ON (bi.biblionumber = m.biblionumber)
     LEFT JOIN biblio b ON (b.biblionumber = m.biblionumber);

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druat <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4db611b5dc83e2d865aaba4afe04cd5aaa89904e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19638: Remove false positive obsolete reports (auth_header.marcxml)
Jonathan Druart [Mon, 4 Dec 2017 18:39:48 +0000 (15:39 -0300)]
Bug 19638: Remove false positive obsolete reports (auth_header.marcxml)

Bug 17898 tries to help users identify reports affected by the move of marcxml to the biblio_metadata table, however, the auth_header table still uses the column name 'marcxml' and so reports as needing updated though it doesn't.

C4::Reports::Guided::convert_sql only converts if the sql query contain biblioitems and marcxml.
We should use the same regexp in the controler script.

Test plan:
Use a sql report that use auth_header.marcxml (see https://wiki.koha-community.org/wiki/SQL_Reports_Library)
After the this the report should not be longer marked as obsolete on the report list view

Replicated bug with the following SQL:
select marcxml from auth_header;

Patch applied correctly and functioned as expected.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fff0065785b0cd7e664eac3285a5f051cb94871a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 10222: Correct and expand to other languages
Mark Tompsett [Mon, 23 Oct 2017 14:00:53 +0000 (14:00 +0000)]
Bug 10222: Correct and expand to other languages

This added column names, and reformated to be a bit more readable.
This also adds this change to de-DE, es-ES, fr-CA, and nb-NO.
While there was printer_profiles for it-IT, the Italian file seems
to not use the same numbers, and does not visibly look like it needs
these changes.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fdde85a52164168d998d995ce41b4421b4a3ffbb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 10222: Error when saving Demco label templates
Chris Nighswonger [Thu, 16 Apr 2015 16:07:29 +0000 (12:07 -0400)]
Bug 10222: Error when saving Demco label templates

This patch fixes a bug whereby if you open either of the
Demco label templates (loaded by the sample data) and
click "save" without making any changes you will get an
error:

Can't bless non-reference value at C4/Creators/Profile.pm
line 92.

It also fixes another minor bug in the creator sample data.

To test:

1. Install all sample data in a clean database.
2. In the label tool, edit either of the Demco label templates.
3. Save the template and observe the error mentioned above.
4. Drop and recreate the database.
5. Apply the patch.
6. Repeate steps 1-3 and note the successful save.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d3eef921f501634d3656b9d08abafa55b3ed6c07)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18990: Overdue Notices are not sending through SMS correctly
Nick Clemens [Fri, 28 Jul 2017 11:58:46 +0000 (11:58 +0000)]
Bug 18990: Overdue Notices are not sending through SMS correctly

Bug 18478 fixed sms via email problems under the assumption that
to_address was either smsalertnumber or blank.

It seems overdues set the to_address to email. This patch changes the
code to enforce that an sms sent with emial driver will use the
smsalertnumebr and provider defined for the borrower, regardless of what
is set in the queue

To test:
 1 - Define a messaging prefs for a patron to recieve hold notices via
  SMS
 2 - Ensure you have defined an SMS message for an overdue letter
 3 - Set an SMS alert number for patron
 4 - Set the SMS::Send driver to 'Email'
 5 - Checkout an item as overdue to trigger notice above
 6 - Run overdue_notices.pl
 6 - Check the db and note the address is email
 7 - run process_message_queue.pl
 8 - Check db - address is email followed by service provider
 9 - Apply patch
 10 - repeat
 11 - Message to_address should be populated with smsalertnumber

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a7aab6d30b0a14c58bc0ab355ff284bd60750103)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19643: Pagination buttons on staged marc management are stacking instead of inline
Owen Leonard [Thu, 16 Nov 2017 19:19:33 +0000 (19:19 +0000)]
Bug 19643: Pagination buttons on staged marc management are stacking instead of inline

This patch modifies the template for staged MARC import management to
correct a problem with the style of pagination links.

To test you must have more than 25 staged imports. Go to Tools -> Staged
MARC management. The pagination links, both at the top and the bottom,
should look correct (use multi-page SQL report results for reference).

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e0c3780634ef35ad937f69721aaeafa7bf9a4fee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19681: Correct result count formatting
David Bourgault [Wed, 22 Nov 2017 18:58:21 +0000 (13:58 -0500)]
Bug 19681: Correct result count formatting

This simply passes the missing information to the template.

Test plan:
0) Apply patch
1) Go to Tools > Label creator > New > Label batch
2) Press 'Add items'
3) Do a search that will return few items
4) The result count will read "Results 1 through X of X"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ef8c92ce21e1ea983da3445045236939b1de90fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19692: fix unclosed div in opac-shelves.tt
Simon Pouchol [Fri, 24 Nov 2017 15:53:49 +0000 (16:53 +0100)]
Bug 19692: fix unclosed div in opac-shelves.tt

Test plan:
1. set syspref OpacKohaUrl to "Show"
2. Log into the OPAC
3. /cgi-bin/koha/opac-shelves.pl
4. Notice that "Powered by Koha" is not in the footer in this page.
  When on the other tabs it's in the footer (out of .main)
5. Apply this patch
6. Notice that "Powered by Koha" now in the footer in the "your lists" page

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 30f2b40f3c408a1f81eae57c5012e6283eccb3d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19533: Hold pulldown for itemtype is empty if hold placement needs override
Kyle M Hall [Thu, 26 Oct 2017 11:35:53 +0000 (07:35 -0400)]
Bug 19533: Hold pulldown for itemtype is empty if hold placement needs override

Test Plan:
1) Enable AllowHoldPolicyOverride
2) Enable AllowHoldItemTypeSelection
3) Create a situation where adding a hold for a patron would trigger a tooManyReserves
   warning.
4) Note the itemtype pulldown is empty
5) Apply this patch
6) Reload the page
7) Itemtype pulldown should have values

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e2d05f3fdfde20977ca5525510e8f4c0daa964f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18833: Plugin unimarc_field_210c pagination error
Fridolin Somers [Wed, 21 Jun 2017 11:05:40 +0000 (13:05 +0200)]
Bug 18833: Plugin unimarc_field_210c pagination error

In plugin unimarc_field_210c, the editors search results have pagination.
First page works but not other pages.

The main problem whas mainly because $startfrom var was missused. It is defined in C4::Output::pagination_bar as page number.
This patch corrects by using a $offset var.
Also removes dead code, obsoleted by using C4::Output::pagination_bar.
Also changes hardcoded results per page from 19 to 20.

Test plan :
- Use UNIMARC catalogue
- Define in framework value builder unimarc_field_210c on 210$c
- Create autority type EDITORS with heading 200$b
- Create 22 authorities of that type
- Index those new authorities
- Create a new biblio record
- Click on 210$c plugin
- Click on "Search"
- You see 20 results
- Click on page 2
=> Without patch you get empty table
=> With patch you get 2 results
- Check that you see "Results 21 to 22 of 22"
- Delete 2 autorities and retest

Works as intended.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 455d94eec9c41f7bad718ac62c2367bea6202452)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19640: fix OPAC IdRef webservice display
Fridolin Somers [Thu, 16 Nov 2017 14:22:48 +0000 (15:22 +0100)]
Bug 19640: fix OPAC IdRef webservice display

The OPAC webservice IdRef display was broken.
The call returns results but citations where empty.
Maybe the webservice has changed.

This patch corrects the fetch of datas in result.
Also fixes a small HTML missing tag tr.
Also adds a comment with link to official doc :
http://documentation.abes.fr/aideidrefdeveloppeur/index.html#MicroWebBiblio

Test plan :
1) Enable system preference IdRef
2) Choose an existing PPN like 032581270
3) Look result on : https://www.idref.fr/services/biblio/032581270.json
4) Call in OPAC website : /cgi-bin/koha/opac-idref.pl?unimarc3=032581270
5) Without patch you see only one role containing empty rows
6) With patch you see all roles with correct rows

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: removed unused @unimarc3 (not to be confused with $unimarc3).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 803c70cef8e88dae25394ca7d2fc645f1b514ad8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19646: (QA follow-up) Fix tab character
Marcel de Rooy [Fri, 24 Nov 2017 08:27:14 +0000 (09:27 +0100)]
Bug 19646: (QA follow-up) Fix tab character

Resolve qa tools warning:
 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_linking_section.tt
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 172)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 58b6f1cd9e466c375526b01b801bb5de61e37706)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19646: fix value_builder marc21_linking_section template
Fridolin Somers [Fri, 17 Nov 2017 12:38:06 +0000 (13:38 +0100)]
Bug 19646: fix value_builder marc21_linking_section template

When using marc21_linking_section cataloging plugin, you get the error :
Template process failed: undef error - The method selected is not
covered by tests! at /home/koha/src/C4/Templates.pm line 122.

It commes from [% IF ( itypeloo.selected ) %], selected is not defined
in itypeloo.

This patch removes this condition because all item types are fetched
from database, there is not one selected. It sets "All item types" as
selected. Also correctes two errors in HTML : ending form and div,
"<a_class=" instead of "<a class="

Test plan :
1) Use a MARC21 database
2) Define marc21_linking_section cataloging plugin in framework, on
   773$t for example
3) Create a new biblio record
4) Click on icon in 773$t
5) Check plugin works fine

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5a852cadaf9fddc38618e22d4fad1e1b7a3f9120)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19683: Fix authority types in tools/export template
David Bourgault [Wed, 22 Nov 2017 19:35:27 +0000 (14:35 -0500)]
Bug 19683: Fix authority types in tools/export template

Fixes the bug by correcting the variable names in the template.

To test:
1) Tools > Export > Export authority records
2) Authority Types dropdown is not empty

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Changing the export script and unblessing is not needed.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 47f65da22e63a35fdecf6857016983869d6855cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19190: [Follow-up] Do not rely on the return of ModItem
Marcel de Rooy [Mon, 28 Aug 2017 10:13:26 +0000 (12:13 +0200)]
Bug 19190: [Follow-up] Do not rely on the return of ModItem

touch_all_items looks at the return of ModItem to determine if the
operation was successful. But ModItem does not return a meaningful
value. This patch puts the ModItem call in an eval and looks at $@.

Test plan:
Run touch_all_items with a where condition and verbose option.
Put print 1/0; at the end of ModItem.
Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1fc0b652548510ef00a7e072cdf923357d5610aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19190: Silly calculation of average time in touch_all scripts
Marcel de Rooy [Mon, 28 Aug 2017 09:59:19 +0000 (11:59 +0200)]
Bug 19190: Silly calculation of average time in touch_all scripts

When you want to calculate average time, do not divide count by time :)

Test plan:
Run the script with a where condition and verbose option and see that
the average time is meaningful.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b3b86caaa5473ea51dc7223146e4c7cf0db431dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19655: Make To.json escape doesn't escape newlines to create valid JSON
Kyle M Hall [Mon, 20 Nov 2017 16:05:35 +0000 (11:05 -0500)]
Bug 19655: Make To.json escape doesn't escape newlines  to create valid JSON

JSON does not allow real line-breaks. If a field contains them and they are not escaped, a JSON parser will be unable to convert the stringified JSON back into an object.

This is clearly exemplified by the guarantor search, where a multi-line note on the guarantor's record will break the ability to select that guarantor.

Test Plan:
1) Create Patron A with a "Circulation note" that has multiple lines in it
2) Create Patron B
3) Attempt to set Patron A to be the guarantor for Patron B
4) Note selecting the patron does nothing
5) Apply this patch
6) Repeat step 3
7) Selecting the guarantor now works!

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cd9240c362336e390eed01acf3630f33e73825f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19655: Add tests
Jonathan Druart [Sun, 26 Nov 2017 15:55:27 +0000 (12:55 -0300)]
Bug 19655: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6a4b36bc3a186adb07679c2a3549e69974e02c18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoUpdate release notes for 17.05.06 release v17.05.06
Koha User [Wed, 22 Nov 2017 14:18:41 +0000 (15:18 +0100)]
Update release notes for 17.05.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoMerge remote-tracking branch 'translate/17.05.06-translate-20171122' into 17.05.x
Fridolin Somers [Wed, 22 Nov 2017 14:02:03 +0000 (15:02 +0100)]
Merge remote-tracking branch 'translate/17.05.06-translate-20171122' into 17.05.x

6 years agoIncrement version for 17.05.06 release
Fridolin Somers [Wed, 22 Nov 2017 13:58:57 +0000 (14:58 +0100)]
Increment version for 17.05.06 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoTranslation updates for Koha 17.05.06
root [Wed, 22 Nov 2017 13:56:56 +0000 (10:56 -0300)]
Translation updates for Koha 17.05.06

6 years agoBug 19503: Duplicating a dropdown menu subfield yields an empty subfield tag
Andreas Roussos [Fri, 20 Oct 2017 19:58:27 +0000 (22:58 +0300)]
Bug 19503: Duplicating a dropdown menu subfield yields an empty subfield tag

While editing a record in the staff client, if you clone a repeatable
dropdown subfield the cloned subfield's tag is empty. This can result
in data loss if the record is saved, re-opened, and saved yet again.
This patch (originally written by Sophie MEYNIEUX for bug 17818) fixes that.

Test plan:
0) [PREREQUISITE] In your MARC framework (Home > Administration > MARC
   bibliographic framework) ensure that you have at least one subfield
   of a particular tag linked to an authorised value (e.g. in UNIMARC,
   tag 700 subfield 4 is 'Relator Code' and can be linked to CCODE for
   testing purposes). This is so that the relevant subfield will be a
   dropdown menu and not a textbox.
1) In the Staff Client, edit an existing record or create a new one.
   Then, try to clone any subfield that is a dropdown menu. Observe
   that the cloned subfield's tag is empty.
2) Apply the patch.
3) Hit CTRL-F5 in your browser (to ensure cataloging.js is re-loaded)
   and try to clone a dropdown menu subfield again. This time the tag
   is cloned as well.

Working as intended.

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=16503

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4f2d59e67b6d938ca2798fe8b7fc3ec6eda1d253)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18884: Advanced search on staff client, Availability limit not properly limiting
David Cook [Tue, 10 Oct 2017 01:05:16 +0000 (12:05 +1100)]
Bug 18884: Advanced search on staff client, Availability limit not properly limiting

Patch applies and functions as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 48be40d1bfaf13a70b6bf4918e885d9158e25f66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19487: Refetch the object to get up-to-date values
Jonathan Druart [Fri, 20 Oct 2017 18:56:20 +0000 (15:56 -0300)]
Bug 19487: Refetch the object to get up-to-date values

This has been raised by failures on t/db_dependent/Circulation/issue.t
(thanks tests!)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 850243ee2ec66a4b569d29ed84423f09c0001690)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19487: Fix MarkIssueReturned.t
Jonathan Druart [Thu, 19 Oct 2017 12:02:20 +0000 (09:02 -0300)]
Bug 19487: Fix MarkIssueReturned.t

MarkIssueReturned must now return directly if the issue does not exist.
We then check if the anonymous patron configuration is correct.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 60bb936bc28b73f1653207cce36f432dec094017)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19487: Do not return an item if not checked out
Jonathan Druart [Wed, 18 Oct 2017 16:59:56 +0000 (13:59 -0300)]
Bug 19487: Do not return an item if not checked out

To recreate:
1 - Manually add a lost fine to a ptron and include a barcode
2 - Attempt to write off the fine
3 - Internal server error
4 - Checkout an item and mark lost to checkin and fine
5 - Attempt to write off line
6 - Internal server error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7b5c1fce5880f8592c5a9dbd40614a760bb2607e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19495: Automatic report conversion needs to do global replace on 'biblioitems...
Kyle M Hall [Fri, 20 Oct 2017 14:49:38 +0000 (10:49 -0400)]
Bug 19495: Automatic report conversion needs to do global replace on 'biblioitems' and 'marcxml'

Bug 17898 provides a way of converting reports that use biblioitems.marcxml so that they will use biblio_metadata.metadata instead.

This only works with reports that do not refer to other columns in the biblioitems table. This is a known limitation. It means that we should be able to do a substitution of every occurrence of biblioitems with biblio_metadata, and every occurrence of marcxml with metadata.

Unfortunately, we're not doing a global replace, we're only replacing the first occurrence.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Reports/Guided.t

All tests successful.
Files=1, Tests=9, 10 wallclock secs ( 0.11 usr  0.01 sys +  2.85 cusr  0.25 csys =  3.22 CPU)
Result: PASS

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d6a1f2ab242474c9e477c2f6d4df5c316a4ef448)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their...
David Kuhn [Tue, 6 Jun 2017 16:38:07 +0000 (09:38 -0700)]
Bug 18616 - The "Add forgot password link to OPAC" should allow patrons to use their library card number in addition to username

Allow patrons to enter either their library card number or user name in the "Log in" box for password recovery.

Most patrons at our library use their card number to log in and are unaware of what their userid is. However there are some who have set a

customized userid and would prefer to use that. This patch would allow either to be entered for password recovery.

To test:
1. Enable the password recovery feature.
2. In the OPAC, click on "Forgot you password?" link and enter a valid library card number.
3. The error message "No account found with the provided information" appears.
4. Apply the patch.
5. Repeat step 2. The recovery email is now sent.

Note: Moved patch from 16711 back here and re-tested.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e29163af4cde7ce33060716091726e6fa2eef65e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly
Jonathan Druart [Fri, 6 Oct 2017 15:30:18 +0000 (12:30 -0300)]
Bug 19423: Prevent DecreaseLoanHighHolds.t to fail randomly

CanBookBeIssued returns STATS if categorycode is X

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 090b450a502340e3d03b5ee6a075cc92e647aada)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19193: When displaying the fines of the guarantee on the guarantor account, price...
Nick Clemens [Mon, 28 Aug 2017 16:27:41 +0000 (16:27 +0000)]
Bug 19193: When displaying the fines of the guarantee on the guarantor account, price is not in correct format

1 - Have a patron with guarantees
2 - Charge some fines to the guarantees
3 - View the patron
4 - Fines are displayed unformatted
5 - Apply patch
6 - Refresh
7 - Fines should now be formatted correctly

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0d124e1bc322e6823c192c51effa0f3eecb2ac1f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17664: Silence non-zebra warnings in t/db_dependent/Search.t
Mark Tompsett [Mon, 21 Nov 2016 17:08:52 +0000 (12:08 -0500)]
Bug 17664: Silence non-zebra warnings in t/db_dependent/Search.t

TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
   -- the spammy warnings (other than zebra index warnings) may
      already be fixed, but the mocked value was not realistic.
4) apply patch
5) prove t/db_dependent/Search.t
   -- notice only zebra index warnings.
6) run qa test tools

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5e63a3838102ee1fe8a1bc15640196ab611dbc89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19345: Add missing error flag to template
David Bourgault [Tue, 19 Sep 2017 17:37:54 +0000 (13:37 -0400)]
Bug 19345: Add missing error flag to template

Adds a missing error flag to the template->param { } call.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 078eb77451dacd6042b783edf6f89f5ab95732b5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19398: Format date of birth in circ patron search
Jonathan Druart [Mon, 2 Oct 2017 17:22:27 +0000 (14:22 -0300)]
Bug 19398: Format date of birth in circ patron search

When searching for a patron from the circulation tab, the results table
shows the date of birth unformatted.

Test plan:
Apply this patch, search for patrons in the circ tab and confirm that
the date of birth are correctly formatted according to the dateformat
syspref

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>
(cherry picked from commit 4edfc7900f6132c6771e4cfc820a5a3dc08d3e13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19386: [QA Follow-up] Remove some default values
Marcel de Rooy [Fri, 6 Oct 2017 09:39:42 +0000 (11:39 +0200)]
Bug 19386: [QA Follow-up] Remove some default values

In the meantime bug 19403 added default nulls for gonenoaddress, lost
and debarred. So these lines can be removed safely.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 12a754a703bc8f4279bb23aab09c39c0514b0a75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly
Jonathan Druart [Thu, 28 Sep 2017 20:31:04 +0000 (17:31 -0300)]
Bug 19386: Prevent t/db_dependent/SIP/Patron.t to fail randomly

Depending on the values used by TestBuilder, some tests from t/db_dependent/SIP/Patron.t can fail

    #   Failed test 'Not blocked without overdues when set to 'Don't block''
    #   at t/db_dependent/SIP/Patron.t line 55.
    #          got: '0'
    #     expected: '1'

    #   Failed test 'Not blocked without overdues when set to 'confirmation''
    #   at t/db_dependent/SIP/Patron.t line 61.
    #          got: '0'
    #     expected: '1'

    #   Failed test 'Not blocked without overdues when set to 'Block''
    #   at t/db_dependent/SIP/Patron.t line 67.
    #          got: '0'
    #     expected: '1'

Caused by this check in C4::SIP::ILS::Patron->new
110     for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) {
111         ($flags->{$_}) or next;
[...]
115         if ($flags->{$_}->{noissues}) {
116             foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
117                 $ilspatron{$toggle} = 0;    # if we get noissues, disable everything
118             }
119         }
120     }

Test plan:
Execute several times (50x?) these tests.
Without this patch they may fail
With this patch they must never fail

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6545cfe3f30789723b6f3c2e6e13af6e6c8e5fb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19405: Prevent api/v1/holds.t to fail randomly
Jonathan Druart [Tue, 3 Oct 2017 22:20:18 +0000 (19:20 -0300)]
Bug 19405: Prevent api/v1/holds.t to fail randomly

DBD::mysql::st execute failed: Duplicate entry 'cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvn' for key 'userid' [for Statement "INSERT INTO `borrowers` ( `branchcode`, `categorycode`, `flags`, `surname`, `userid`) VALUES ( ?, ?, ?, ?, ? )" with ParamValues: 0='N2ElsY9', 1='Kk8G', 2=80, 3='Test Surname', 4='cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvnnbgezJqmxqwz'] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
DBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry 'cEMggO40gdPLhcVXbpry8x0izO8lHr8NafFIBJwm0D1HgiXA57YR0a0VVxhQBzvn' for key 'userid' at /kohadevbox/koha/Koha/Object.pm line 121
[18:52:19] t/db_dependent/api/v1/holds.t

Reading the code I guess it happens if TestBuilder generates a userid with the size of borrowers.userid (75 chars). In that case the following lines are wrong:

$borrower->userid($nopermission->{ userid }."z");
$borrower2->userid($nopermission->{ userid }."x");
$borrower3->userid($nopermission->{ userid }."y");

The 3 patrons will have the same userid.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a1bf319829c9d44991daa2fcf2593420f8445c5b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19403: Prevent Circulation.t to fail randomly
Jonathan Druart [Tue, 3 Oct 2017 17:16:02 +0000 (14:16 -0300)]
Bug 19403: Prevent Circulation.t to fail randomly

Due to the number of test cases handle by CanBookBeIssued, Circulation.t
fails randomly. To prevent that it is better to set some values.
For instance if the patron is a statistical patron (category_type=X),
the subroutine will return a STATS flag.

This patch also adds a subroutine to the test file to display the keys
of $error, $question and $alert set by CanBookBeIssued.
It will be easier to track other random failures.

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

6 years agoBug 19403: Add some default values when building patrons for test
Jonathan Druart [Tue, 3 Oct 2017 17:15:47 +0000 (14:15 -0300)]
Bug 19403: Add some default values when building patrons for test

To avoid some tests to fail randomly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0b0059afb42aca25a3d10dfb372c2b26adcd6e41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 16726: Do not display "You searched for:" if not needed
Jonathan Druart [Tue, 3 Oct 2017 14:03:43 +0000 (11:03 -0300)]
Bug 16726: Do not display "You searched for:" if not needed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9dca694b04d0f5e5e0a307e0d5243ce61fb1ef79)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 16726: [FOLLOW-UP] Putting text in h1
Aleisha Amohia [Tue, 27 Jun 2017 04:14:47 +0000 (04:14 +0000)]
Bug 16726: [FOLLOW-UP] Putting text in h1

Works as outlined in test plan, search terms now appear at top as h1 as well

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f24e339dd603e015557107048d1a678293cb2e65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 16726: Clear text in syspref searchbox after submitting
Aleisha Amohia [Wed, 7 Jun 2017 02:09:36 +0000 (02:09 +0000)]
Bug 16726: Clear text in syspref searchbox after submitting

To test:
1) Go to Admin -> search for a system preference
2) Notice your search stays in the search box (this is inconsistent with
    search behaviour across Koha)
3) Apply patch and refresh page
4) Make another search
5) Confirm search still works as expected and search terms have been
cleared from search box
6) Confirm search terms show at the top of the results

Sponsored-by: Catalyst IT
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f10f6a19c53beb37e3ee0808ef6bb18bd88bef8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19392: Clean-up behind auth_values_input_www.t
Jonathan Druart [Fri, 29 Sep 2017 19:28:13 +0000 (16:28 -0300)]
Bug 19392: Clean-up behind auth_values_input_www.t

The two categories created by this test script are not removed

Test plan:
without this patch, the two authorised value categories 学協会μμ and
tòmas are not removed when the script finishes.
Now it does!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 269c21d984ef451dadcad2e803035cc1cd052825)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18422: (QA follow-up) Check if select2 is available before using it
Julian Maurice [Fri, 29 Sep 2017 13:52:50 +0000 (15:52 +0200)]
Bug 18422: (QA follow-up) Check if select2 is available before using it

cataloging.js might not always be loaded with select2.js, so we should
check its availability to prevent JS errors

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56a0aabc58a3475912894523cc92757153b967bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18422 - Add Select2 to authority editor
Oleg Vasylenko [Wed, 12 Apr 2017 07:45:48 +0000 (10:45 +0300)]
Bug 18422 - Add Select2 to authority editor

Overview:
Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a)
This patch adds Select2 to authority editor

Steps to Reproduce:
In authority editor repeat field that has select subfield

Actual Results:
Field does not repeat (copy is not created).
Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function»

Expected Results:
Field will repeat (copy is created)

Additional Information:
Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2f5a319b0a9f93dde7600decae5df989b842ca58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19307: Mock the AllowFineOverride preference to ensure expected result
Nick Clemens [Wed, 13 Sep 2017 12:06:50 +0000 (12:06 +0000)]
Bug 19307: Mock the AllowFineOverride preference to ensure expected result

To test:
 1 - Set 'AllowFineOverride' to allow
 2 - prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
 3 - 1 test fails
 4 - Apply patch
 5 - prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
 6 - All tests pass
 7 - Set 'AllowFineOverride' to 'Don't allow'
 8 - Tests should still pass

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1e2e1247c9bcd15514dc395be891a9a3607e5ea5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19344: DBRev 17.05.05.003
Fridolin Somers [Fri, 27 Oct 2017 12:11:11 +0000 (14:11 +0200)]
Bug 19344: DBRev 17.05.05.003

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables
Jonathan Druart [Tue, 19 Sep 2017 16:32:31 +0000 (13:32 -0300)]
Bug 19344: Reorder lang and login_attempts in the [deleted]borrowers tables

Due to a bad rebase, the borrowers and deletedborrowers table structure
may different from a new install and upgraded install
For new installs, the order was: lang, login_attempts
For upgraded installs, it was lang, last_seen, login_attempts

After this patch, the order must be:
- last_seen
- lang
- login_attempts

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e65ee89aae7802a31e47b5343c77f8a8a62d3a38)

6 years agoBug 19317: (bug 18966 follow-up) Remove leftover
Jonathan Druart [Thu, 14 Sep 2017 13:57:40 +0000 (10:57 -0300)]
Bug 19317: (bug 18966 follow-up) Remove leftover

Nothing important here, but this line should have been removed by bug
18966:

2177         # Update the fines
2178         $dbh->do(q|UPDATE accountlines SET issue_id = ? WHERE
issue_id = ?|, undef, $old_checkout->issue_id, $issue->issue_id);

The issue_id is now the same when moved from issues to old_issues. We do
not need to update the accountlines table.

No test plan here, you need to understand previous changes to validate
this patch.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0aec9e11d5fa355738cb3475ad72c4aad8efeafa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19315: [QA Follow-up] Trivial edits
Marcel de Rooy [Fri, 6 Oct 2017 06:21:23 +0000 (08:21 +0200)]
Bug 19315: [QA Follow-up] Trivial edits

Replace $subs->{bibnum} by $biblionumber on a following line.
The scalar in the boolean expression is not needed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f92328332380c805f83ca7f4aed2e828bd112778)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19315: Use bibnum instead of biblionumber in routing-preview.pl and add item...
Nick Clemens [Thu, 14 Sep 2017 12:23:09 +0000 (12:23 +0000)]
Bug 19315: Use bibnum instead of biblionumber in routing-preview.pl and add item check

To test:
 1 - Create a serial subscription attached to a record
 2 - Receive some issues
 3 - Edit the subscription
 4 - Go to serails collection
 5 - Try to print a routing list
 6 - You may or may not get the right serial
 7 - Additionally create a subscription attached to a bib with no items
 8 - Try to print a routing list for this serial
 9 - You will get 'Internal server error'
10 - Apply patch
11 - Print routing list for first serial
12 - You will always get the correct bib
13 - Print routing list for second serial
14 - You should no longer get an error

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 285d72a023daab65626a3ba0f90e20ccfad45c95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 16463: Replace discharge link with error message if user has checked out items
Aleisha Amohia [Wed, 30 Aug 2017 23:26:38 +0000 (23:26 +0000)]
Bug 16463: Replace discharge link with error message if user has checked out items

To test:
1) Ensure the useDischarge syspref is enabled
2) Check out an item to a borrower
3) Log in to the OPAC as this borrower
4) Click the 'ask for a discharge' link in the nav
5) Click the 'Ask for a discharge' link
6) Notice you cannot be discharged because you have checkouts
7) Apply the patch, click the 'ask for a discharge' link in the nav
8) Notice the link has been replaced with an appropriate error message
9) Attempt to force the discharge URL:
/cgi-bin/koha/opac-discharge?op=request
10) Notice the message and you cannot be discharged.
11) Confirm that when you check in your item, the discharge link shows
again and works as expected.

Sponsored-by: Catalyst IT
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 89528af3b089b2d17e3e7b212ea5608478f0ca84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19195: Do not explicitely force scalar context when unecessary
Jonathan Druart [Tue, 19 Sep 2017 14:57:10 +0000 (11:57 -0300)]
Bug 19195: Do not explicitely force scalar context when unecessary

These ones are already called in scalar context

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8088e3a3379fb8708226cabeadc190f7310d93f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19195: Preventing noisy warns when creating or editing a basket
Aleisha Amohia [Tue, 29 Aug 2017 05:02:29 +0000 (05:02 +0000)]
Bug 19195: Preventing noisy warns when creating or editing a basket

To test:
1) Open the koha intranet error log
2) Go to Acquisitions -> Find or create a vendor
3) Create a new basket, filling all fields
4) Notice warns in error log
5) Edit this basket
6) Notice warns in error log
7) Apply patch
8) Create another basket, confirm warns do not show
9) Edit this basket, confirm warns do not show

Sponsored-by: Catalyst IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e98c178c081d4bb5673e6b04bf817b9c452cba8c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18999: (17.05.x followup) Koha::Acquisition::Order is not an object yet
Fridolin Somers [Wed, 25 Oct 2017 09:03:00 +0000 (11:03 +0200)]
Bug 18999: (17.05.x followup) Koha::Acquisition::Order is not an object yet

6 years agoBug 18999: (QA followup) ModReceiveOrder expects a hashref
Tomas Cohen Arazi [Fri, 29 Sep 2017 14:29:24 +0000 (11:29 -0300)]
Bug 18999: (QA followup) ModReceiveOrder expects a hashref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2b343df13e6d154296cf968cb709aa910c58f336)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18999: Modified SQL query in GetBudgetSpent() in C4/Budgets.pm
Alex Buckley [Sat, 22 Jul 2017 19:19:44 +0000 (19:19 +0000)]
Bug 18999: Modified SQL query in GetBudgetSpent() in C4/Budgets.pm

Removed the SQL select condition 'AND closedate IS NOT NULL' because
this was not returning shippingcost values and it does not exist in the
SQL query to return the shipping cost in spent.pl

Also removed the retrieval of shipping cost and the associated addition
of item(s) cost and shipping cost in GetBudgetOrdered() in C4/Budgets.pm
to prevent the shipping costs being subtracted off the fund total twice

Test plan:
1. Go to Acquisition and create a currency, budget (make this value of
100), fund ( make this the value of 50), vendor (if
neccessary)

2. Create a basket and click 'Add to basket'

3. Add 2 items with the vendor price of 10

4. Click 'Receive shipment' and write in the shipment cost of 6

5. Click 'Finish receiving' and go back to Acquisitions

6. Notice the spent column value is 0.00 but if you click on the value then
the spent.pl page is displayed and shows that the shipment cost was 6.00

7. On the acquisition page also notice that the ordered column value is 26.00

8. Click on the name of the fund and notice the spent column value is
0.00 in the fund page table

9. Apply patch

10. Refresh acquisition page and notice that 6.00 is the value in the
Spent column and 20.00 is the value in the ordered column. Both of which
match the subtotal of the full-list tables displayed when you click on these
values

11. Also notice the spent value in the fund page table is 6.00

12 Observe the changes to GetBudgetSpent() and GetBudgetOrdered() C4/Budgets.pm and check they make sense

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit caef98c7f64e02bba996c4da4f862bb55a86171a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18999: (QA followup) Minor fixes for tests
Alex Buckley [Sat, 16 Sep 2017 07:52:25 +0000 (07:52 +0000)]
Bug 18999: (QA followup) Minor fixes for tests

Removed unneccessary declaration of $budget and changed
Koha::Acquisition::Order->new->insert into
Koha::Acquisition::Order->new->store as requested in tester feedback

Test plan:
1. Go into your koha-shell

2. set the PERL5LIB variable

3. Run t/db_dependent/Budgets.t

All tests should pass

Sponsored-by: Catalyst IT
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 90c5391b349a339b3f1fea1ebfeb044cfa76c8a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18999: Add regression tests
Alex Buckley [Fri, 18 Aug 2017 15:16:55 +0000 (15:16 +0000)]
Bug 18999: Add regression tests

Added regression test for GetBudgetSpent() and GetBudgetOrdered() into
the t/db_dependent/Budgets.t

Test plan:
1. Go into your koha-shell

2. set the PERL5LIB variable

3. Run t/db_dependent/Budgets.t

All tests should pass

Sponsored-by: Catalyst IT
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 776692f31167f32c1621168249a9ebfea2accc96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19425: (QA follow-up) Resolve 'push on reference experimental' warn
Marcel de Rooy [Fri, 13 Oct 2017 07:16:29 +0000 (09:16 +0200)]
Bug 19425: (QA follow-up) Resolve 'push on reference experimental' warn

QA tools reported for acqui/addorderiso2709.pl
   FAIL   valid: push on reference is experimental

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a16510a04af5c00b5857e7722cc8c69fb0d0b860)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19425: Adding orders from order file with multiple budgets per record triggers...
Kyle M Hall [Fri, 6 Oct 2017 13:47:26 +0000 (09:47 -0400)]
Bug 19425: Adding orders from order file with multiple budgets per record triggers error

If you import an order file ( using MarcItemFieldsToOrder ) that has a different budget for each item to be ordered, you will get an error and a partially created basket. This is because Koha attempts to add the item to each order *for each budget*. This is clearly incorrect. Instead, we should be grouping items by budget and for each budget only adding those items that have a matching budget.

Test plan:
1) Do not apply this patch
2) Download the provided MARC record
3) Add the branchcode 'ALD' to your server
4) Add the ccode 'ACOL' to your server
5) Add the budget codes 'adultay' and 'branchay' to your server
6) Stage the order file
7) Create a basket, import the order file
8) No we have 3 records, 2 of them have 2 items each with different budget codes
9) Attempt to import, note the error
10) Apply this patch
11) Repeat steps 6-8, note the order completes and results in 5 order lines being added to the basket!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Christopher Kellermeyer <ckellermeyer@altadenalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First step of test plan amended (not apply instead of apply).

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

6 years agoBug 19135: Restore AllowHoldsOnPatronsPossessions behaviour
Kyle M Hall [Thu, 20 Jul 2017 18:28:20 +0000 (14:28 -0400)]
Bug 19135: Restore AllowHoldsOnPatronsPossessions behaviour

Bug caused by
  commit bc39f0392bbebaad4c083f81308f652a325be042
  Bug 14695 - Add ability to place multiple item holds on a given record per patron

Test Plan:
1) Set AllowHoldsOnPatronsPossessions to "Don't"
2) Check out an item to a patron
3) Place a hold on that item for the same patron
4) Note you are allowed to with no alert
5) Delete the hold
6) Apply this patch
7) Place a hold on that item for the same patron
8) Note you recieve an alert now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 46ff8df19544e3e7c16a4e3f21b3b14bc043dd88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05
Marcel de Rooy [Thu, 5 Oct 2017 08:41:33 +0000 (10:41 +0200)]
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05

Commit b4392018bc1f9bf6a2f7dfe70b488856ad3a3897 [Bug 12478: make things using SimpleSearch use the new version] changed sub FindDuplicateAuthority and replaced this call (from 3.22.x) in 16.05 (pushed April 2016):
    my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] );

The new call does unfortunately not include the authorityserver:
    my ($error, $results, $total_hits) = $searcher->simple_search_compat( $query, 0, 1 );
Simple_search_compat redirects to C4/Search/SimpleSearch and SimpleSearch assumes a biblioserver if no server is passed.

This effectively makes FindDuplicateAuthority useless since we will no longer find duplicates and we could see an error like this in the log:
    16:51:42-04/10 zebrasrv(51) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @and @attr 1=authtype PERSO_NAME @attr 1=Heading Moerenhout

The fix is obviously trivial.

Test plan:
[1] Go to Authorities.
[2] Add a new authority PERSO_NAME with 100a Moerenhout.
[3] Repeat step 2. Verify that you get the duplicate authority warning.

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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56500e8e676782155c5717e8db9786af394252d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19374: CircSidebar overlapping transferred items table
Lari Taskula [Wed, 27 Sep 2017 14:59:55 +0000 (17:59 +0300)]
Bug 19374: CircSidebar overlapping transferred items table

When CircSidebar is activated, "Transferred items" table at
Circulation -> Transfers goes under the sidebar. This patch fixes the issue.

To test:
1. Enable CircSidebar system preference
2. Go to cgi-bin/koha/circ/branchtransfers.pl
3. Enter a barcode and click submit
4. Observe transferred items table under the circulation side bar
5. Apply patch
6. Enter a barcode and click submit
7. Observe transferred items is now correctly displayed
8. Also test with CircSidebar system preference deactivated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 19374: (follow-up) Remove stray closing div tag

To test:
1. Apply first patch and validate the document e.g. here
   https://validator.w3.org/#validate_by_input
2. Observe "Stray end tag div." error
3. Apply this patch and validate again
4. Observe no errors
5. Go through test plan from first patch to make sure things still look nice

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 07764f2b3114e5ccb72f7737e316d2cda3ad5068)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19329: Update IntranetSlipPrinterJS system preference description.
Josef Moravec [Tue, 19 Sep 2017 07:13:53 +0000 (07:13 +0000)]
Bug 19329: Update IntranetSlipPrinterJS system preference description.

Test plan:
0) Apply the patch
1) Go to administration -> system preferences -> staff client
2) Read the description by IntranetSlipPrinterJS and confirm it's right

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c7b2d9bcf37dcded7cba49b1e520a0234850adf7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 15173: Restore SubfieldsToAllowForRestrictedEditing
Jonathan Druart [Tue, 16 Aug 2016 14:12:07 +0000 (15:12 +0100)]
Bug 15173: Restore SubfieldsToAllowForRestrictedEditing

Bug 7673 introduced SubfieldsToAllowForRestrictedEditing but bug 12176
broke it assuming that only selects were impacted by this feature.

Test plan:
Go back on bug 7673 and confirm that
SubfieldsToAllowForRestrictedEditing is working as expected with this
patch applied.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
For clarification, the item fields that are entered in
SubfieldsToAllowForRestrictedEditing should EXCLUDE the desired
fields you want to disable.

Test plan (updated to test the scenario in the bug Description):
1. Create a patron with only the following permissions:
    - catalogue (Required for staff login)
    - editcatalogue -> edit_catalogue
    - editcatalogue -> edit_items
    - editcatalogue -> edit_items_restricted
2. Navigate to Administration -> Global system preferences -> Cataloging
    -> Record Structure -> SubfieldsToAllowForRestrictedEditing
3. In the input field for SubfieldsToAllowForRestrictedEditing enter in
    all the 952 fields EXCEPT the ones desired to be disabled. In this
    case, we want to disallow editing of 952$2, 952$a, 952$b, 952$e, 952$h,
    and 952$o so we enter the following into the
    SubfieldsToAllowForRestrictedEditing (without quotes) "952$0 952$1
    952$3 952$4 952$5 952$7 952$8 952$c 952$d 952$f 952$g 952$i 952$j
    952$p 952$t 952$u 952$v 952$w 952$x 952$y 952$z"
4. Click Save all Cataloging preferences
5. Login to the staff client as the created restricted editing patron
6. Edit an item
7. Note that all fields except for the ones excluded from the syspref
    are editable

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c84d03c582976cb590c62b25d59505b982a71d97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: (QA follow-up) Fix auto truncation for field:"value"
Julian Maurice [Fri, 13 Oct 2017 10:05:08 +0000 (10:05 +0000)]
Bug 18374: (QA follow-up) Fix auto truncation for field:"value"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c991ac6b6184e299108b5f69d3e0e50dcfc6548d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: (QA follow-up) Simplify _truncate_terms
Julian Maurice [Fri, 13 Oct 2017 09:53:04 +0000 (09:53 +0000)]
Bug 18374: (QA follow-up) Simplify _truncate_terms

By using a different split regex, we can simplify a bit the process of
appending '*' to every word of the query

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6426a82014aacd738dd94ca2ff1c9056af893d45)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: (follow-up) Add support and tests for quoted strings
Nick Clemens [Fri, 6 Oct 2017 15:37:38 +0000 (15:37 +0000)]
Bug 18374: (follow-up) Add support and tests for quoted strings

To test:
1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
2 - do some searches in staff client and test results

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d099dc13bb4b9aa991caa0feaf24bed59c3c4844)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: (QA follow-up) Tidy up code
Julian Maurice [Fri, 29 Sep 2017 14:12:23 +0000 (16:12 +0200)]
Bug 18374: (QA follow-up) Tidy up code

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e54065197515ec265d4bab6ceead35d4456ef0e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: (QA follow-up) Remove warning in Elasticsearch/Search.pm
Tomas Cohen Arazi [Tue, 12 Sep 2017 15:15:07 +0000 (12:15 -0300)]
Bug 18374: (QA follow-up) Remove warning in Elasticsearch/Search.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cfa1aac9554ea9cba09aec30a4b1f85c09cb5f63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: Respect QueryAutoTruncate syspref in Elasticsearch
Nick Clemens [Mon, 3 Apr 2017 18:30:44 +0000 (14:30 -0400)]
Bug 18374: Respect QueryAutoTruncate syspref in Elasticsearch

This patchset adds a subroutine '_truncate_terms' to the ES QueryParser.

If QueryAutoTruncate is enabled this function will be called for any
search to add wildcard '*' to all terms

To test:
1 - Enable Elasticsearch and have some records indexed
2 - Search for partial terms
3 - Note they fail unless '*' is appended
4 - Apply patch, leave QueryAutoTruncate disabled
5 - Note partial term searches still fail
6 - Enable QueryAutoTruncate
7 - Note partial term searches succeed
8 - Do some regular and advanced searches to make sure results are as
expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4c4d982ae45a3763fd70faedf1bbac225213de19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18374: QueryAutoTruncate unit tests
Nick Clemens [Thu, 6 Apr 2017 18:27:50 +0000 (14:27 -0400)]
Bug 18374: QueryAutoTruncate unit tests

To test:
1 - Apply just this patch - should fail
2 - Apply the other patch - should pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8b3d53db08a5d27a22df338ea4c3c2426992c12a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19296: (QA follow-up) Correct comment in populate_orders
Marcel de Rooy [Fri, 13 Oct 2017 07:03:25 +0000 (09:03 +0200)]
Bug 19296: (QA follow-up) Correct comment in populate_orders

Just replacing a wrong - by a correct + sign in the comment. The code
itself is fine.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 08357845c3db3b68990e655de3364bc0f4649fc1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19296: Allow all tax processing to happen in C4::Acquisition::populate_order_with...
Nick Clemens [Tue, 12 Sep 2017 16:57:47 +0000 (16:57 +0000)]
Bug 19296: Allow all tax processing to happen in C4::Acquisition::populate_order_with_prices

To test:
 1 - Create an order file that includes prices and items
(MarcFieldsToOrder)
 2 - Stage the file
 3 - Set vendor to 'prices exclude tax'
 4 - Open a basket and add from the file
 5 - View the items in the basket
 6 - Prices are reduced by the tax rate and tax is calculated to return
prices to the value in the file
 7 - Apply patch
 8 - Repeat steps 1-6
 9 - Prices should now calculate correctly
10 - Repeat with 'MarcItemFieldsToOrder'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d8b89eead0c7576a295679b3ef3bb90e7dec8283)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19180: [FOLLOW-UP] Renaming all instances of 'name' variable to 'booksellername'
Aleisha Amohia [Tue, 29 Aug 2017 21:21:00 +0000 (21:21 +0000)]
Bug 19180: [FOLLOW-UP] Renaming all instances of 'name' variable to 'booksellername'

... when referring to the name of the vendor.

To test:
1) Confirm vendor shows on webpage title (tab name)
2) Confirm vendor shows in breadcrumbs
3) Confirm vendor shows in heading when viewing basket ('Basket x (1) for
vendor')

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 06b602b0976e2a8d53ff31f95a2213cbeb98e9cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19180: Add vendor name to breadcrumbs when closing an order
Aleisha Amohia [Sun, 27 Aug 2017 23:00:15 +0000 (23:00 +0000)]
Bug 19180: Add vendor name to breadcrumbs when closing an order

To test:
1) Go to Acquisitions
2) Find a vendor and a basket
3) Click 'Close basket' button
4) Notice that on confirmation page, breadcrumbs are missing vendor
5) Apply patch and refresh page
6) Vendor name should now show
7) Confirm link to vendor works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 438a3dea0c8ef1a5adcec58d8b97474d14ccca9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 16204: Show friendly error message if trying to edit record which no longer exists
Aleisha Amohia [Wed, 30 Aug 2017 04:36:50 +0000 (04:36 +0000)]
Bug 16204: Show friendly error message if trying to edit record which no longer exists

To test:
1) Create a record
2) Click Edit -> Edit record. open this in another tab
3) Delete the record in the original tab
4) Refresh the edit form in the other tab. Notice the software error
5) Apply patch and refresh page
6) There should be a nice error message with the form fields and buttons
hidden. Confirm links work as expected.

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 17c5b76597b9a356bc215a3682d7293e307fcc46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 15644 - City dropdown default selection when modifying a patron matches only...
Owen Leonard [Thu, 8 Jun 2017 16:01:32 +0000 (16:01 +0000)]
Bug 15644 - City dropdown default selection when modifying a patron matches only on city

This patch modifies the include files which contain the form fields for
city, state, zipcode, etc. shown on the patron entry screen. The files
are modified so that the city/state/zip <select> preselects a value
based on city, state, and zipcode matching the values in the
corresponding text fields.

To test, confirm that the bug's steps to reproduce are fixed:

- Enter two cities via Administration -> Patrons and circulation
  -> Cities and towns:
    Springfield, MA 01101
    Springfield, VT 05156
- Edit a patron choosing, Springfield VT, and save.
- Edit the patron again and confirm that the correct city is
  pre-selected.
- Confirm this result with all three different settings of the
  "AddressFormat" system preference.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 83704cb1fab33feb0262fdab99bccf0052243d14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18742: (QA followup) Fix indentation
Julian Maurice [Fri, 1 Sep 2017 14:07:36 +0000 (16:07 +0200)]
Bug 18742: (QA followup) Fix indentation

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0ae70349809d51552e4297625db1382aa4e26dc5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18742: Circulation statistics wizard no longer exports the total row
Nick Clemens [Wed, 7 Jun 2017 14:56:47 +0000 (10:56 -0400)]
Bug 18742: Circulation statistics wizard no longer exports the total row

To test:
- Run the circulation wizard
- Export to csv
- Note there is no total row
- Apply patch
- Export to csv
- Total row totally there!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff22cb46a5f6a1f75422c2a90e1f80ccb05c30b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19337: Make basic_workflow.t configurable through ENV
Tomas Cohen Arazi [Mon, 18 Sep 2017 18:58:15 +0000 (15:58 -0300)]
Bug 19337: Make basic_workflow.t configurable through ENV

This patch makes the basic_workflow.t selenium tests read ENV for the
following vars:

KOHA_USER
KOHA_PASS
KOHA_INTRANET_URL
SELENIUM_ADDR
SELENIUM_PORT

to properly configure the running environment. If absent, all variables
fallback to current behaviour:

KOHA_USER // 'koha'
KOHA_PASS // 'koha'
KOHA_INTRANET_URL (unchanged)
SELENIUM_ADDR // 'localhost'
SELENIUM_PORT // 4444

[*] Selenium defaults are documented on the Selenium::Remote::Driver docs.

Prerequisites:
Make sure you have a working environment for the Selenium tests:
- Run:
  $ sudo apt update
  $ sudo apt install xvfb firefox-esr

To test:
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar \
     -O /tmp/selenium.jar
 k$ SELENIUM_PATH=/tmp/selenium.jar
 k$ Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
 k$ DISPLAY=:1 java -jar $SELENIUM_PATH &
 k$ prove t/db_dependent/selenium/basic_workflow.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/db_dependent/selenium/basic_workflow.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5bb19808bb23a01a257a0970bd7e2ae43fb5b3d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18584 - removed white space in C4/Accounts.pm
Dominic Pichette [Tue, 12 Sep 2017 14:13:58 +0000 (10:13 -0400)]
Bug 18584 - removed white space in C4/Accounts.pm

Test Plan:
    1-go to C4/Accounts.pm
    2-there should not be a trailing space at line 279.

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5400795a6651adc021801052fa0186747983b587)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19068: Add quantity field to the opac suggestions form
Jon Knight [Mon, 21 Aug 2017 15:04:20 +0000 (15:04 +0000)]
Bug 19068: Add quantity field to the opac suggestions form

This enhancement just exposes the quantity field to the OPAC suggestions
form to permit the end user to enter this if they wish.  The librarians
can of course override this quantity when they process the suggestion.

Test Plan (assuming using kohadevbox VM):
1) apply patch and turn on purchase suggestions
2) Go to http://localhost:8080/cgi-bin/koha/opac-suggestions.pl?op=add
and notice that there is now a quantity field available.
3) Make a purchasing suggestion using this form, including a quantity.
4) Log in as a member of library staff and go to Home › Acquisitions ›
Suggestions
5) Confirm that the previously entered suggestion is there, and that the
correct quantity appears in the "Acquisition information" section.
6) Edit the purchasing suggestion, change the quantity, save it and
check that the new quantity appears in the suggestion.

I've popped an ID attribute of "opac-suggestion-quantity" to the
surrounding <li> so that CSS can easily make this optional field
disappear (as suggested by cait on IRC).

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>
(cherry picked from commit 6eebfe5fe02be3c2ab3285b58cf50fac980cb302)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 12346: Display the correct number of pending patron modifications on the patron...
Jonathan Druart [Wed, 6 Sep 2017 14:23:10 +0000 (11:23 -0300)]
Bug 12346: Display the correct number of pending patron modifications on the patron module home page

Due to the way members-home.pl handles the variable $branch, the number
of patron modifications listed on members-home.pl may differ from the
number listed on mainpage.pl. When the librarian clicks this link, he or
she may see a different number than was listed, or none at all!

Test Plan:
0) Set IndependentBranchesPatronModifications = Yes
1) Create a number of modification request for BranchA
2) Log into the staff intranet with a patron without superlibrarian
permissions and set your branch to BranchB
3) Note the modifications alert to does not display on mainpage.pl
4) Click the "Patrons" link to take you to members-home.pl
5) Note the modifictions alert does display on this page
6) Apply this patch
7) Reload members-home.pl, note the alert no longer displays

QA notes: What was the point of the branch variable?

Followed test plan, patch worked as described. Also passed QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4efe251f353cb9eddd302b6214e1f4392620b395)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoRevert "Bug 17380: (QA followup) Fix parameter in tests"
Fridolin Somers [Mon, 23 Oct 2017 14:11:41 +0000 (16:11 +0200)]
Revert "Bug 17380: (QA followup) Fix parameter in tests"

This reverts commit 1b29d6e087055969def157245b1bc4f72a030406.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17380: [QA Follow-up] Report error to user instead of throwing exception
Nick Clemens [Fri, 1 Sep 2017 14:39:25 +0000 (14:39 +0000)]
Bug 17380: [QA Follow-up] Report error to user instead of throwing exception

Internal server errors are good, user feedback is better.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tiny change: removed the obsolete 'use Koha::Exceptions'.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3d07449358010392b111a674c3606cdfe2cbe47e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17380: (QA followup) Fix parameter in tests
Nick Clemens [Fri, 1 Sep 2017 14:39:03 +0000 (14:39 +0000)]
Bug 17380: (QA followup) Fix parameter in tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d0c372c5fa0e867d346b342ae470b31c33d52b26)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17380: Do not allow Default template in merge form
Marcel de Rooy [Mon, 26 Jun 2017 10:51:59 +0000 (12:51 +0200)]
Bug 17380: Do not allow Default template in merge form

This patch makes the following changes:
[1] Removes Default from the template list. We should not merge with the
    Default framework, since it does not have a reporting tag.
[2] Rearranges the error section in the template. It is confusing to have
    two error sections in this template. The error CANNOT_MOVE is not used.
    The error FRAMEWORK_NOT_SELECTED is replaced by WRONG_FRAMEWORK.
[3] Do not allow to merge a record with itself.
[4] Check if the merge reference record still contains any MARC tags.
[5] Additional polishing: Simplify passing frameworks to template. Remove
    an unused Koha::Authority::Types->search. Remove obsolete POD header
    for functions from the script.

Test plan:
[1] Select two authorities to merge. Verify that you cannot select Default
    anymore as framework for the reference record.
[2] Reproduce error WRONG_COUNT by adding another authid=999 in the URL
    after you selected two authority records for merging.
[3] Remove the third authid from the URL and change the first or second
    authid into an unexisting record id. You should generate an Internal
    Server Error. The log should show the exception message.
[4] Merge two authorities. Deselect all MARC tags. Should trigger the
    error EMPTY_MARC in the template.
[5] Select the same authority record twice for merging. Should trigger the
    error DESTRUCTIVE_MERGE in the template.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 87773a6d661f122a52b34f6c67255424c335e297)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17380: Graceful resolution of missing reporting tag in merge
Marcel de Rooy [Tue, 4 Jul 2017 12:31:21 +0000 (14:31 +0200)]
Bug 17380: Graceful resolution of missing reporting tag in merge

Altough this patch deals with a mostly hypothetical case and this report
makes it practically impossible anymore to merge with records in the
Default framework (having no reporting tag), we can make the code of
sub merge still a bit more robust here.

If you would merge biblio records from one authtype to another and the new
framework would not have a reporting tag, before this patch the result would
be data loss. Merge would handle this request as a delete. This patch makes
merge handle it differently: instead of clearing the biblio records, it
keeps $a and $9 in order to make a future corrective merge possible.

Note: The additional condition on line 1468 for $tags_using_authtype
makes sure that we do not select all fields when the authtype should
unexpectedly be empty string (Default). This prevents crashing on
a "Control fields do not have subfields" error.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 434162c1756b16b5fc715fd1cb762aaf8aff7b2b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17380: Do not use GuessAuthTypeCode in MetadataRecord::Authority
Marcel de Rooy [Mon, 26 Jun 2017 11:41:56 +0000 (13:41 +0200)]
Bug 17380: Do not use GuessAuthTypeCode in MetadataRecord::Authority

If we got an authtypecode from the database and this value is not NULL
since the table column does not allow it, there is no need to call
GuessAuthTypeCode for empty string (read: Default framework) in the
sub get_from_authid.

Furthermore, we remove three Koha::MetadataRecord::Authority->new calls.
They are useless, since we do not pass a record. It just generates:
  No record passed at authorities/merge.pl line 96.
  Can't bless non-reference value at Koha/MetadataRecord/Authority.pm line 66.
Instead we throw an ObjectNotFound exception.

Test plan:
[1] Run t/db_dependent/Koha_Authority.t
[2] Interface will be tested in the following patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit db35492c795540d6c3b10f7cba18698aeb84a816)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17380: Add some checks around Authorities::Types->find
Marcel de Rooy [Thu, 23 Feb 2017 09:02:57 +0000 (10:02 +0100)]
Bug 17380: Add some checks around Authorities::Types->find

Resolves:
Use of uninitialized value $biblio_fields in scalar chop at authorities/detail.pl line 212.
Can't call method "authtypetext" on an undefined value at authorities/detail.pl line 216.
Can't call method "authtypecode" on an undefined value at authorities/detail.pl line 180.

NOTE: Some of these problems have actually been resolved now by bugs 18801
and 18811, but it is still better imo to have these checks.

Test plan:
[1] Verify unchanged behavior. Search for some authorities on authorities.pl
    and click on the details of a record.
[2] Open an authorities detail page and change the authid in the URL to a
    not existing number. Instead of an internal server error, you should see
    a message like "The authority record you requested does not exist".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e631f418a3fafa485b650f0975ee0d06e366884)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18801: DBRev 17.05.00.003
Jonathan Druart [Thu, 6 Jul 2017 17:28:18 +0000 (14:28 -0300)]
Bug 18801: DBRev 17.05.00.003

(cherry picked from commit 83e4adf0abff0e81febf4bcee473ce9c599e8311)

6 years agoBug 18801: [Follow-up] Dbrev to repair bad auth type codes
Marcel de Rooy [Thu, 15 Jun 2017 13:47:21 +0000 (15:47 +0200)]
Bug 18801: [Follow-up] Dbrev to repair bad auth type codes

Test plan
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit aa03981e79a10bd5a032f13533d93f0b87bd37f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>