Commit Graph

30975 Commits

Author SHA1 Message Date
David Cook 35cbbd8de9 Bug 21005: Missing row/column defaults cause unexpected results in report wizards
Some report wizards are missing row/column defaults, which sometimes return blank
pages (borrowers_stats.pl) or results always equalling 0, which a non-discerning
user may interpret incorrectly.

If the DEBUG environmental variable is enabled, missing row/column choices will
actually cause fatal software errors as well, which is also undesirable for users.

This patch adds default choices for row and column on
report wizards that had no radio buttons selected, so that a user
can't submit the form without choosing a row and column. This
prevents errors.

To test:
1) Apply patch
2) Visit /cgi-bin/koha/reports/issues_avg_stats.pl
3) Visit /cgi-bin/koha/reports/borrowers_stats.pl
4) Visit /cgi-bin/koha/reports/catalogue_stats.pl
5) Visit /cgi-bin/koha/reports/issues_stats.pl
6) Observe that default choices for row/column are there

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6a451360b8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4edef31391)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 10:16:27 +01:00
Mark Tompsett 1671f009e6 Bug 20592: Return early in ModItem if nothing to update
Two lines of code and move them earlier.
Add a check to make sure there are changes.

Followed the test plan, both the _BEFORE_ and after do as described.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1f0064bbdd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 75d6195c0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 10:10:15 +01:00
Jonathan Druart 4adc6ca70e Bug 20592: Add tests
NOTE: It isn't really a test, but it does trigger
      the return line which was added to ModItem.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 619eca1c7a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 02860425d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 10:09:06 +01:00
Owen Leonard 1ad17b4484 Bug 21497: [17.11.x] Correctly format dates for ILL requests in OPAC
This patch updates the opac ILL template to use the $KohaDates plugin
for displaying dates. Also updated:

- Added "title-string" sorting to allow for correct sorting of dates in
  the table of requests.

To test, apply the patch and log in to the OPAC as a user who has
multiple outstanding ILL requests.

 - In the table of ILL requests, the "Request placed" and "Last updated"
   dates should be formatted according to your system's dateformat
   preference.
 - Sorting of those columns should work correctly.
 - View a request and confirm that "Request placed" and "Last updated"
   dates in this view are also formatted correctly.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a2418f743c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e68d3d9884)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 09:50:18 +01:00
Tomas Cohen Arazi 8617db86e6 Bug 18959: Skip xt/author/Text_CSV_Various.t if Text::CSV::Unicode missing
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ca9a1b76d8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 882e18500c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 09:34:02 +01:00
Tomas Cohen Arazi 0b3b849815 Bug 18959: Text::CSV::Unicode missing from dependencies
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit eb3f78f82e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7d4756c897)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-28 09:33:53 +01:00
Fridolin Somers ffb903404d Update release notes for 17.11.12 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 16:25:42 +01:00
Fridolin Somers 4eb9e4f754 Increment version for 17.11.12 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 16:11:58 +01:00
Fridolin Somers 5c8a631ec5 Merge remote-tracking branch 'translate/17.11.12-translate-20181126' into 17.11.x 2018-11-26 16:08:37 +01:00
Koha translators 51fa70a34a Translation updates for Koha 17.11.12 2018-11-26 11:30:51 -03:00
Martin Renvoize e453baf4ae Bug 21766: Correct filtering on AUDIO_ALERT_PATH js
I managed to introduce a bad filter whilst backporting bug 15734 to the
18.05.x series. This patch attempts to correct that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f3c27b9979)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 09:27:32 +01:00
Andrew Isherwood 42af3bef9f Bug 21641: (follow-up) Address wrong call method
This patch substitutes C4::Accounts->getnextacctno for
C4::Accounts::getnextacctno since getnextacctno is only expecting to be
passed a borrowernumber

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4858c4f736)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ff2de8e181)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:42:06 +01:00
Andrew Isherwood dffd83aae0 Bug 21641: (follow-up) Address additional call
This patch makes the same change as the main patch, just for an
additional occurance of getnextacctno

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6fba062d29)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e79fac32c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:41:51 +01:00
Alex Buckley 7a7531e219 Bug 21641: Added C4::Accounts to getnextacctno() call
Test plan:
1. Fetch and checkout the master branch
2. Checkout an item with a rental charge associated with it to a user
and notice an error is thrown
3. Apply patch
4. Restart memcached and plack
5. Repeat steps 1 and 2 and notice the checkout happens successfully

