]> git.koha-community.org Git - koha.git/log
koha.git
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>
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>
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>
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>
5 years agoBug 23272: (RM followup) Fix failing tests
Martin Renvoize [Fri, 13 Sep 2019 10:19:28 +0000 (11:19 +0100)]
Bug 23272: (RM followup) Fix failing tests

This bug introduced a regression whereby if any authorized value has no
branch limitations then the authorized value administration page would
fail to display at all.

A simple ternary corrects the issue, but I'm now wondering about the
logic of returning 'undef' from 'get_branch_limits'.. perhaps an empty
(or full) resultset might be a better option to prevent us from
requireing ternaries before calling chained methods on such objects.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: DBRev 19.06.00.028
Martin Renvoize [Fri, 13 Sep 2019 07:09:15 +0000 (08:09 +0100)]
Bug 6759: DBRev 19.06.00.028

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: (QA follow-up) Unit tests
Tomas Cohen Arazi [Thu, 12 Sep 2019 18:16:04 +0000 (15:16 -0300)]
Bug 6759: (QA follow-up) Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 6759: Update existing accountlines for 'A'
Martin Renvoize [Wed, 24 Apr 2019 10:15:33 +0000 (11:15 +0100)]
Bug 6759: Update existing accountlines for 'A'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
5 years agoBug 6759: Split account creation and renewal charges
Martin Renvoize [Wed, 24 Apr 2019 10:08:49 +0000 (11:08 +0100)]
Bug 6759: Split account creation and renewal charges

Test plan:
1. Enable charging for patron enrolement
2. Add a new patron where the category is charged for
3. Note the charge of type 'Account management fee'
4. Renew the patron
5. Note the next charge of type 'Account management fee'
6. Apply patch
7. Repeat steps 1-6 and note the first charge will be of type 'Account
creation fee' and the second of type 'Account renewal fee'
8. Bonus points, enable 'FeeOnChangePatronCategory' and check that when
changing a patron from a free category to a charged one that a new
'Account renewal fee' is charged.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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>
5 years agoBug 23272: Adapt controller and tests
Tomas Cohen Arazi [Fri, 5 Jul 2019 19:24:17 +0000 (16:24 -0300)]
Bug 23272: Adapt controller and tests

This patch adapts the controller script for handling authorised values,
and the tests to reflect the method names changes.

To test:
- Verify you can add/delete/edit authorised values with/without branch
limitations, as usual
=> SUCCESS: All works as usual!
- Run:
  $ kshell
 k$ prove t/db_dependent/AuthorisedValues.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
5 years agoBug 23272: Make Koha::AuthorisedValue use Koha::Object::Limit::Library
Tomas Cohen Arazi [Fri, 5 Jul 2019 19:23:52 +0000 (16:23 -0300)]
Bug 23272: Make Koha::AuthorisedValue use Koha::Object::Limit::Library

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>
5 years agoBug 15497: (RM follow-up) Fix for new itemtype case
Martin Renvoize [Fri, 13 Sep 2019 06:51:53 +0000 (07:51 +0100)]
Bug 15497: (RM follow-up) Fix for new itemtype case

When creating an entirely new itemtype the script would fail upon
attempting to lookup existing itemtype branch limits. This patch adds a
ternary to prevent the failure.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
5 years agoBug 23580: Add C4::Context->yaml_preference
Tomas Cohen Arazi [Tue, 10 Sep 2019 14:42:31 +0000 (11:42 -0300)]
Bug 23580: Add C4::Context->yaml_preference

This patch adds a new methods to be used on YAML-based sysprefs. The
idea is that we would use it instead of handling the YAML decoding
in-place everywhere we use YAML syprefs.

Ideally, we could even move pipe separated values sysprefs into YAML,
etc.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Context.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23580: Unit tests
Tomas Cohen Arazi [Tue, 10 Sep 2019 14:42:02 +0000 (11:42 -0300)]
Bug 23580: Unit tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
5 years agoBug 15497: DBRev 19.06.00.027
Martin Renvoize [Thu, 12 Sep 2019 15:32:37 +0000 (16:32 +0100)]
Bug 15497: DBRev 19.06.00.027

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15497: (QA follow-up) Fix call in search_with_localization
Tomas Cohen Arazi [Thu, 12 Sep 2019 14:50:40 +0000 (11:50 -0300)]
Bug 15497: (QA follow-up) Fix call in search_with_localization

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15497: (QA follow-up) Use the methods from bug 23281 instead
Martin Renvoize [Thu, 12 Sep 2019 15:27:19 +0000 (16:27 +0100)]
Bug 15497: (QA follow-up) Use the methods from bug 23281 instead

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15497: Limit itemtypes by branch in additem.pl
Martin Renvoize [Thu, 12 Sep 2019 15:27:00 +0000 (16:27 +0100)]
Bug 15497: Limit itemtypes by branch in additem.pl

