]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 18710: Wrong subfield modified in batch item modification
Fridolin Somers [Wed, 31 May 2017 14:54:32 +0000 (16:54 +0200)]
Bug 18710: Wrong subfield modified in batch item modification

In Tools > Batch item modification, one can modify or delete a subfield.
When deleting a subfield et modifying another, the wrong subfield gets modified.

This is caused by the fact that disabled inputs are not posted in form.
So for a subfield to delete :
Input name=field_value is not posted. But input name=subfield is posted with subfield code.
So these 2 arrays does not have the same size :
    my @subfields = $input->multi_param('subfield');
    my @values    = $input->multi_param('field_value');

For exemple, deleting $2, not changing $u and modidying $v will modify $u with value for $v o_O

This patch correts but setting disabled all inputs of a deleted subfield : field_value, tag, subfield and mandatory. Like it was not present in the form.

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Lets say there are subfields : $2 (not mandatory), $u and $v
- Check the subfield $2 to be deleted
=> $2 input is disabled
- Enter a text in $v
- Submit the form
=> Without patch, the text for $v gets into $u
=> With patch, the text for $v gets into $v
- Check the subfield $2 is well deleted

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit adb232c8f0f4bf8574ca3dce9548196430c57fb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23627: Reduce Koha::Biblio->get_coins noise if no 245
Tomas Cohen Arazi [Mon, 16 Sep 2019 20:22:17 +0000 (17:22 -0300)]
Bug 23627: Reduce Koha::Biblio->get_coins noise if no 245

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8766689d34c63416f38a8248367483c573c5036e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23605: Fix terminology for branches limitations on patron category admin page
Katrin Fischer [Fri, 13 Sep 2019 12:18:09 +0000 (12:18 +0000)]
Bug 23605: Fix terminology for branches limitations on patron category admin page

Fix branches to library.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 921cf9b35297c8ea57cc5482385f040c2734a027)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23526: (RM follow-up) Fix failing test
Martin Renvoize [Tue, 24 Sep 2019 07:21:13 +0000 (08:21 +0100)]
Bug 23526: (RM follow-up) Fix failing test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fca3a267c61b3db9d16f01b0c46d03dbfc6dad63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoUpdate release notes for 19.05.04 release v19.05.04
Fridolin Somers [Tue, 24 Sep 2019 07:40:11 +0000 (09:40 +0200)]
Update release notes for 19.05.04 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoIncrement version for 19.05.04 release
Fridolin Somers [Tue, 24 Sep 2019 07:33:00 +0000 (09:33 +0200)]
Increment version for 19.05.04 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoTranslation updates for Koha 19.05.04
Koha translators [Tue, 24 Sep 2019 07:27:56 +0000 (04:27 -0300)]
Translation updates for Koha 19.05.04

5 years agoBug 22744: Changes for opac and remove JS
Nick Clemens [Mon, 23 Sep 2019 10:25:13 +0000 (10:25 +0000)]
Bug 22744: Changes for opac and remove JS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 87302a1abfe9d44bf302ee9ce83ec0639ea4f849)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22744: Remove the 'do not notify' buttons
Nick Clemens [Thu, 13 Jun 2019 10:56:34 +0000 (10:56 +0000)]
Bug 22744: Remove the 'do not notify' buttons

These checkboxes are simply a way to clear the prefs before editing. We are not saving
a lot of click, and we are confusing people, this patch simply removes them

To test:
1 - Edit a patron's messaging preferences
2 - Think too hard about the 'Do not notify' boxes
3 - Feel confused
4 - Apply this patch
5 - Edit a patron's messaging preferences
6 - Confirm it feels better

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff21f979081b3c20d313129a7b4da671bf0fd635)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23537: Overdrive won't show complete results at all times
Liz Rea [Wed, 4 Sep 2019 02:10:21 +0000 (02:10 +0000)]
Bug 23537: Overdrive won't show complete results at all times

To test:

On an overdrive enabled OPAC (tough sell, I know)

    Do a search for something you know has magazines, the collection I
    was looking at had "knit" as one

    Without this patch, the results will show "(many) items found in
    overdrive collection" but only show a small number of them.

    With the patch, the number of results should match the number
    shown/paginated.

    A site that has this fix applied, is
    https://tracy.bywatersolutions.com/cgi-bin/koha/opac-overdrive-search.pl?q=knit

    Before this patch, the number of results was 44, but there were only
    8 shown. Now we see all 44

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 98e4b5c04a1f89fb168fbc6e7dc40f374cb40ad1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23526: Don't use encoded question mark in shib_login_url
Nick [Tue, 10 Sep 2019 14:04:43 +0000 (14:04 +0000)]
Bug 23526: Don't use encoded question mark in shib_login_url

To test:
1 - Enable shib
2 - Do a search
3 - Try to login from search
4 - Get an error
5 - Apply patch
6 - Retry

Note: You do have to fully configure shibboleth, you can simply enable it in koha-conf.xml and check the URLs.
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 16aa7d1c8afe249318767a8a023f7dbddb6843ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23425: (QA follow-up) Keep it generic
Tomas Cohen Arazi [Tue, 17 Sep 2019 18:08:06 +0000 (15:08 -0300)]
Bug 23425: (QA follow-up) Keep it generic

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ae6e95a40b4da7f77f241cbe941662ff773db44)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23425: Display the MARCXML error in the Metadata::Invalid exception message
Jonathan Druart [Sun, 4 Aug 2019 15:47:02 +0000 (10:47 -0500)]
Bug 23425: Display the MARCXML error in the Metadata::Invalid exception message

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5d3b46df3f3ca1ae04bd9574b29cfe291aff48f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21390: Send registration verification emails immediately
Chris Cormack [Wed, 4 Sep 2019 21:43:13 +0000 (21:43 +0000)]
Bug 21390: Send registration verification emails immediately

To test
1/ Enable self registration
2/ Register, notice message is queued in the table but not sent
3/ Apply patch
4/ Register again, notice message is queued, but immediately sent

Sponsored by: Goethe-Institut
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 957d583d2efce66e31fe05f229fda91c58324bc2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23597: Add missing reserved query parameters to GET /holds
Tomas Cohen Arazi [Wed, 11 Sep 2019 17:33:45 +0000 (14:33 -0300)]
Bug 23597: Add missing reserved query parameters to GET /holds

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 410e9bc0e88007cdff850afed83ee55a240a7517)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23575: Template error causes item search to be submitted multiple times
Owen Leonard [Mon, 9 Sep 2019 16:58:04 +0000 (16:58 +0000)]
Bug 23575: Template error causes item search to be submitted multiple times

This patch corrects the item search template so that the submit handler
is not nested inside an unrelated loop. The change should have no
outward effect on the behavior of the item search other than making it
faster.

To observe the bug in action, open your browser's developer tools and
click the "Network" tab. Filter the output to only "XHR" and perform an
item search. You should see multiple requests.

