]> git.koha-community.org Git - koha.git/log
koha.git
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>
5 years agoBug 14570: (follow-up) fix table name in j2a.pl
Agustin Moyano [Sat, 18 May 2019 00:10:02 +0000 (21:10 -0300)]
Bug 14570: (follow-up) fix table name in j2a.pl

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: Make it possible to add multiple guarantors to a record
Kyle M Hall [Mon, 2 May 2016 15:00:39 +0000 (15:00 +0000)]
Bug 14570: Make it possible to add multiple guarantors to a record

This patch adds the ability to set an unlimited number of guarantors
for a given patron. As before, each guarantor may be linked to another
Koha patron, and all the behavior that applies to a given guarantor
remains the same.

Test Plan:
 1) Apply this patch
 2) Run updatedatabase.pl
 3) Find some patrons with guarantors, verify the still have their guarantor
 4) Test adding and removing guarantors on a patron record, both Koha users and not
 5) Verify the "Add child" button works
 6) Verify NoIssuesChargeGuarantees still works
 7) Verify tools/cleanborrowers.pl will not delete a guarantor
 8) Verify the guarantors are displayed on moremember.pl
 9) Verify the guarantor is removed by members/update-child.pl
10) Verify the guarantor is removed by misc/cronjobs/j2a.pl
11) Verify import patrons converts guarantor_id, relationship, contactfirstname,
  and contactsurname into a guarantor
12) prove t/Patron.t
13) prove t/db_dependent/Circulation.t
14) prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
15) prove t/db_dependent/Items.t
16) prove t/db_dependent/Koha/Patrons.t
17) prove t/db_dependent/Members.t
18) prove t/db_dependent/Patron/Relationships.t

Signed-off-by: Kim Peine <kmpeine@gmail.com>
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 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>
5 years agoBug 20254: Add tests for transport ingest
Colin Campbell [Mon, 10 Dec 2018 12:57:50 +0000 (12:57 +0000)]
Bug 20254: Add tests for transport ingest

Add test framework for Koha::Edifact::Transport
Add specific test that ingest does not duplicate
an existing filename

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20254: Set correct member in working_directory
Colin Campbell [Mon, 10 Dec 2018 12:52:13 +0000 (12:52 +0000)]
Bug 20254: Set correct member in working_directory

Koha::Edifact::Transport working_directory was setting the
wrong member name correct that
method is only used in testing

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20254: Do not ingest files with duplicate filenames
Colin Campbell [Wed, 24 Jan 2018 09:20:12 +0000 (09:20 +0000)]
Bug 20254: Do not ingest files with duplicate filenames

If the supplier delivers the same file twice we are
unable to rename it on the second occurence causing us to download
and process it infinitely.

Check that downloaded filenames are unique against those
on file and reject processing if a duplicate.

This patch delays this check to the ingest stage so that the
same code is processed irrespective of transport

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
5 years agoBug 23281: Cleanup Koha::Patron::Attribute::Types->search
Tomas Cohen Arazi [Mon, 8 Jul 2019 18:23:09 +0000 (15:23 -0300)]
Bug 23281: Cleanup Koha::Patron::Attribute::Types->search

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>
5 years agoBug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types
Tomas Cohen Arazi [Mon, 8 Jul 2019 17:15:48 +0000 (14:15 -0300)]
Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types

This patch makes Koha::Patron::Attribute::Types inherit from
Koha::Objects::Limit::Library so it now has the
->search_with_library_limits method.

Tests are adjusted so it is clear that there is no behaviour change
compared to the (previsouly) called ->search

To test:
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests pass!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patron/Attribute/Types.t
=> SUCCESS: Tests still pass!
- Sign off :-D

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>
5 years agoBug 23281: Add Koha::Objects::Limit::Library
Tomas Cohen Arazi [Mon, 8 Jul 2019 17:13:12 +0000 (14:13 -0300)]
Bug 23281: Add Koha::Objects::Limit::Library

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>
5 years agoBug 23448: (follow-up) Add comments on markup structure
Owen Leonard [Mon, 12 Aug 2019 18:08:37 +0000 (18:08 +0000)]
Bug 23448: (follow-up) Add comments on markup structure

This patch adds comments to the markup in order to highlight the
structure of the page.

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 23448: Clean up subscription detail template
Owen Leonard [Mon, 12 Aug 2019 17:57:55 +0000 (17:57 +0000)]
Bug 23448: Clean up subscription detail template

This patch makes a number of corrections to the subscription detail
page: Re-indented consistently with four spaces. Removed invalid
attributes. Added missing </div>.

To test, apply the patch and go to Serials. Search for a subscription
and view the details page.

The page should look correct. Validating the source should return no
errors.

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 23458: (follow-up) Add comments to markup
Owen Leonard [Tue, 13 Aug 2019 18:26:57 +0000 (18:26 +0000)]
Bug 23458: (follow-up) Add comments to markup

This patch adds a few comments to the markup in order to highlight the
structure of the page.

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 23458: Clean up holds template in the staff client
Owen Leonard [Tue, 13 Aug 2019 15:47:08 +0000 (15:47 +0000)]
Bug 23458: Clean up holds template in the staff client

This patch reindents reserve/request.tt to use four spaces and
to eliminate tabs, following coding guidelines. Trailing white space has
been removed.

To test, apply the patch and use your preferred method for checking the
differences between files while ignoring whitespace. I use diff with the
"-w" flag, but I'm no diffctator.

Test the process of placing a hold in the staff client: A single hold,
multiple holds, etc. Everything should work correctly.

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 17057: (follow-up) Replace onsubmit attributes
Owen Leonard [Tue, 13 Aug 2019 15:54:30 +0000 (15:54 +0000)]
Bug 17057: (follow-up) Replace onsubmit attributes

This patch removes the "onsubmit" attribute from the place hold form.

To test, apply the patch and test placing a hold:

Begin the process of placing a hold on a single title. On the
place hold screen, uncheck the "Hold next available item" checkbox and
click the "Place hold" button.

You should be get an alert saying "Please select an item to place a
hold." Select an item and click the "Place hold" button again. The hold
should be placed.

This patch affects the form validation for placing multiple holds, but I
don't think the JavaScript ever has a chance to run: The template blocks
the user from placing multiple holds if one of the titles has no items.

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 17057: Remove event attributes from holds template
Owen Leonard [Tue, 13 Aug 2019 14:51:10 +0000 (14:51 +0000)]
Bug 17057: Remove event attributes from holds template

My orginal patch for this bug contained a lot of changes made obsolete
by Bug 19469, which created holds_table.inc.

This new version makes one minor change only to request.tt, adding a
class name and removing an onclick attribute.

To test, apply the patch and place an item-level hold on a title.

Start the process of placing another hold on that item. On the "place
hold" screen, in the table of items, you should see a "Cancel hold" link
for the item you previously placed on hold.

 - Click the "Cancel hold" link
   - Clicking "Cancel" in the confirmation dialog should cancel the
     operation.
   - Clicking "OK" should cancel the hold.

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 11529: (RM follow-up) Add note to run misc/batchRebuildBiblioTables.pl
Martin Renvoize [Mon, 19 Aug 2019 08:49:34 +0000 (09:49 +0100)]
Bug 11529: (RM follow-up) Add note to run misc/batchRebuildBiblioTables.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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>
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>
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>
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>
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>
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>
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>
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>
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>
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>