This patch adds a select multiple when you add/edit an itemtype, creates functions to return itemtypes by library, and filters the options of itemtype select in additem

To test:
1) Apply this patch set
2) perl installer/data/mysql/updatedatabase.pl
3) In koha administration => item types, edit "Books" itemtype
CHECK => there is now a select multiple whith libraries at the bottom
4) select centerville and save
5) set centerville as current libary
6) search for any biblio in the catalog
7) click on "edit items"
CHECK => book item type is present
8) set any other libary as current library
SUCCESS => book item type is not present
9) Sign off

Sponsored-by: Northeast Kansas Library System
Sponsored-by: Southeast Kansas Library System
Sponsored-by: Central Kansas Library System
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15497: Modify schemas
Martin Renvoize [Thu, 12 Sep 2019 15:26:32 +0000 (16:26 +0100)]
Bug 15497: Modify schemas

Sponsored-by: Northeast Kansas Library System
Sponsored-by: Southeast Kansas Library System
Sponsored-by: Central Kansas Library System
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15497: Add itemtypes_branches table and atomic update
Agustin Moyano [Thu, 4 Jul 2019 04:30:17 +0000 (01:30 -0300)]
Bug 15497: Add itemtypes_branches table and atomic update

Sponsored-by: Northeast Kansas Library System
Sponsored-by: Southeast Kansas Library System
Sponsored-by: Central Kansas Library System
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23599: Avoid exploding in search_with_library_limits when no library is passed
Tomas Cohen Arazi [Thu, 12 Sep 2019 14:38:14 +0000 (11:38 -0300)]
Bug 23599: Avoid exploding in search_with_library_limits when no library is passed

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23599: Regression tests
Tomas Cohen Arazi [Thu, 12 Sep 2019 14:37:34 +0000 (11:37 -0300)]
Bug 23599: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: DBRev 19.06.00.026
Martin Renvoize [Wed, 11 Sep 2019 07:57:42 +0000 (08:57 +0100)]
Bug 20691: DBRev 19.06.00.026

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: (QA follow-up) API-related fixes
Tomas Cohen Arazi [Tue, 10 Sep 2019 18:09:20 +0000 (15:09 -0300)]
Bug 20691: (QA follow-up) API-related fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: (QA follow-up) Fix atomic update
Tomas Cohen Arazi [Tue, 10 Sep 2019 18:01:34 +0000 (15:01 -0300)]
Bug 20691: (QA follow-up) Fix atomic update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: (follow-up) Fix qa fails
Agustin Moyano [Thu, 23 May 2019 03:15:47 +0000 (00:15 -0300)]
Bug 20691: (follow-up) Fix qa fails

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: Implement fines view
Kyle M Hall [Wed, 22 May 2019 06:20:13 +0000 (03:20 -0300)]
Bug 20691: Implement fines view

This patch implements the logic to show guarantee's fines with guarantor user.

To test:
1) Apply (if not already done) steps 1 to 5 of previous patch
2) Apply this patch
3) Set OPACFinesTab and AllowStaffToSetFinesVisibilityForGuarantor preference to "Allow"
4) Find a guarantee and in accounting create a manual invoice
5) Enter OPAC with guarantor user
CHECK => In summary there is no "Relatives fines" tab
6) On intranet edit guarantee and set "Show fines to guarantors" to "Yes" and save
7) Reload guarantor's OPAC
SUCCESS => You see a "Relatives fines" tab with guarantee's fines information
8) Sign off

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: Add ability to turn feature on and off
Kyle M Hall [Wed, 22 May 2019 05:41:24 +0000 (02:41 -0300)]
Bug 20691: Add ability to turn feature on and off

This patch adds two preferences
1. AllowPatronToSetFinesVisibilityForGuarantor: Allow/Don't allow patrons to choose their own privacy settings for showing the patron's fines to the patron's guarantor
2. AllowStaffToSetFinesVisibilityForGuarantor: Allow/Don't allow staff to set the ability for a patron's fines to be viewed by linked patrons in the OPAC