To test, apply the patch and perform an item search. It should behave
normally.

Check the browser's "Network" monitor again to verify that only one
request is being sent.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 075261645e1650629038c9a09e8d9e387bcc5474)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22037: (QA follow-up) Correct misleading comment
Marcel de Rooy [Fri, 13 Sep 2019 07:36:25 +0000 (07:36 +0000)]
Bug 22037: (QA follow-up) Correct misleading comment

Comment needs to be corrected, and now applies to the whole code
paragraph following it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 766814ffa3c4592b9b7dcde83873ef12e796ae68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES
Kyle M Hall [Thu, 22 Aug 2019 13:25:54 +0000 (09:25 -0400)]
Bug 22037: (QA follow-up) Implement use of CHARGES_GUARANTEES

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a5e519d70c168bb44cfea2d8a4490fad9049ab8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22037: Block SIP checkout if guarantees have debt
Jonathan Druart [Thu, 20 Dec 2018 22:39:34 +0000 (19:39 -0300)]
Bug 22037: Block SIP checkout if guarantees have debt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e91d33381cb29da30bfe16f022f1d07fe2b327f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21058: Added HTML class to showRDAtag264
David Bourgault [Wed, 7 Aug 2019 18:01:58 +0000 (18:01 +0000)]
Bug 21058: Added HTML class to showRDAtag264

Adds the HTML class "rda264" to the span generated by the XSLT function
showRDAtag264.

To test, same as previous, using a notice with a 264 tag. Both patches
only apply to MARC21.

I was unsure how to name the class, so I've chose the simplest, most
explicit name.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 072a901d35844e99db65c1069b52f4f8b5ad6e5a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21058: Added HTML classes in MARC21slim2_Detail.xsl
David Bourgault [Wed, 7 Aug 2019 16:42:30 +0000 (16:42 +0000)]
Bug 21058: Added HTML classes in MARC21slim2_Detail.xsl

This is a very small patch. I've simply added the following classes to
their respective spans in the detail XSLs for both interfaces.

- in_note (773$n)
- preceeding_entry_note (780$n)
- succeeding_entry_note (785$n)

To test:

1. Apply patch
2. Open details page of notice with a 773$n, 780$n or 785$n field
3. Inspect element. The class should be visible.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b65fc8e176f600894a98be526922f05e9d4f000d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16825: Add API route for getting an item
Lari Taskula [Mon, 27 Jun 2016 13:03:49 +0000 (16:03 +0300)]
Bug 16825: Add API route for getting an item

GET /api/v1/items/{item_id} Gets one Item

This patch adds route to get one item from koha.items table.

To test:
1. Apply patch
2. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie).
3. Send GET request to http://yourlibrary/api/v1/items/YYY
   where YYY is an existing itemnumber.
4. Make sure the returned data is correct.
5. Run unit tests in t/db_dependent/api/v1/items.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9e6537fae1dd921a95f55394ff2b463be8c834a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23004: Unit test
Fridolin Somers [Thu, 8 Aug 2019 06:51:14 +0000 (08:51 +0200)]
Bug 23004: Unit test

Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b26c2a18630538ee515f8e383293efd2c2928c70)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23004: Missing authtype filter in auth_finder.pl
Fridolin Somers [Wed, 29 May 2019 06:15:08 +0000 (08:15 +0200)]
Bug 23004: Missing authtype filter in auth_finder.pl

In cataloguing, the use of tag editor opens authorities finder with a limit on specific authorities type.
This limit is missing with Elasticsearch.

This patch adds in query a "filter" on "term" which is the most performant way because there must be no ranking computed on this part.

Test plan :
1) Use Elasticsearch
2) Create an autority of type author (NP in UNIMARC) with heading "Tolkien"
3) Create an autority of type subject-author (SAUT in UNIMARC) with heading "Tolkien"
4) Create a biblio record
5) Use tag editor on a author field (700 in UNIMARC)
6) Seach for "Tolkien" in $a
without patch : you see the 2 authorities in results
with patch : you see only the correct authority in results (NP in UNIMARC)
7) Check search in authorities-home.pl is still OK

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 949e36c7b8a11cd185025a4c9e102f0e26205009)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21180: Allow Talking Tech outbound script to limit based on patron home library...
Martha Fuerst [Wed, 8 Aug 2018 16:51:39 +0000 (12:51 -0400)]
Bug 21180: Allow Talking Tech outbound script to limit based on patron home library branchcode

A library system has requested the ability to limit which patrons are sent to Itivia for phone notices.

Test Plan:
1) Enable phone notices for two patrons with overdues
2) Run the misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl with the new --patron-branchcode option
3) Note only the patron whose homebranch you specified is in the output file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3cb66af150171abf44868f8b0bdca8f70132e4f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22929: Allow SCI/SCO logins independent of GDPR_Policy
Marcel de Rooy [Fri, 17 May 2019 07:36:17 +0000 (07:36 +0000)]
Bug 22929: Allow SCI/SCO logins independent of GDPR_Policy

This patch makes Auth skip the GDPR policy check when get_template_and_user
is called for sci/sco (self checkin, checkout).
I do not really like the change in this form but the nature of self checkin
and checkout kind of dictate it (double hack).
I wanted to add a test but since that asks for mocking CGI, checkauth, etc.
the time needed for that is just too much for this simple change.

Test plan:
Enable GDPR_Policy and self checkin/checkout.
Verify that using patrons without consent is not blocking sci/sco.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3640130d1fbc49ddc2cc4baef53a4c4d7fea76bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: (QA follow-up) Minor fix
Tomas Cohen Arazi [Fri, 6 Sep 2019 18:51:26 +0000 (15:51 -0300)]
Bug 23404: (QA follow-up) Minor fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cb432e7f522f2f052d561dad3b36bc97ca7868a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: Change UT calls
Fridolin Somers [Wed, 31 Jul 2019 08:59:37 +0000 (10:59 +0200)]
Bug 23404: Change UT calls

Run prove t/db_dependent/Circulation/TooMany.t
Tests are OK

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e98af5828a56b52426ae7aa12d1c85e4f9fb41d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: fix Circulation::TooMany error on itemtype when at biblio level
Fridolin Somers [Wed, 31 Jul 2019 13:56:22 +0000 (15:56 +0200)]
Bug 23404: fix Circulation::TooMany error on itemtype when at biblio level

Circulation::TooMany gets itemtype from $item var beeing a Koha::Item unblessed.
When itemtype is at biblio level, calling $item->{'itemtype'} is wrong.

Test plan :
1) On a catalog with itemtype at item level : pref item-level_itypes=1
2) Create a biblio record with itemtype BOOK
3) Create an item on this biblio record with itemtype BOOK
4) Delete all issuing rules
5) Create a issuing rule with itemtype BOOK, any catagorie, any branch
6) Check-out the item
7) => Checkout is allowed
8) Check-in item
9) Change itemtype at biblio level : pref item-level_itypes=0
10) Check-out the item
11) => Checkout is not allowed
    You see message "No circulation rule is defined for this patron and itemtype combination"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9e1fa801d6f1ff718d8689c855483b8b9c735a9f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23404: add UT to show bug
