Commit Graph

30963 Commits

Author SHA1 Message Date
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
Katrin Fischer 78c9815c7d Bug 9968: Fix wrong index for Standard number in advanced and label search
'Standard number' indicates that you can search ISBN, ISSN and other
standard numbers, but we are using the wrong index and only get a
very limited search for biblionumber instead.

This patch changes the index from sn to ident.

To test:
- Check both staff and OPAC advanced search:
  - Search for Standard number = ISBN
  - Search for Standard number = ISSN
  Both should work.
  Toggle [Intranet|OPAC]NumbersPreferPhrase system preferences
- Check the label creator
  - Add a new batch
  - Use 'add items' option and search for Standard number

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 09a7d37d53)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d341326362)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:17:20 +01:00
Mark Tompsett fb53f07036 Bug 17237: Remove CREATE USER 'user'@'%' line
Having a 'user'@'%' line decreases database security.
Bug 16690 closes the need for such a line, and this
bug removes the use of it.

TEST PLAN
---------
While this depends on 16690, it is not required for testing.

On a kohadev box:
sudo koha-create --create-db test_17237_a
git bz apply 17237
sudo perl ~/misc4dev/cp_debian_files.pl
restart_all
sudo systemctl daemon-reload
sudo koha-create --create_db test_17237_b
sudo mysql -u root
SELECT user,host from mysql.user;
-- test_17237_a will have two entries, one being '%'
-- test_17237_b will only have one entry, not '%'

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

(cherry picked from commit 1e856e7e73)

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

(cherry picked from commit 291c250dcf)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 16:10:01 +01:00
Nick Clemens 079efd6341 Bug 21617: DBRev 17.11.11.001
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8150058b38)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5bc9139097)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 11:17:48 +01:00
Marcel de Rooy 35218c4982 Bug 21617: statistics.ccode is not long enough (see also DBRev 18.05.04.001)
Warn from a test:
DBD::mysql::st execute failed: Data too long for column 'ccode' at row 1 [for Statement "INSERT INTO statistics
        (datetime,
         branch,          type,        value,
         other,           itemnumber,  itemtype, location,
         borrowernumber,  proccode,    ccode)
         VALUES (now(),?,?,?,?,?,?,?,?,?,?)" with ParamValues: 0="z8LIyIV", 1='issue', 2=undef, 3='', 4='2584', 5='E_QkzaV5Ay', 6='oDnFRZyog2CS2_XoUB_MB2sBxyI3elbFPC_AekxLPrduGTXKnlNoLKEdQrXzpAw5zD1pGbZshV9ydZup', 7='2000005168', 8='', 9='j9ZDn74omZAoZrTOdC4a05SpWRSHPR2apfss7y5V6QJuQnBEk32XWXCfMp7'] at C4/Stats.pm line 138.

The dbrev 18.05.04.001 did not change it from 10 to 80 as in other tables.

We should either truncate to 10 chars in Stats.pm or increase to varchar(80). Since it is varchar and not char, we should not be afraid about size. I choose for the latter here.

Test plan:
Run db rev.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad20a30a83)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 08ece37cca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-08 11:12:55 +01:00
Fridolin Somers 3c54c66ccb Revert "Bug 21396: Add 2 missing use statements in Koha::Account"
This reverts commit b0ce47f6d8.
2018-11-06 09:15:06 +01:00
Jonathan Druart b0ce47f6d8 Bug 21396: Add 2 missing use statements in Koha::Account
1. require C4::Letters must be use C4::Letters (from bug 19191)

2. There is call to C4::Circulation::ReturnLostItem, but no use of
C4::Circulation (from bug 20631)

Test plan:
finger crossed, I ran the tests from t/db_dependent/Koha and they all
passed

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1b56e446ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 362c9331a2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-05 12:54:20 +01:00
Fridolin Somers e066901611 [17.11.x] correct duplicat keys in definitions.json 2018-11-02 15:18:20 +01:00
Fridolin Somers 3aa274a7b9 Update release notes for 17.11.11 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-10-24 11:37:22 +02:00
Fridolin Somers 401b8e5bfd Increment version for 17.11.11 release
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-10-24 11:30:09 +02:00
Koha translators cbb800c116 Translation updates for Koha 17.11.11 2018-10-24 06:20:52 -03:00
Owen Leonard 01281fdc96 Bug 21479: Fix remove from cart links at the OPAC (should remove only 1)
This patch changes the way biblionumbers are passed to the cart script
for adding and removing single items. The title's biblionumber is now
stored in a data-attribute on the links for adding and removing. This
should be a more robust, unified way to handle these single-item
operations.

To test, apply the patch and enable the opacbookbag system preference.

Test adding and removing items from the cart from various pages using
various methods:

 - By clicking an "Add to your cart" / "Remove" link in search results
 - By clicking an "Add to your cart" / "Remove" link on a detail page
 - By checking boxes in search results and adding via the dropdown

Each operation should work correctly.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cd49034c4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2d078a18e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-10-24 11:15:21 +02:00
Andreas Roussos f7ad8af0f7 Bug 21440: koha-create expects the file passed by $DEFAULTSQL to be in gzip format
koha-create contains a call to `zcat` which fails if the file passed
as an argument is not in gzip format.

This patch fixes the issue by adding the -f flag to the zcat call in
koha-create, as per the top-voted answers in the following SE URLs:
https://unix.stackexchange.com/a/77309
https://unix.stackexchange.com/a/131944

Test plan:
1) in /etc/koha/koha-sites.conf, set the DEFAULTSQL variable to point
   to an _uncompressed_ SQL database dump
2) run `koha-create --create-db instance` and notice how it fails with:
   gzip: /path/to/dump.sql: not in gzip format
3) apply the patch
4) notice the extra line of information "The SQL file can be optionally
   compressed with gzip" in koha-sites.conf
5) run the `koha-create` command again, this time it should work
6) repeat with DEFAULTSQL pointing to a gzip'd dump, it should work too

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f12dabe6cc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 89f0452ba1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-10-24 11:06:46 +02:00