Sponsored-By: Catalyst IT

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 344dba2fb8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c62543310)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:41:40 +01:00
Nick Clemens 57511ebc15 Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters
This patch makes a correction to a template filter to prevent
incorrectly-encoded HTML in media source links which were preventing
media from embedding correctly in the OPAC.

To test, apply the patch and enable the HTML5MediaEnabled and
HTML5MediaYouTube system preferences.

- Edit a record to include links to videos in 856$u. For example:
  - https://www.youtube.com/watch?v=grTwH6Evdfc
    - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%20Sindbad%20The%20Sailor%20%281936%29.ogv

    View the record in the OPAC and confirm that the videos display in
    the
    "Play media" tab and that they play correctly.

Tested and works as described, also matches the intranet code.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7736b5c2e3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18bb4d5e66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:34:17 +01:00
Nick Clemens c18f11ff30 Bug 21742: Fix YouTube variable propagation
The loop to find all media has an $isyoutube variable. This was declared
outside the loop and never reset. Once a YouTube video was encountered
all subsequent videos were considered as YouTube. This patch reduces the
scope of the variable and resets per loop.

To test:
1 - Enable HTML5Media and HTML5MediaYouTube
2 - Add 856$u to record for a youtube vido and a pdf (sample record
        attached to bug)
3 - View the record, the Play media tab has two video boxes
4 - Play the second, it fails
5 - Apply patch
6 - View record, Play media should include only one video link

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ceba54c8d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ec7e569d55)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:33:09 +01:00
Marcel de Rooy 3ccb7d2da6 Bug 21311: (follow-up) Adjust wording of failed login message
Based on the feedback of Jonathan, Katrin, Mark and Martin (thx), adding
the general remark that if lockout is enabled, an account may be locked
out after x attempts. This does not say that the account on hand is
locked or not.

Adding a <p> tag between 'Log in'-button and 'Forgot your password' for
presentation.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e64650216f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 14e9eb67b9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:31:26 +01:00
Marcel de Rooy e9e5e55e84 Bug 21311: Remove locked message from opac-auth.tt
We should not expose more information than needed when someone tries
to login with invalid credentials. Saying that an account is locked
reveals that the account exists (or perhaps an email address).

Trivial fix. Keeping the var too_many_login_attempts for staff.
Note: We do not remove this distinction for the staff client here (in the
assumption that a library may well have additional security measures in
place for staff client). But it could be done too (on another report).

Test plan:
Enable lockout feature.
Enter invalid credentials until account locks out (on OPAC !!)
Note that message does no longer change to 'Account is locked'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 716301d6f5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55d687f3a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:31:14 +01:00
Victor Grousset 5bffc862f3 Bug 21587: don't drop patrons to notify in order creation
It only worked on modification.

== Test plan ==
1. have/create a active budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add an order line to the basket
     Add a user in "To notify on receiving"
6. Modify the order
7. The patrons isn't here. This is the bug
8. Add a user in "To notify on receiving"
9. Save
10. Modify the order
11. The patron is here now
12. Apply this patch
13. Retry step 5 to 11 and patron should be saved on order creation
14. Celebrate! :D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bf8b4e773c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cb7db6fcd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-26 07:27:32 +01:00
Marcel de Rooy 60bbe45f6d Bug 21771: (follow-up) Revert the shift statement
Obviously you should never shift an items from an array if you need that
item later on :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with entering userid as well as entering email..

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1885e6a214)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 28d1eda94a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-16 13:47:20 +01:00
Jonathan Druart 878627b61e Bug 21599: Fix item type creation by defining default values
Same as what we have in Koha::Patron->new, empty strings should not be
inserted in integer or date column type

DBD::mysql::st execute failed: Incorrect decimal value: '' for column 'defaultreplacecost' at row 1 [for Statement "INSERT INTO `itemtypes` ( `checkinmsg`, `checkinmsgtype`, `defaultreplacecost`, `description`, `hideinopac`, `imageurl`, `itemtype`, `notforloan`, `processfee`, `rentalcharge`, `searchcategory`, `sip_media_type`, `summary`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="", 1="message", 2="", 3="xx", 4=0, 5='', 6="XX", 7=0, 8="", 9="", 10="", 11=undef, 12=""] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Test plan:
Create a new itemtype

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 33c142ba3b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6c2eeaa434)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 16:21:06 +01:00
Andreas Roussos bc54704cd6 Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button
The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2cffe3a574)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 81ceef6b84)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 16:09:48 +01:00
Martin Renvoize b5b249290e Bug 21456: (QA follow-up) Catch missed case in authorities merge
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 796e4e5d2b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b9f85edd14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 16:03:31 +01:00
Andreas Roussos c9124a794c Bug 21456: The 'New authority' button lists authority types inconsistently
The 'New authority' button does not always list the available
authority types in A-Z order based on their description.