Fridolin Somers [Wed, 31 Jul 2019 09:21:14 +0000 (11:21 +0200)]
Bug 23404: add UT to show bug

Run prove t/db_dependent/Circulation/TooMany.t
It fails on :
    #   Failed test 'We are only allowed one, and we have one (itemtype on biblioitem)'
    #   at t/db_dependent/Circulation/TooMany.t line 547.
    #     Structures begin differing at:
    #          $got->{reason} = 'NO_RULE_DEFINED'
    #     $expected->{reason} = 'TOO_MANY_CHECKOUTS'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 445b0cb8b595136afdebaee2db3bc768b42b445b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23353: ACQ framework makes fr-CA web installer explode
Caroline Cyr La Rose [Fri, 16 Aug 2019 18:28:59 +0000 (14:28 -0400)]
Bug 23353: ACQ framework makes fr-CA web installer explode

This patch removes the standalone ACQ framework SQL file in the fr-CA
directory and adds the ACQ framework creation SQL in the default
framework file, as it is in other languages.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 811bee9bce57e67fd22562b3bb62397335b4eeb5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: (QA follow-up) Few additional corrections
Marcel de Rooy [Fri, 6 Sep 2019 09:47:19 +0000 (09:47 +0000)]
Bug 16111: (QA follow-up) Few additional corrections

[1] Refining the regex on the format parameter in opac-search.pl
[2] Adding a colon to dc:identifier. The Dublin Core specs gives me this
    example:
    Identifier="ISBN:0385424728"
[3] Replacing last occurrence of rss2 in the rss template

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2bbd811027172af1adb68f9904071951056ecbda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: (QA follow-up) Changes related to partial revert
Marcel de Rooy [Fri, 6 Sep 2019 09:02:38 +0000 (09:02 +0000)]
Bug 16111: (QA follow-up) Changes related to partial revert

When reverting the &amp; change, we need to go back to html filter for
query_cgi and limit_cgi. In this patch I only replaced it where it is
needed. The template contains more references to SEARCH_RESULT.query_cgi
and SEARCH_RESULT.limit_cgi which are useless, since searchResults does
not return these hash keys at all.

This patch fixes one occurrence where SEARCH_RESULT was copied outside
the loop that defines the template variable.

Obviously, the code for RSS still needs more attention.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 062c3f9ab2e25b64dad1d4356a976a1416204c05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: Further fixes to the RSS to make feed work
Liz Rea [Mon, 19 Aug 2019 01:51:04 +0000 (01:51 +0000)]
Bug 16111: Further fixes to the RSS to make feed work

- fixed links per the WC3 spec
- fixed a problem in the ATOM link

To test:
do a search, click the RSS icon - it shows xml in most browsers but wont
do RSS type things.
Apply this patch, restart the things
refresh the page, it should do RSS things (i.e. firefox should render it
        as a nice looking thing, rather than raw XML.)

noting that there are a couple of validation errors still, but they
don't seem to be show stopping and moreover I wasn't sure how to fix them:

Misplaced Item
Self reference doesn't match document location (this is a "for widest
        compatibility you should fix" kind of thing)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fafd719dd34aeb4e96377f4404a53df589138efd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: [CHANGED] Replace link href by link in rss part
Jonathan Druart [Mon, 19 Aug 2019 22:24:56 +0000 (18:24 -0400)]
Bug 16111: [CHANGED] Replace link href by link in rss part

Original patch title: Replace & with &amp;

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
EDIT:
Reverting the changes to C4/Search and opac-search.pl.
This requires a few changes, as supplied in the 5th patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0e1e5ca31fab861c85c9b6e0d3b788f0208402d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: Adjust some more filters
Jonathan Druart [Mon, 19 Aug 2019 20:33:06 +0000 (16:33 -0400)]
Bug 16111: Adjust some more filters

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4de5d3dd428a23605e6dc49bfc05bfe780f647dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16111: Fix content type for RSS feed
Jonathan Druart [Mon, 18 Jun 2018 20:31:27 +0000 (17:31 -0300)]
Bug 16111: Fix content type for RSS feed

Test plan:
GET http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss2

=> Without this patch it returns content type text/html
=> With this patch it returns text/xml

GET http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss
=> Without this patch it does not work
=> With this patch it returns text/xml

Bug 16111: Fix atom support
Bug 16111: Remove 'rss2' which should be 'rss' or 'atom'
Bug 16111: Replace <link> with <link href...

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b946e996ff208e71bbfd5cfb7714f9a656065093)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23539: (RM follow-up) Update DBIC classes
Martin Renvoize [Fri, 6 Sep 2019 12:24:10 +0000 (13:24 +0100)]
Bug 23539: (RM follow-up) Update DBIC classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49e30bc67d91f300df2efd9b7a2cf0526221fb96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23539: DBRev 19.05.03.003
Martin Renvoize [Fri, 6 Sep 2019 12:20:14 +0000 (13:20 +0100)]
Bug 23539: DBRev 19.05.03.003

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 38322b5a43b37575d4d1c2da1d4b5b0ef3b83bf4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23539: accountlines.accounttype should match authorised_values.authorised_value...
Kyle M Hall [Wed, 4 Sep 2019 17:48:41 +0000 (13:48 -0400)]
Bug 23539: accountlines.accounttype should match authorised_values.authorised_value in size

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 00c61beff999c12823111fb594bec2c57a5c0d58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23289: Quote new 'rows' MariaDB reserved word
Jonathan Druart [Sun, 1 Sep 2019 19:26:02 +0000 (15:26 -0400)]
Bug 23289: Quote new 'rows' MariaDB reserved word

Since MariaDB 10.2.4 rows is a reserved word:
https://mariadb.com/kb/en/library/mariadb-1024-release-notes/

"""
New reserved word: ROWS. This can no longer be used as an identifier
without being quoted.
"""

Test plan:
With MariaDB >= 10.2.4, create a new label template.
Also, prove t/db_dependent/Labels/t_Template.t

Without this patch you will get the following SQL error: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows, creator, template_code, page_height,

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aede6896dd6ebc660894bcde117ccd213e2c3de6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23530: Fix cart showing only hidden items
Mason James [Tue, 3 Sep 2019 04:02:32 +0000 (16:02 +1200)]
Bug 23530: Fix cart showing only hidden items

Items hidden with the OpacHiddenItems system preference
were still displayed in the OPAC cart and the normal items
were hidden instead. This patch corrects the display.

To test:
- prep a test bib with hidden and other items using
  the OpacHiddenItems system preference