Also adds a tinyint, non nullable, default to 0 column in borrower and deletedborrower named privacy_guarantor_fines.
1. privacy_guarantor_fines = 0 => don't allow guarantor to see guarantee's fines
2. privacy_guarantor_fines = 1 => allow guarantor to see guarantee's fines

To test:
1) git reset --hard master
2) apply patches (including dependencies)
3) perl installer/data/mysql/updatedatabase.pl
4) dbic
5) restart_all
6) in intranet search for AllowPatronToSetFinesVisibilityForGuarantor and AllowStaffToSetFinesVisibilityForGuarantor preferences
SUCCESS => both preferences should be present
7) search for a patron with guarantor
SUCCESS => in details tab, in "Library use" section you should see a row labeled "Show fines to guarantor"
8) edit
CHECK => in Guarantor information there is no "Show fines to guarantor" select
9) set AllowStaffToSetFinesVisibilityForGuarantor preference to "Allow"
10) return to patron with guarantor and edit
SUCCESS => in Guarantor information section there is a "Show fines to guarantor" select
11) change "Show fines to guarantor" select to "Yes" and save
SUCCESS => Value is saved
12) go to details tab
SUCCESS => in "Library use" section you see a row labeled "Show fines to guarantor" with value "Yes"
13) set OPACPrivacy preference to "Allow"
14) open 2 opacs, one with a patron that has a guarantor and another that hasn't and go to "your privacy" tab.
CHECK => in both opacs you should not see a "Allow your guarantor to view your current fines?" select
15) in intranet set AllowPatronToSetFinesVisibilityForGuarantor to "Allow"
16) refresh both opacs
SUCCESS => in Patron that has guarantor you see a "Allow your guarantor to view your current fines?" select
=> in Patron without guarantor you don't see a "Allow your guarantor to view your current fines?" select
17) in Patron with guarantor change value of select and save
SUCCESS => Value is saved
18) in intranet set OPACPrivacy preference to "Don't allow" and AllowPatronToSetFinesVisibilityForGuarantor to "Don't allow"
19) got to "your personal details" in both opacs
CHECK => in both opacs you should not see no Privacy section with a "Allow your guarantor to view your current fines?" select
20) in intranet set AllowPatronToSetFinesVisibilityForGuarantor to "Allow"
21) refresh both opacs
SUCCESS => in Patron that has guarantor you see a "Allow your guarantor to view your current fines?" select in a Privacy section
        => in Patron without guarantor there is no Privacy section
22) in Patron with guarantor change value of select and update
SUCCESS => Value is saved
23) Sign off

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20691: Database update
Kyle M Hall [Tue, 1 May 2018 17:03:32 +0000 (13:03 -0400)]
Bug 20691: Database update

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
5 years agoBug 22996: DBRev 19.06.00.25
Martin Renvoize [Tue, 10 Sep 2019 08:38:39 +0000 (09:38 +0100)]
Bug 22996: DBRev 19.06.00.25

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22996: Move barcode separators to a preference
Marcel de Rooy [Tue, 28 May 2019 14:14:02 +0000 (14:14 +0000)]
Bug 22996: Move barcode separators to a preference

This patch makes batchMod.pl and inventory.pl pick the barcode
separators from a new pref BarcodeSeparators (instead of hardcoding
these separators differently).
A few other code locations may be potential candidates for such a change
too.

Test plan:
Test inventory with a few variations of BarcodeSeparators.
Test Batch item modification similarly.

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>
5 years agoBug 22996: Add new preference BarcodeSeparators
Marcel de Rooy [Tue, 28 May 2019 14:47:35 +0000 (14:47 +0000)]
Bug 22996: Add new preference BarcodeSeparators

The pref value is used within a regex character class like [pref].
This means that we should precede hyphen with a backslash; the pipe char
or dot does not need escaping.

Test plan:
Run new install or upgrade.
Check pref value.

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>
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>
5 years agoBug 22627: Rename tab on my summary page
Katrin Fischer [Sun, 11 Aug 2019 10:25:14 +0000 (12:25 +0200)]
Bug 22627: Rename tab on my summary page

This completes the first patch by also changing the
tab on the OPAC summary page from "Fines" to "Charges".

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22627: Renames OPAC fines tab to 'your charges' to be more inclusive
Hayley Mapley [Mon, 27 May 2019 02:38:52 +0000 (14:38 +1200)]
Bug 22627: Renames OPAC fines tab to 'your charges' to be more inclusive

Brought up on Bug 21578, the 'your fines' tab in the OPAC would be
better named as 'your charges' as not all charges are fines, some are
credits etc.