This patch fixes that.

Test plan:
1) Go to Home > Authorities in the staff client; notice how the
   'New authority' button lists auth types sorted by description.
2) Go to an authority's detail page; notice how the same 'New
   authority' button will list auth types sorted by their code.
3) Apply the patch.
4) In an authority's detail page, the 'New authority' button will
   now list the available authority types sorted by description.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bf7c8303ca)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1f8356d2df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 16:03:19 +01:00
Fridolin Somers c2ba4a05fd Bug 19181: [17.11.x] pick opac_base_url 2018-11-09 15:48:04 +01:00
Caroline Cyr La Rose 2e897ba4f4 Bug 21490: Disambiguation of 'Order' part 2
This patch changes the 'Order' term in neworderbiblio.tt,
newordersubscription.tt, newordersuggestion.tt, and
z3950_search.tt for 'Place order'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 706d21ee53)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 50166e670b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 15:38:56 +01:00
Caroline Cyr La Rose 41872e1ac2 Bug 21490: Disambiguation of 'Order'
This patch changes the 'Order' term in marc_modification_template.tt
for 'Rank'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ca776d6e1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b3f1bb0693)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 15:38:51 +01:00
Nick Clemens bc171c0649 Bug 21579: Make showdiffmarc.pl work for authorities and biblios
To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7f0207d2ad)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ab630ab84f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 15:03:03 +01:00
Jonathan Druart ca2f8738ce Bug 19802: Add stack trace to ease debugging
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f6f95808d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 14:02:30 +01:00
Jonathan Druart 460976325b Bug 19802: Move Selenium code to t::lib::Selenium
To make it reusable easily.

Test plan:
The basic_workflow.t tests should still pass after this change.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d482aef2e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 14:02:12 +01:00
Jonathan Druart ae754c73e0 Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
#   Failed test 'The date_due should have been set depending on the circ
 rules when the on-site checkout has been switched'
 #   at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 126.
 #          got: '2018-10-16T23:59:00'
 #     expected: '2018-10-21T23:59:00'

TestBuilder set date to today, so issuingrules.harduedate will be set to
today.
issuingrules.hardduedatecompare will be set to an integer.
If set to 0, $datedue will be reset to the hard due date

The call stack is: AddIssue > CalcDateDue > GetHardDueDate

In GetHardDueDate:
3509         if ( $hardduedatecompare == 0 || $hardduedatecompare == $cmp ) {
3510             $datedue = $hardduedate->clone;
3511         }

To fix this random failure we need to set issuingrules.harduedate to undef.

Test plan:
0. Do not apply this patch
1. Modify the test to set hardduedatecompare to 0 (search 'my $issuingrule = ')
2. Execute the test and confirm the failure
3. Apply this patch
4. Execute the test and confirm the it is no longer failing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e6d9defc1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c82207ebb5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 12:57:51 +01:00
Martin Renvoize 9a67ccab56 Bug 21351: Rename the Taiwanese language pack to use correct file name
The words "Han (Simplified variant)" is appearing in the language name
because the file is titled "zh-Hans-TW" when it should be titled
"zh-Hant-TW". The database is set up to use "Hant" but it just
incorrectly named.

Test plan
1. Apply patch.
2. Install zh-Hant-TW on your Koha server.
3. Navagate to I18N/L10N preferences and confirm that the english text description states (Traditional variant).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Files on translate.kc.org have already been fixed by Bernardo.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

(cherry picked from commit fd0df2ad55)
Converted to removal of files rather than rename as translation merges
had already created the new files as expected.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2cae3d86bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 12:38:36 +01:00
Marcel de Rooy 8835e542c2 Bug 21115: Add multi_param call and add divider in cache key in svc/report and opac counterpart
Resolve things like:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_prodclone_opac_svc_report line 42, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.

The cache key in both script looks like:
    opac:report:id:602018
but should for consistency be:
    opac:report:id:60:2018