- add bib to cart
- observe that hidden items are displayed - non-hidden items are hidden
- apply patch, reload page
- observe that hidden items are hidden, non-hidden items are displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60ce66b6b658bfbe0d9ca459afc673042c7a854f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23079: Add tests
Jonathan Druart [Sun, 23 Jun 2019 01:33:45 +0000 (20:33 -0500)]
Bug 23079: Add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b6fe8f88b33e3455ae30526109674bfa4f3d185)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23079: Handle invalid timezones when adding/subtracting durations
Jonathan Druart [Sun, 23 Jun 2019 01:40:04 +0000 (20:40 -0500)]
Bug 23079: Handle invalid timezones when adding/subtracting durations

On Nov 3rd 2019, Brazil will skip from 00:00 to 1:00 (http://www.currenttimeonline.com/dst/dst.do?tz=America/Sao_Paulo), DateTime consider it as an invalid date.
It is a problem when we are playing with dates without the time part (always 00:00).
When we instantiate a DateTime (from dt_from_string) we are already handling this issue, and use the floating timezone (since bug 12669).

The problem remains when we generate a DateTime then add or subtract a duration, which will result in an invalid date:

DateTime->new(year => 2019, month => 12, day => 3, time_zone => 'America/Sao_Paulo')->subtract(days => 30);

=> Nov 3rd 2019, kaboom.

We should replace all the problematic occurrences of dt_from_string->subtract (or ->add)
with dt_from_string(undef, undef, 'floating'), to use the floating timezone and avoid the error.

Actually there are not many of them, I have found only 3 that could
produce real problems.

The other occurrences are:
- in tests => Not a big deal (for now)
- called on a datetime, so it will explode if called at midnight
00:00:00 (and nobody should work at that time).

Test plan:
0/ Define the timezone to 'America/Sao_Paulo' (in your koha-conf.xml file), restart_all
1/ Set a patron's expiry date to Dec 3rd 2019, and
NotifyBorrowerDeparture to 30 (default value)
2/ See the checkouts page for this user
=> Without this patch you get "Invalid local time for date in time zone:
America/Sao_Paulo"
=> With this patch apply the page displays correctly

QA will review the 2 other occurrences.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0040dff9f435be65503e88afe45ce196bce9c4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22786: Prevent fund creation for locked budgets
Jonathan Druart [Sun, 23 Jun 2019 00:29:42 +0000 (19:29 -0500)]
Bug 22786: Prevent fund creation for locked budgets

If a budget is locked, there is a "New fund for $budget" link that is
disabled but clickable.
We should ensure that the link is not clickable and prevent it at
controller level (do we need it at module level, ie.
Koha::Acquisition::Fund->store?)

Test plan:
- Create a budget, lock it
- Go to /cgi-bin/koha/admin/aqbudgetperiods.pl
- Click on the name of the budget you just created
=> The "New > New fund for $budget_name" button should be disabled
- Click it anyway
=> Without this patch the form to add a new fund is displayed
=> With this patch applied nothing happens
- Hit /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=XXX
With XXX the budget's id
=> Without this patch the form is displayed
=> With this patch applied you get a message:
  "The budget is locked, fund creation is not possible."
And you are not able to create a new fund

QA notes:
1. See description
2. The add_validate op can still be forced, let trust librarians with
administration permissions for now.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9215ca42d28bec10f55a9c660bb5816045bb9656)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23518: Problem with borrower search autocomplete
Owen Leonard [Fri, 30 Aug 2019 12:25:45 +0000 (12:25 +0000)]
Bug 23518: Problem with borrower search autocomplete

This patch fixes a bug introduced by my patch for Bug 23405: Keyboard
navigation of patron autocomplete results was broken because I
incorrectly assumed that the autocomplete "select" action was redundant
because keyboard navigation would trigger the selected link. It doesn't!

This patch adds the "select" action back to the autocomplete
configuration, explicitly defining a redirect to match the URL which is
followed if the user uses the mouse to click a result.

To test you should have a patron in your database which has no card
number. Make sure CircAutocompl is enabled.

- From the circulation home page, type a patron name in the "Check out"
  form and wait for autocomplete search results to display.

- Making a selection from the autocomplete results should work by
  clicking with a mouse OR using the arrow keys and TAB or ENTER.

- Test with patrons with and without card numbers.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b94b58aa746188ee3699a2e4bc0a6b24d2dd86c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23210: (follow-up) Log in for tags link should trigger modal
Owen Leonard [Mon, 5 Aug 2019 14:25:51 +0000 (14:25 +0000)]
Bug 23210: (follow-up) Log in for tags link should trigger modal

This patch modifies the "Log in to add tags" link on the OPAC search
results page, adding the class which is used elsewhere in the OPAC
templates for triggering the login modal.

Also: Removed an unnecessary period.

To test, apply the patch and follow the original test plan. Clicking the
"Log in to add tags" link should trigger the login modal. After logging
in you should be returned to the page you were on.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66b6c76d96b172bbd2b9f90640f7701a6ba4530c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23210: login4tags should be a link and included in every search result
Lucas Gass [Fri, 2 Aug 2019 22:21:40 +0000 (22:21 +0000)]
Bug 23210: login4tags should be a link and included in every search result

TEST PLAN:

1. Make sure TagsEnabled and TagsInputOnList are set to allow.
2. Don't be logged into the OPAC.
3. Make a search and notice the 'Log in to add tags' text is not a link
   on the results page.
4. Apply patch
5. Refresh OPAC results page
6. 'Log in to add tags' takes you to the login page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 99d8d2db2c4f44cbb91a069ed3a8dd7894e0218a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23397: (QA follow-up) Replace mod 2 by last
Marcel de Rooy [Fri, 23 Aug 2019 14:36:36 +0000 (14:36 +0000)]
Bug 23397: (QA follow-up) Replace mod 2 by last

Looks better: Maps | Books | Continuing Resources

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4148b222b373b262a16a99faa314a47fa3994c0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23397: (follow-up) Split and display itemtypes
Nick Clemens [Fri, 23 Aug 2019 13:14:57 +0000 (13:14 +0000)]
Bug 23397: (follow-up) Split and display itemtypes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 36a16efec36b4c4d57231c0f459f76cb2bbaee7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23397: Fix grouping of orders in acqui scripts
Nick Clemens [Mon, 29 Jul 2019 18:12:21 +0000 (18:12 +0000)]
Bug 23397: Fix grouping of orders in acqui scripts

Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types.

To recreate:
1 - Place an order for 4 copies of a title in acq
2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket)
3 - Set three items to one type, and one to another
4 - Go to Acqui-Home and click 'ordered' for the used budget
5 - Note the line is duplicated for each itemtype in the order
6 - Recieve the items and note the same issue on 'Spent'
7 - Place another order as before so you have the problem in both ordered.pl and spent/pl
8 - Apply patch
9 - Note orders are no longer duplicated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1f40de2931f19cce0ca372151444ea05eb5f8e93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23502: Staff client "revert status" buttons should not depend on SuspendHoldsIntr...
Owen Leonard [Fri, 23 Aug 2019 16:41:57 +0000 (16:41 +0000)]
Bug 23502: Staff client "revert status" buttons should not depend on SuspendHoldsIntranet preference