To test:
1) In the OPAC, click on the user's name and note that the tab that was called your fines is now called your charges.
2) When you click on the tab, the title says Your charges, the breadcrumb says Your
charges, and the table title is Your charges.

Sponsored-by: Catalyst IT.
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>
5 years agoBug 23512: (follow-up) Markup comments and corrections
Owen Leonard [Fri, 30 Aug 2019 15:10:12 +0000 (15:10 +0000)]
Bug 23512: (follow-up) Markup comments and corrections

This patch adds comments to the template to highlight the markup
structure. It also corrects some minor markup errors.

This patch should have no effect on the interface or functionality.

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>
5 years agoBug 23512: Reindent notices and slips page (letter.tt)
Owen Leonard [Mon, 26 Aug 2019 18:01:03 +0000 (18:01 +0000)]
Bug 23512: Reindent notices and slips page (letter.tt)

This patch re-indents the template for notices and slips. It
makes only whitespace changes. It should have no effect on the behavior
of the page.

To test, go to Tools -> Notices & slips.

Test every aspect of the notice creation and edit process. At each step
the page should work correctly.

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>
5 years agoBug 23464: Compiled CSS
Martin Renvoize [Mon, 9 Sep 2019 10:27:50 +0000 (11:27 +0100)]
Bug 23464: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23464: (follow-up) QA fixes
Owen Leonard [Thu, 22 Aug 2019 18:55:21 +0000 (18:55 +0000)]
Bug 23464: (follow-up) QA fixes

This patch corrects two issues raised during testing:

 - Move JavaScript out of template check for IntranetUserJS so that
   SpineLabelAutoPrint behavior works correctly.
 - Add "close" button to pop-up window for cases when the barcode was
   not found.

Also changed:

- Added "required" attribute to barcode input on quick spine
  label printing page so that submitting an empty form will not work.