Note: The 2018 here is part of the sql_params and should not be
concatenated to the report id.

Test plan:
Do not yet apply this patch.
Make a report public, set cache to 300 secs.
Check its output with opac/svc/report.
Check for the warn in your log.
Apply the patch, restart Plack and flush cache.
Check opac/svc/report.
Modify your report; e.g. add a simple string to the SELECT.
Check opac/svc/report. You should still see cached output.
Flush the cache.
Check opac/svc/report. You should now see the added text.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested also by clearing individual keys with $cache->clear_from_cache.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfbbe52ff7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ea99b1998)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 09:33:39 +01:00
Marcel de Rooy e881a161ea Bug 21279: Fix &nbsp; in transport cost matrix
Test plan:
On Home › Administration › Transport cost matrix you should no longer
see "&nbsp;".
Fill some values and save, you should see the correct values.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1fddd295b8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4092461ec9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:58:24 +01:00
Jonathan Druart 22772e1a09 Bug 21479: "Mock" SearchEngine to use Zebra
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dc6bea7860)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 517bf77355)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:53:24 +01:00
Jonathan Druart 1504147070 Bug 21479: Zebra index can return different result
If the zebra index has been rebuilt by previous tests, the order/results
will be different, and we will not have biblionumber 1, 3, 5

Let make this more flexible

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e7574481b1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 351dfa737b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:53:19 +01:00
Jonathan Druart 5eaf5b69d1 Bug 21479: Remove the trace if the node does not exist
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be4f22f5a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ccb364a667)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:53:14 +01:00
Jonathan Druart 37c5a82953 Bug 21479: Add regression tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 45fbd36e1f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit bbf6d87d56)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:53:06 +01:00
Dobrica Pavlinusic bb38fa0447 Bug 21320: Holds to pull should honor syspref AllowHoldsOnDamagedItems
Test plan:

1. Set syspref AllowHoldsOnDamagedItems to Allow
2. Create a hold on record with item which is damaged
3. Verify that it doesn't appear in report
4. Apply patch and verify that it's now visible

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b23fe0b0b8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 42e8d66369)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:21:38 +01:00
Jonathan Druart f1afb946af Bug 15734: Use To.json to filter audio alerts
Test Plan:
1) Enable audio alerts
2) Note audio alerts don't work
3) Apply this patch
4) Note audio alerts now work

Use complex selectors to test:
  #circ_returns p.problem:contains('Not checked out.')
  #doc3 > #bd

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 58314233f7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e635b63e94)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:16:27 +01:00
Fridolin Somers c29f4cb590 Bug 21389: Correct Javascript error on article requests page
Bug 21076 fixed a Javascript error on article requests page when patron is found.

There is also an error when patron is not found, with message :
  Patron not found
  No patron with this name, please, try another

This patch fixes by replacing TT condition by a JS condition testing the existance of the patron input.

Test plan:
1 - Do not apply patch
2 - Enable article requests
3 - Search on staff client and click 'Request article'
4 - Search for a patron that does not exist
5 - You get a yellow message "Patron not found"
6 - View error in console
7 - Apply patch
8 - Reload
9 - Not error is gone
10 - Search for a patron that does exist
11 - Check there is no error in console
12 - Check that autocompletion works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b27db0fbfc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b0f3bc8c13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:09:28 +01:00
Owen Leonard b16052bd4f Bug 16420: Buttons inconsistent between "Hold found" and "Hold found (waiting)" dialogs in checkin
This patch makes minor changes to the text of hold confirmation buttons
in the checkin process in order to make them more consistent.

Also changed: Removed the "danger" class from the "Ignore" button for
readability and consistency's sake.

To test, apply the patch and check in an item which is on hold for a
patron at your logged-in library. The hold confirmation dialog's buttons
should read "Confirm hold," "Print slip and confirm," and "Ignore."

Confirm the hold, then check in the same item again.

In the dialog, the buttons should read "Confirm hold," "Print slip and
confirm," and "Cancel hold."

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96c2df5804)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ee4fbd587f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:04:24 +01:00
Tomas Cohen Arazi 66fa755e66 Bug 21500: Remove warnings in rotating collections
To test:
- Go to Tools > Rotating collections
=> FAIL: Some warinings on the logs
- Apply this patch
- Reload page
=> SUCCESS: No warinings
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 40803d3035)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4b139ba195)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 08:03:21 +01:00
Owen Leonard 10f370292d Bug 21550: DataTables four button pagination uses the wrong icon for disabled buttons
This patch modifies the DataTables CSS which styles "full_nubmers"
controls which are disabled: First and Previous buttons on the first
page of results, Next and Last buttons on the last page of results.
These buttons should have gray icons instead of blue.