This bug corrects the template logic controlling the display of the
"Revert waiting status" and "Revert transit status" buttons on the staff
client holds page so that it doesn't depend on having
SuspendHoldsIntranet enabled.

To test, apply the patch and locate a title which has multiple holds,
including:

  - One waiting hold
  - One in-transit hold
  - At least one pending hold

View the page with the SuspendHoldsIntranet preference both on and off.
The "Revert transit status" and "Revert waiting status" buttons should
be displayed either way.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 424cd4ed7f877d8bc7a45c77df0fa1b614efd1b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase
Jonathan Druart [Tue, 6 Aug 2019 14:09:18 +0000 (09:09 -0500)]
Bug 23265: (bug 12063 follow-up) Remove Koha::Holds from updatedatabase

Test plan:
Have a DB that fail the 16.12.00.032 update, then apply this patch and
verify the expiration dates

RM: Please inforce this rule, no use of Koha:: in updatedatabase!

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18d8d3b38b367ee0ea10169a0433e4a273252f15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: Remove debug statement
Jonathan Druart [Sun, 1 Sep 2019 15:35:33 +0000 (11:35 -0400)]
Bug 23273: Remove debug statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1fd224ea65dabd53e9f386af3ee602a87c2bb6dd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: (RM follow-up) Correction to filters
Martin Renvoize [Fri, 6 Sep 2019 09:17:20 +0000 (10:17 +0100)]
Bug 23273: (RM follow-up) Correction to filters

My initial RM followup for this patchset added one bad filter which
resulted in double encoding. This patch corrects that oversight.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 910417e22b31b54e60bd7b98146f68ca7d66d0aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: (RM follow-up) Add missing filters
Martin Renvoize [Tue, 20 Aug 2019 14:59:06 +0000 (15:59 +0100)]
Bug 23273: (RM follow-up) Add missing filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a5828bc7dccdfbc574b30a7f39c822d4a4cab8fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: Fix CSV export for overdues
Jonathan Druart [Mon, 19 Aug 2019 22:09:58 +0000 (18:09 -0400)]
Bug 23273: Fix CSV export for overdues

We should construct the URI parameters string manually to avoid
filtering problems.
We cannot send the full query_string to the template and expect that the
string will be escaped correctly.

Test plan:
- go to overdues.pl
- construct a search limiting by date due and library
- note number of overdues in results
- click "Download file of displayed overdues"
=> note that downloaded file contains just those in your search

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b8f382b82172b70166db48d572f767b06a4834ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoRevert "Bug 23273: Fix CSV export for overdues"
Fridolin Somers [Fri, 6 Sep 2019 08:08:19 +0000 (10:08 +0200)]
Revert "Bug 23273: Fix CSV export for overdues"

This reverts commit 1e63658b308507bb5e23bff4250b0425f2b614e3.

5 years agoRevert "Bug 23273: (RM follow-up) Add missing filters"
Fridolin Somers [Fri, 6 Sep 2019 08:08:17 +0000 (10:08 +0200)]
Revert "Bug 23273: (RM follow-up) Add missing filters"

This reverts commit 72360fa80c38b88035b5d18100d5126b1017e809.

5 years agoBug 23273: (RM follow-up) Add missing filters
Martin Renvoize [Tue, 20 Aug 2019 14:59:06 +0000 (15:59 +0100)]
Bug 23273: (RM follow-up) Add missing filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a5828bc7dccdfbc574b30a7f39c822d4a4cab8fe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23273: Fix CSV export for overdues
Jonathan Druart [Mon, 19 Aug 2019 22:09:58 +0000 (18:09 -0400)]
Bug 23273: Fix CSV export for overdues

We should construct the URI parameters string manually to avoid
filtering problems.
We cannot send the full query_string to the template and expect that the
string will be escaped correctly.

Test plan:
- go to overdues.pl
- construct a search limiting by date due and library
- note number of overdues in results
- click "Download file of displayed overdues"
=> note that downloaded file contains just those in your search

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b8f382b82172b70166db48d572f767b06a4834ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23437: Use authorities for tracing series
Nick Clemens [Wed, 7 Aug 2019 12:39:51 +0000 (12:39 +0000)]
Bug 23437: Use authorities for tracing series

To test:
1 - Set UseAuthoritiesForTracing to use
2 - Find some records with an 800 or 830 series entry
3 - View the record in staff and opac, note the series link does a search for title and author
4 - Apply patch
5 - restart all the things
6 - View the records, note the links now use the authority number

Signed-off-by: Ron Houk <RHouk@ottumwapubliclibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8c1d54dab1818ba212704442a37902e7a9ef089d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23324: (QA follow-up) Typo and remove unneeded use statement
Marcel de Rooy [Fri, 16 Aug 2019 06:03:55 +0000 (06:03 +0000)]
Bug 23324: (QA follow-up) Typo and remove unneeded use statement

Two typos in POD typo for routine name.
Remove "use Business::ISBN" from Normalize.pm.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b48e2d5e7a41511dccadb01808e1ece259c5f0b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23324: (QA follow-up) Use existing NormalizeISBN function
Nick Clemens [Fri, 9 Aug 2019 10:47:17 +0000 (10:47 +0000)]
Bug 23324: (QA follow-up) Use existing NormalizeISBN function

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5104d1eae67db94bebb05b2e9f1817685649b224)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23324: Add an ISBN normalization routine
Nick Clemens [Tue, 16 Jul 2019 13:11:06 +0000 (13:11 +0000)]
Bug 23324: Add an ISBN normalization routine

To test:
1 - Set SearchEngine to ElasticSearch
2 - Stage the sample file (import it if it doesn't already exist in your catalog and then stage again)
3 - Set matching rule to ISBN
4 - No matches found
5 - Apply patch
6 - Apply no matchign rule
7 - Change the ISBN matching rule to use ISBN normalizer
8 - Apply matching rule for ISBN
9 - It matches!

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d15819443bd114a5e61a7a9ee947a3307d39b8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23445: (RM follow-up) Missing filter
Martin Renvoize [Fri, 16 Aug 2019 12:47:49 +0000 (13:47 +0100)]
Bug 23445: (RM follow-up) Missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e4f25e088305d9dd299bbfaa33b6140137c2f01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23445: (RM follow-up) Add warning for unexpected lengthunit
Martin Renvoize [Fri, 16 Aug 2019 11:17:42 +0000 (12:17 +0100)]
Bug 23445: (RM follow-up) Add warning for unexpected lengthunit

Discussions on this bug highlighted worries about behind the scenes
fallbacks to 'days' as a lengthunit should the lengthunit be set to an
unrecognised value. This patch adds a warning to the about page for any
such occurrences so librarians may be made aware of and resolve the issue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1aae63606caeb389a40bd644b1f9e30917325573)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23445: Make loan period unit translatable fixing editing issue
Katrin Fischer [Fri, 9 Aug 2019 15:49:34 +0000 (15:49 +0000)]
Bug 23445: Make loan period unit translatable fixing editing issue