- Tweaked CSS slightly to fix alignment of spine label form and submit
  button. (You must rebuild the staff client CSS:
 https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

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>
5 years agoBug 23464: Update the process of quick spine label printing
Owen Leonard [Wed, 14 Aug 2019 21:50:00 +0000 (21:50 +0000)]
Bug 23464: Update the process of quick spine label printing

This patch makes changes to the way quick spine label printing works,
either from the bibliographic details page or the Quick spine label
creator page.

To test, apply the patch and go to Tools -> Quick spine label creator.

 - Type or scan a barcode. Submitting the form should trigger a popup
   window with the spine label print page. The "print" button should
   be centered at the bottom of the window in a footer-like container.
   - If you have SpineLabelAutoPrint enabled, the print dialog should
     appear automatically.
   - After printing, the pop-up window should close and and focus should
     be returned to the barcode field.

Enable the SpineLabelShowPrintOnBibDetails system preference. View the
bibliographic details page for a record in the catalog.

 - In the holdings table, a "Spine label" column should appear as the
   second-to-last column. The column should contain "Print label"
   Bootstrap-style buttons.
 - Clicking a "Print label" button should trigger a pop-up window with
   the spine label print page. The behavior of the window should be the
   same as above.

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>
5 years agoBug 23492: Compiled CSS
Martin Renvoize [Mon, 9 Sep 2019 10:23:19 +0000 (11:23 +0100)]
Bug 23492: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23492: OPAC search facet header should not be a link at larger browser widths
Owen Leonard [Thu, 22 Aug 2019 14:57:20 +0000 (14:57 +0000)]
Bug 23492: OPAC search facet header should not be a link at larger browser widths

This patch adds some JavaScript-driven "breakpoints" to the OPAC so that
on the search results page the "Refine your search" heading has
different behaviors depending on whether facets are being displayed as a
sidebar.

To test, apply the patch and regenerate the OPAC SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Go to the OPAC and resize your browser to be greater than ~ 800px wide.

 - Perform a catalog search which will return several results.
 - In the left-hand sidebar of the search results page, the "Refine your
   search" heading should not be styled like a link. Hovering over it
   with the mouse should not change the cursor to the pointing-hand.
 - Narrow your browser window until the sidebar collapses.
   - The "Refine your search" heading should now be styled as a link,
     with a right-arrow icon before it.
   - Clicking it should expand the facets. The icon should change to a
     down-arrow.
 - Widen your browser window and test again.

 - Perform the same tests when starting with a narrow browser window.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
5 years agoBug 23539: DBRev 19.06.00.024
Martin Renvoize [Fri, 6 Sep 2019 12:20:14 +0000 (13:20 +0100)]
Bug 23539: DBRev 19.06.00.024

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
5 years agoBug 22258: DBRev 19.06.023
Martin Renvoize [Fri, 6 Sep 2019 12:16:44 +0000 (13:16 +0100)]
Bug 22258: DBRev 19.06.023

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22258: Increase Elasticsearch maximum field count to 10000
Ere Maijala [Fri, 5 Apr 2019 07:29:42 +0000 (10:29 +0300)]
Bug 22258: Increase Elasticsearch maximum field count to 10000

Increases maximum field count from the default 1000 to 10000 to accommodate large records and MARC as an array.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22258: Elasticsearch: Add array as an alternative MARC format
Ere Maijala [Fri, 15 Feb 2019 11:32:03 +0000 (13:32 +0200)]
Bug 22258: Elasticsearch: Add array as an alternative MARC format

Adds preference ElasticsearchMARCFormat that controls whether MARC records are stored as ISO2709/MARCXML or array. Array is searchable by field and also indexes all subfields in the _all field for searching.

Test plan:
1. Test that searching and indexing works with the patch without any changes.
2. Switch to array format and index some records.
3. Check e.g. the 008 field of a record and verify that the record can be found with the contents enclosed in quotes.
4. Check that it's possible to search for a specific field/subfield. Search query: marc_data_array.fields.655.subfields.a:Diaries
5. Check that tests still pass, especially t/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
5 years agoBug 23013: Compiled CSS
Martin Renvoize [Thu, 22 Aug 2019 14:24:30 +0000 (15:24 +0100)]
Bug 23013: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23013: Upgrade DataTables in the staff client
Owen Leonard [Thu, 6 Jun 2019 16:48:08 +0000 (16:48 +0000)]
Bug 23013: Upgrade DataTables in the staff client

This patch upgrades DataTables and makes some style changes to the
default DataTables toolbar style. DataTables assets are now combined and
minified using their download customizer, bundling together these
elements:

 - JSZip 2.5.0
 - pdfmake 0.1.36
 - DataTables 1.10.18
 - Buttons 1.5.6
 - Column visibility 1.5.6
 - HTML5 export 1.5.6
 - Print view 1.5.6
 - FixedHeader 3.1.4

DataTables assets have been moved from lib/jquery/plugins to
lib/datatables. The global header and footer include files are updated
correspondingly.

This patch removes the custom "four_button" pagination configuration and
updates pages which used it to use the built-in "full" type instead.
This is done for the sake of consistency and upgradability. This change
touches a lot of files.

Table-specific CSS has been moved from staff-global.scss to a new
include, _tables.scss. A second common include, _mixins.scss has some
variable definitions used in both files.

Many images have been made obsolete by this change and have been
removed.

To test, apply the patch and regenerate the staff client CSS. View
various pages in the staff client with tables:

 - Not formatted by DataTables:
   - Reports -> Most circulated items
   - Catalog -> Search results
 - Formatted by DataTables without column configuration
   - Acquisitions -> Vendor search
   - Lists
 - Formatted by DataTables with column configuration
   - Administration -> Libraries
   - Administration -> Item types
   - Reports -> Saved SQL reports
 - Non-standard DataTables configurations:
   - Circulation -> Checkouts
   - Administration -> System preferences
   - Reports -> Lost items

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (RM follow-up) Add class relatinship to BorrowerRelationship
Martin Renvoize [Wed, 21 Aug 2019 07:23:52 +0000 (08:23 +0100)]
Bug 14570: (RM follow-up) Add class relatinship to BorrowerRelationship

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: DBRev 19.06.00.022
Martin Renvoize [Tue, 20 Aug 2019 15:15:17 +0000 (16:15 +0100)]
Bug 14570: DBRev 19.06.00.022

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (RM follow-up) Consistent button styling
Martin Renvoize [Tue, 20 Aug 2019 14:55:45 +0000 (15:55 +0100)]
Bug 14570: (RM follow-up) Consistent button styling

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: Add about.pl entry for wrong relationship data
Tomas Cohen Arazi [Mon, 19 Aug 2019 13:32:06 +0000 (10:32 -0300)]
Bug 14570: Add about.pl entry for wrong relationship data

This patch adds a check and an entry to the about.pl, for bad
relationship data. The checks are:

- 'relationship' containing '_bad_data' (generated by the atomicupdate
  on undef relationships.
- 'relationship' values that are not in the borrowerRelationship
syspref.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (QA follow-up) Call Koha::Patron->find in scalar context
Tomas Cohen Arazi [Mon, 19 Aug 2019 13:31:41 +0000 (10:31 -0300)]
Bug 14570: (QA follow-up) Call Koha::Patron->find in scalar context

This patch prevents opac/opac-memberentry.pl from exploding.

To test:
- Login with a known user in the OPAC
- Open the opac/opac-memberentry.pl page
=> FAIL: It explodes
- Apply this patch
- Restart all the things just in case:
  $ restart_all
- Reload the page
=> SUCCESS: Things work!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: Handle missing 'relationship' in atomicupdate (bad data)
Tomas Cohen Arazi [Mon, 19 Aug 2019 10:22:50 +0000 (07:22 -0300)]
Bug 14570: Handle missing 'relationship' in atomicupdate (bad data)

This patch adds two steps to the upgrade process:
- Handle the pathologic case in which there's a guarantorid and no
'relationship'.
- Performs a cleanup on the relevant columns when the guarantor data
contains a guarantorid, and is then migrated into the
borrower_relationships table. The original code left the information
in the borrowers table, so no clear separation between guarantors as
patrons and the virtual ones.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (QA follow-up) Fix tests
Tomas Cohen Arazi [Fri, 16 Aug 2019 17:43:42 +0000 (14:43 -0300)]
Bug 14570: (QA follow-up) Fix tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (QA follow-up) Consistency displaying the list of guarantors
Tomas Cohen Arazi [Mon, 12 Aug 2019 20:14:22 +0000 (17:14 -0300)]
Bug 14570: (QA follow-up) Consistency displaying the list of guarantors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: Remove wrong parameter in add_guarantor call
Tomas Cohen Arazi [Mon, 12 Aug 2019 19:43:14 +0000 (16:43 -0300)]
Bug 14570: Remove wrong parameter in add_guarantor call

This patch just removes an unused parameter.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: Add error handling to Koha::Patron::Relationship->store
Tomas Cohen Arazi [Mon, 12 Aug 2019 19:13:25 +0000 (16:13 -0300)]
Bug 14570: Add error handling to Koha::Patron::Relationship->store

This patch adds checks on the values for the 'relationship'. This is
done to avoid future problems when migrating relationships from the
plain text syspref into (why not) a proper table. And to preserve
consistency.

There's also catching on possible broken constraints and throwing a new
exception

Tests are added for both the new exceptions and the changes to
Koha::Patron::Relationship.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t \
          t/db_dependent/Koha/Patron.t \
          t/db_dependent/Koha/Patron/Relationship.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: Add a UNIQUE constraint on guarantor_id+guarantee_id
Tomas Cohen Arazi [Tue, 13 Aug 2019 16:28:26 +0000 (13:28 -0300)]
Bug 14570: Add a UNIQUE constraint on guarantor_id+guarantee_id

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (QA follow-up) Fix issues in Guarantor context
Kyle M Hall [Mon, 12 Aug 2019 18:21:07 +0000 (14:21 -0400)]
Bug 14570: (QA follow-up) Fix issues in Guarantor context

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (QA follow-up) Fix issues in Guarantee context
Kyle M Hall [Mon, 12 Aug 2019 18:14:39 +0000 (14:14 -0400)]
Bug 14570: (QA follow-up) Fix issues in Guarantee context

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: Update schema files [Do Not Push]
Kyle M Hall [Fri, 17 May 2019 12:15:08 +0000 (08:15 -0400)]
Bug 14570: Update schema files [Do Not Push]

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (follow-up) Fix patron type when "add child" button is pressed
Agustin Moyano [Wed, 3 Jul 2019 17:36:00 +0000 (14:36 -0300)]
Bug 14570: (follow-up) Fix patron type when "add child" button is pressed

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (QA follow-up) fix sample borrowers, remove guarantorid)
Liz Rea [Wed, 22 May 2019 00:08:39 +0000 (19:08 -0500)]
Bug 14570: (QA follow-up) fix sample borrowers, remove guarantorid)

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (follow-up) Fix tests
Agustin Moyano [Tue, 21 May 2019 03:07:47 +0000 (00:07 -0300)]
Bug 14570: (follow-up) Fix tests

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14570: (follow-up) fix qa FAIL tests
Agustin Moyano [Sat, 18 May 2019 00:38:37 +0000 (21:38 -0300)]
Bug 14570: (follow-up) fix qa FAIL tests

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>