To test, apply the patch and clear your browser cache if necessary. View
a page which uses a "full_numbers" DataTables configuration, e.g.

- Administration -> Cities
- ILL requests -> List requests
- Circulation -> Holds to pull

Confirm that buttons in their disabled state have a gray icon and text
instead of blue.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d9b922f46f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 417e28f14e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:37:21 +01:00
Andreas Roussos 81b41d44e4 Bug 21506: DataTables four button pagination uses the wrong icon for First and Last buttons
Pages with DataTables' four button pagination use the wrong
icon for 'First' and 'Last'. Also, the icons for all four
buttons are truncated at the bottom.

This patch fixes that.

Test plan:
1) Go to a page that uses four button pagination (e.g. Home >
   Administration > MARC frameworks) and notice how the
   pagination icons for First/Previous and Next/Last are the
   same. Also notice all four icons are clipped at the bottom.
2) Apply the patch.
3) Refresh the page; the First and Last buttons' icons now
   include a vertical bar, and there is no clipping visible.
4) For completeness, check other affected pages as well.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 074c329774)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8802d32b7f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:36:22 +01:00
Nick Clemens 7cfcfae3c4 Bug 21417: DBRev 17.11.11.002
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cf8890465d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18d04888b2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:31:19 +01:00
Colin Campbell 74a1687fc5 Bug 21417: (QA follow-up) Display default EAN as such in admin display
A branch value of null is interpreted as the default
Add text 'All libraries' to this case in the display
rather than blank so that its function is clear to the
user

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d70daaceba)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f0937049f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:28:40 +01:00
Kyle M Hall c8efbde5ed Bug 21417: EDI ordering fails when basket and EAN libraries do not match
When clicking Create EDIFACT Order on /acqui/basket.pl, an EDIFACT message will not be generated if aqbasket.branch does not match edifact_ean.branchcode. This failure does not generate any sort of error message, it just fails to produce a message.

We should allow ean's to not require a branch to be set, then if we don't find a branch specific each, we can look for the default version of the ean.

Test Plan:
1) Apply this patch set
2) Run updatedatabase
3) Verify you can create a Library EAN without setting a branchcode for it
4) Verify you can use this EAN to send an EDI order where the basket has a branchcode set

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 18674cfde3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c2537558e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:28:05 +01:00
Andreas Roussos 68c83c4c86 Bug 21455: Authority search options get shuffled around when you click on 'Search'
In the staff client, when you perform an authority search the
selected values for the 'Search all headings:' and 'Search
entire record:' options get shuffled around when you click on
the 'Search' button.

This patch fixes that.

Test plan:
1) Perform an authority search and set the 'Search all headings:'
   option to 'starts with'.
2) Click on the 'Search' button.
3) Notice how the 'Search all headings:' option is now 'contains',
   and 'starts with' has moved down to the 'Search entire record:'
   option.
4) Apply the patch.
5) Hit 'Search' again. This time the selected search options do
   not move around.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6cee98c04f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0db6f69bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:23:56 +01:00
Tomas Cohen Arazi 5a69e30197 Bug 20910: Display 773$g when $0 is present too
This patch makes the XSLT logic add the $g subfield in the 773 display
in both the OPAC and staff interface MARC21 record detail pages.

The XSLT chooses between different ways to create the link for the
related content, but then it only adds the $g in two of the cases.
There's no obvious reason for a different display.

To test:
- Have  a record with:

=773   $tHost title $gp4.

=> SUCCESS: Notice the Detail view shows:
  In: Host title p4.

- Have another record with:

=773   $tHost title $gp4. $w100
- Enable UseControlNumber (only to cover the case):
=> SUCCESS: Notice the detail view shows
  In: Host title p4.

- Have another record with:

=773   $tHost title $gp4. $0456

=> FAIL: The Detail view doesn't show p4.
- Apply this patch
- Reload
=> SUCCESS: The Detail view displays p4.!
- Sign off :-D

Sponsored-by: Escuela de Orientacion Lacaniana
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f161d4e823)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8a7b508cf4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:22:03 +01:00