In the circulation rules, the loan period displayed in the table
of circulation rules is not translatable, always displaying in English.
This causes an issue when editing a circ rule with unit hours in any
other language than English.
When editing these rules, instead of hours, days will be preselected.

To test:
- Before applying the patch:
- Install a translation
- Activate and switch to the tranlation
- Create a circulation rule using 'hours' as the unit
- Edit the circulation rule
- Verify that instead of 'hours' 'days' will be selected in the pull-down
- Apply patch
- Update po files (kshell, cd misc/translator, perl translate update <langcode>)
- Edit po file <langcode-staff..., search for Hours and translate line,
  make sure to also remove fuzzy, and that your translation matches the
  pull down values for your language
- Reinstall translation
- Repeat circ rule edit test
- Verify the unit now shows up with your translation and editing works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 16789351efd1f7dca88ed0797208ba5723922b62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22799: Avoiding batch item modification case sensitivity when entering barcodes
Aleisha Amohia [Mon, 29 Apr 2019 01:25:46 +0000 (01:25 +0000)]
Bug 22799: Avoiding batch item modification case sensitivity when entering barcodes

Note: this fixes the bug that is present right now where batch item
modification barcode matching is case sensitive, but if Koha barcodes
ever do become case sensitive, this patch will need to be removed.

To test:
1) Make/use an item with a barcode with letters in it. For testing
purposes, I'll be using an item with the barcode 'abcde'.
2) Go to Tools -> Batch item modification and enter this barcode in the
barcode list text input field, but change the case of one or some
letters. (i.e. enter the barcode in the field as 'abCDE')
3) Click Continue
4) Notice that the next page shows an error 'the following barcodes were
not found', but the item still shows underneath (was correctly fetched from database).
5) Create a text file and put the changed-case barcode in it (i.e. put
the barcode 'abCDE' in the text file)
6) Go back to batch item modification and upload the
text file as a barcode file
7) Notice same error as in Step 4
8) Apply patch and refresh page
9) Run through steps 1 to 6. There should no longer be an error and the
barcodes should be found as expected.

Sponsored-by: South Taranaki District Council
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Donna Bachowski <donna@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2071fa4aca27f6748f32fd62037a203df2347141)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 11677: Use zebra not-onloan-count index for availability limit
Tomas Cohen Arazi [Mon, 12 Aug 2019 13:43:35 +0000 (10:43 -0300)]
Bug 11677: Use zebra not-onloan-count index for availability limit

This uses the work from bug 18098 to use the count of not-onloan items to
determine availability.

It keeps the allrecords,AlwaysMatches='' portion of the query so it still catches
records with the tested indexed missing.
These shouldn't exist except in the case of missing data, but kept for future use as well as
it has no negative impact and minimizes the change made.

Note that availability in this sense means not check out and not lost. Transfers, holds, and not for loan statuses
should probably have indexes built in the same way as bug 18098 (there are related FIXMEs in the code)

This updates the export_records file used for testing - adding three records with a not-onloan-count (999$x) of 1,
but marking the item on the third record lost to prevent its return

To test:
   1 - make sure SearchEngine pref is set to 'Zebra'
   2 - Do a search on the OPAC that returns some records
   3 - Find a record in those results with more than one 1 item, and checkout 1 leaving 1 (or more) available
   4 - Find another record with only 1 item, check that item out
   5 - Limit opac search to available items - both records disappear
   6 - Apply patch
   7 - Restart all the things
   8 - Repeat search
   9 - First record should show, but no second
  10 - Mark other items of first record as lost, return items on second record
  11 - Repeat search, first record should not be in results, second should
  12 - prove -v t/db_dependent/Search.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d4468c5f33f03cbd616527a558c1b67670089642)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder
Fridolin Somers [Thu, 2 May 2019 12:20:45 +0000 (14:20 +0200)]
Bug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder

In value_builder/unimarc_field_4XX.pl value_builder gets search results
and runs a for loog with $i index. This loop is limiter with number of
results par page, it should also be limited by number of results if
lower that number of results par page.

Same in cataloguing/value_builder/marc21_linking_section.pl.

Test plan :
1) configure framework to use value builder
2) use value builder
3) perform a search with number of results lower than number of results
   per page
4) check number of records diplayed is OK
5) perform a search with number of results upper than number of results
   per page and check number of results is OK
6) you see number of results par page records and pagination link

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 669864f4b0cb16fc9a8566bffdeb42d7875fd8aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23446: Fix display issue in serials navigation
Katrin Fischer [Fri, 9 Aug 2019 16:02:54 +0000 (16:02 +0000)]
Bug 23446: Fix display issue in serials navigation

The serial navigation shows a little stangely on the
serial subscription detail page and other pages that show
information about a specific subscription with one of the menu items
having a different display height than the other items.

To test:
- Go to the serials module
- Add or search for an existing subscription
- Go to the subscription detail page
- Verify the display issue in the navigation on the left
- Apply patch
- Check again from different pages in the serials module
- Verify display is improved

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5152dfcdf9ba63fd04d0dc15f34c851e5c85836)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23242: Fix insert of Z3950 servers with strict SQL modes
Jonathan Druart [Sun, 4 Aug 2019 17:48:07 +0000 (12:48 -0500)]
Bug 23242: Fix insert of Z3950 servers with strict SQL modes

If strict SQL modes are set, the insertion of a new Z3950 server can
fail.

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: ''
for column 'checked' at row 1 at
/home/vagrant/kohaclone/admin/z3950servers.pl line 82

Using Koha::Z3950Servers fixes the issue (handled from
Koha::Object->store)

Test plan:
- Turn the strict SQL modes on (config strict_sql_modes)
- Create a new Z3950 server filling only the mandatory fields.
=> Without this patch you will get the failure, with this patch applied
the server will be inserted sucessfully
- Delete it
=> No regression should be found
- Search for servers
=> No regression should be found (the search is a start-with, LIKE "$pattern%")

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9c730244768ea355004e821d5be35dc2e617840)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23309: DBRev 19.05.03.002
Martin Renvoize [Thu, 15 Aug 2019 08:16:02 +0000 (09:16 +0100)]
Bug 23309: DBRev 19.05.03.002

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 347dc9589aa75edb1c64c21e5d057373dfd3ed84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23309: Use Koha::MarcSubfieldStructures to create to subfields
Jonathan Druart [Thu, 8 Aug 2019 01:16:00 +0000 (20:16 -0500)]
Bug 23309: Use Koha::MarcSubfieldStructures to create to subfields

It will fix the insert of new subfields with SQL strict modes

DBD::mysql::st execute failed: Incorrect integer value: '' for column
'hidden' at row 1 [for Statement "

Test plan:
- Turn the config strict_sql_modes ON
- Add a new subfield to a field

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 144e753da65cafa3c4291eec701222784ec0893f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23309: Update DB
Jonathan Druart [Thu, 8 Aug 2019 01:08:22 +0000 (20:08 -0500)]
Bug 23309: Update DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0a0a8d874d9a46b0c53b9ce4691e36f5dc04e68e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16219: (QA follow-up) Tiny regex change
Marcel de Rooy [Fri, 9 Aug 2019 10:17:41 +0000 (10:17 +0000)]
Bug 16219: (QA follow-up) Tiny regex change

The parameter <<>> does not work. There should be text inside.
The construction .*? does not look good completely.
Replacing it by the stricter [^>]+ So, no greater than's and at least one.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e66ccaa3a7743378f906612562889a9476bf6802)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16219: (follow-up) Nicer message if params missing and note that they are not...
Nick Clemens [Fri, 19 Jul 2019 19:42:37 +0000 (19:42 +0000)]
Bug 16219: (follow-up) Nicer message if params missing and note that they are not combined

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 52587b4319d5d22436733f296021648d846f6359)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16219: Add 'params' parameter to runreport.pl
Nick Clemens [Wed, 5 Sep 2018 11:15:01 +0000 (11:15 +0000)]
Bug 16219: Add 'params' parameter to runreport.pl

To test:
 1 - Apply patch
 2 - Write a report that takes no variables
 3 - Run this using runreport.pl
    perl misc/cronjobs/runreport.pl 1
 4 - Confirm results as expected
 5 - Write a report that takes one or more variables
 6 - Run using runreport.pl, but pass no params
 7 - You should get a SQL error
 8 - Now run passing the correct number of params
    perl misc/cronjobs/runreport.pl --param first --param=2nd 2
 9 - Verify results as expected
10 - call runreport with no parameters
    perl misc/cronjobs/runreport.pl
11 - Verify documentation is correct and helpful

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 72197a9574d8b27651a390b9f177a537e1bf994c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22272: Calendar: When entering date ranges grey out dates in the past from the...
Emmi [Wed, 10 Jul 2019 06:25:43 +0000 (09:25 +0300)]
Bug 22272: Calendar: When entering date ranges grey out dates in the past from the start date

In "Calendar" tool it's possible to pick dates before start
date as end date.

This patch sets end date calendars "minDate" as picked start day
to grey out past dates. Also reindents datepicker code for
better readability.

Test plan:
- Apply this patch
- Set start date from first calendar
- Set end date from second calendar
=> Dates before start date are greyed out

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 06e28c3ac5b708ce01ea1265fa993c1f85e98645)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23385: (follow-up) Update link
Owen Leonard [Mon, 29 Jul 2019 12:57:21 +0000 (12:57 +0000)]
Bug 23385: (follow-up) Update link

This follow-up adds a dummy href attribute to the link for showing and
hiding the default values form so that it behaves more like a link.

I removed "click to" from the link text and added Font Awesome icons
common to "show/hide" links.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0a66d33d8c5d778e3a0961cb5953e2432d9ccb65)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23385: Hide 'Default values' fields by default
Nick Clemens [Fri, 26 Jul 2019 14:48:51 +0000 (14:48 +0000)]
Bug 23385: Hide 'Default values' fields by default

To test:
1 - Go to Tools->Import patrons
2 - Choose a file
3 - Scroll a long way to submit
4 - Apply patch
5 - Choose a file
6 - Can submit easily
7 - Click to expand and enter default fields
8 - Confirm can still submit and that values entered are used

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9258d385baa94a00f671dea6315c7738a8f38026)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23438: Compiled CSS
Fridolin Somers [Mon, 2 Sep 2019 12:43:44 +0000 (14:43 +0200)]
Bug 23438: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23438: Use Font Awesome icons in intranet search results browser
Fridolin Somers [Wed, 7 Aug 2019 13:33:52 +0000 (15:33 +0200)]
Bug 23438: Use Font Awesome icons in intranet search results browser

In intranet after a search you see a results browser top left of biblio record details.

Actually this uses text for links next and previous with a character for the arrows.
I propose to use Font Awesome icons arrows.

In fact the translated text is often too large for those buttons.
For example "Previous" is "Préédant" in french and it causes the next and previous buttons to display on two lines.
Using icons is more compact and easy to use.

This patch also adds the list icon to back to results link and changes for a minimal text "Results".

1) Go to intranet
2) Perform a search with a few results
3) Click on first record
4) Check browser displays well
5) Click on next icon, check you go to next search result
6) Click on revious icon, check you go to previous search result
7) Click on "Results", you come back to search results
8) Clik on "Last" and click on last record
9) Check browser displays well

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2fade168c81bc05d24164780cbddc100302dd71f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23408: Move relatives-issues-table to an include
Nick Clemens [Thu, 1 Aug 2019 11:44:39 +0000 (11:44 +0000)]
Bug 23408: Move relatives-issues-table to an include

TO test:
1 - Find and adult patron
2 - Add a child account
3 - Check out some things to the child
4 - View the adults account, click 'Relatives checkouts'
5 - Observe table is oddly formatted
6 - View on both the 'Check out' and 'Details' tabs
7 - Apply patch
8 - Tables are displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0548bfcd67ab8e0445ff7f0f52d3c7c10b98ed1b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23319: Implement blocking errors for neworderbiblio and basket.pl
Nick Clemens [Mon, 15 Jul 2019 17:46:36 +0000 (17:46 +0000)]
Bug 23319: Implement blocking errors for neworderbiblio and basket.pl

To test:
1 - Hit neworderbiblio with a query and no vendor
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat
    Or, add to basket from existing record with a search
    Refresh the page (url has no parameters)
2 - Get an internal server error
3 - Add bookseller
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1
4 - Click 'Order' on a result
5 - Internal server error
6 - Apply patch
7 - Repeat 1-4, you get 'Vendor not found' or 'Basket not found'

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2782a039aa7883107c74ab6e446aa51b9f555683)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23436: add a label for duplicate backend
Alex Arnaud [Wed, 7 Aug 2019 08:57:01 +0000 (10:57 +0200)]
Bug 23436: add a label for duplicate backend

Reproduce issue:
 - Enable "EnableAdvancedCatalogingEditor" preference
 - Go to cataloguing and click on advanced editor
 - Click on the down arrow in "Save to catalog" menu
 - You should see an undefined named save backend

Test patch:
 - Enable "EnableAdvancedCatalogingEditor" preference
 - Go to cataloguing and click on advanced editor to save preference to
   the cookie
 - Click on the down arrow in "Save to catalog" menu
 - You should see a "Duplicate" named backend

Test Bug 16232 for no regression:
 - Search for a biblio in catalog
 - Click in "Edit record"
 - Advanced editor should appear.
   SUCCESS => browser url ends with #duplicate/{original biblionumber}
           => Title above toolbar is "Editing duplicate record of
              #{original biblionumber}"
 - Save
   SUCCESS => browser url ends with #catalog/{new biblionumber}
           => Title above toolbar is "Editing catalog record #{new
biblionumber}"

More test:
 - Search for a biblio in catalog
 - Click on "Edit record"
 - Advanced editor should appear
 - Click on the down arrow in "Save to catalog" menu and click on
   Duplicate,
 - Record should be saved as a new one (same behavior)

Signed-off-by: cori <corilynn.arnold@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a8ddf55667f60a3cdc23ef0b6272921bc975bc73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23416: DBRev 19.05.03.001
Martin Renvoize [Mon, 12 Aug 2019 13:37:23 +0000 (14:37 +0100)]
Bug 23416: DBRev 19.05.03.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 78c2800bc833759302bf68e1dc3a4fed26a5163e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23416: (QA follow-up) Add IGNORE to updatedatabase SQL statement
Katrin Fischer [Thu, 8 Aug 2019 13:37:58 +0000 (13:37 +0000)]
Bug 23416: (QA follow-up) Add IGNORE to updatedatabase SQL statement

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d559e89596cef1848c5eaef5554a1fc49d899f88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23416: Add PreserveSerialNotes system preference
Nick Clemens [Fri, 2 Aug 2019 13:22:37 +0000 (13:22 +0000)]
Bug 23416: Add PreserveSerialNotes system preference

Bug 11492 intended to pass routinglists forward. It also passed forward serial notes.
This may or not me desired behvaiour, to avoid changing functionality twice I add a syspref
to control this behaviour.

To test:
 1 - Have or create a subscription in the serials module
 2 - Recieve an issue, making sure ot ad a note
 3 - Go to receive again, note the note from the last serial is set for the expected issue
 4 - Apply patch
 5 - Update database, restart all the things
 6 - Receive the issue leaving the note in place
 7 - Note the next expected issue has the note
 8 - Find the syspref PreserveSerialNotes
 9 - Confirm it defaulted to Do
10 - Set it to 'Do not'
11 - Receive the expected serial leavign the note
12 - Note the newly generated expected serial has no note
13 - prove -v t/db_dependent/Serials.t

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a64c8cd1a4b2c237b3abf777480d7fc8733986d3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23294: Show actual price when ordering
Nick Clemens [Mon, 15 Jul 2019 18:29:45 +0000 (18:29 +0000)]
Bug 23294: Show actual price when ordering

To test:
1 - Have a basket
2 - Add an order
3 - Modify the order, note you cannot see the unitprice/Actual cost
4 - Apply patch
5 - Note it is there
6 - Add to IntranetUserCSS:
    .ordering_unitprice{ display:none; }
7 - Reload
8 - Note it is hidden

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d2e85ac9949ba6ccbe7470ae2caf446c05e0b941)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23338: Allow specifying order level replacement price when adding to basket from...
Nick Clemens [Thu, 18 Jul 2019 13:08:18 +0000 (13:08 +0000)]
Bug 23338: Allow specifying order level replacement price when adding to basket from file

To test:
 0 - Clear MarcFieldsToOrder and MarcItemFieldsToOrder preferences
 1 - Have a budget/fund/vendor in acquisitions
 2 - Create or find a basket for vendor
 3 - Add to basket from a file or staged batch (can use any record)
 4 - Note there is no option for replacement price
 5 - Add the order
 6 - Replacement price is 0 - you must modify order or set upon receiving
 7 - Apply patch
 8 - Repeat
 9 - Disable matchign check during add to basket
10 - Note you can specify a replacement price
11 - Do so
12 - Note it is saved in order

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95fe32e224af1c4ac9deb7d1b5dbe668053f8a47)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoUpdate release notes for 19.05.03 release v19.05.03
Fridolin Somers [Wed, 28 Aug 2019 13:36:51 +0000 (15:36 +0200)]
Update release notes for 19.05.03 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoIncrement version for 19.05.03 release
Fridolin Somers [Wed, 28 Aug 2019 13:30:55 +0000 (15:30 +0200)]
Increment version for 19.05.03 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoTranslation updates for Koha 19.05.03
Koha translators [Wed, 28 Aug 2019 13:29:09 +0000 (10:29 -0300)]
Translation updates for Koha 19.05.03

5 years agoBug 22142: Do not revert data if 'unchanged' was set
Jonathan Druart [Mon, 5 Aug 2019 15:54:57 +0000 (10:54 -0500)]
Bug 22142: Do not revert data if 'unchanged' was set

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cec6f46b47ae9625222f35014f6693ba7bb365e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22142: Highlight the issue
Nick Clemens [Thu, 13 Jun 2019 14:20:25 +0000 (14:20 +0000)]
Bug 22142: Highlight the issue

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 52885ff55b1cac4b09129cc504bb23d169b22c13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23253: Fix OpacNavRight for self reg by email
Jonathan Druart [Mon, 5 Aug 2019 14:04:25 +0000 (09:04 -0500)]
Bug 23253: Fix OpacNavRight for self reg by email

The code expects to display OpacNavRight content at the bottom of the
login form when a user just registered.

Test plan:
- Turn PatronSelfRegistrationVerifyByEmail on
- Register a patron
- Confirm by clicking on the link you received by email (or see the
message_queue table)
=> The OpacNavRight content should be displayed

QA Note: This code smells, the code in the pl should not be needed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f9572dd1acd9f39229d8cd864050a536b9c2815d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23253: (bug 22318 follow-up) Fix OpacNavRight even if opacuserlogin is off
Jonathan Druart [Mon, 5 Aug 2019 14:02:15 +0000 (09:02 -0500)]
Bug 23253: (bug 22318 follow-up) Fix OpacNavRight even if opacuserlogin is off

There are other occurrences of OpavNavRight that bug 22318 forgot to
adjust to use the news system instead of the syspref.

Test plan:
- turn off opacuserlogin
- create a news for OpacNavRight
- go to the opac main page
=> Confirm that the OpacNavRight content is displayed correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee7ba48bfe9d3f43bbc1bb88f62bf12854e5a838)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23455: Patron card printing from Patron lists is broken
Owen Leonard [Thu, 15 Aug 2019 13:46:35 +0000 (13:46 +0000)]
Bug 23455: Patron card printing from Patron lists is broken

This patch makes a few corrections to the process of printing patron
cards from the patron lists page. These changes are necessitated by Bug
20650: Changes to the markup in patroncards/print.tt were not reflected
in the JavaScript in patron_lists/lists.tt.

Also fixed: A missing quotation mark, a missing semicolon, and
incorrect template variable filter.

To test, apply the patch and go to Tools -> Patron lists.

 - Click the "Actions" menu corresponding to a patron list.
 - Select "Print patron cards."
 - In the "Print patron cards" modal, click the "Export" button.
 - The modal should reload with a link to download a patron card PDF.
   The link should work correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a57aea15a7f86e71bdfb6d6540aed18b2702b226)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>