]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 20710: Update MARC21 frameworks to Update 26 (April 2018)
Bernardo Gonzalez Kriegel [Fri, 4 May 2018 22:49:07 +0000 (19:49 -0300)]
Bug 20710: Update MARC21 frameworks to Update 26 (April 2018)

This bug add update 26 changes.

Update 26
http://www.loc.gov/marc/bibliographic/bdapndxg.html

New subfields 377$3, 380$3, 381$3, 383$3, 730$4

Codes
    Map 007/04 'x' new
    Map 007/06 'c' renamed

No auth changes

To test:
1) Apply Bug 19835
2) Apply this patch
3) Reload marc21 bibliografic frameworks, check loads ok
4) Clean your browser cache
5) Edit a new bib record, fire 007 plugin,
    for Map, 04 position, check new 'x'
    for Map, 06 position, check renamed 'c'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19849: Make a string translatable again after a rebase error
Victor Grousset [Wed, 20 Dec 2017 16:13:40 +0000 (17:13 +0100)]
Bug 19849: Make a string translatable again after a rebase error

Bug 16621 reverted part of bug 12509
1. Log in the OPAC and staff interface
2. Restrict the user logged in the OPAC (restricting yourself works)
   Staff interface → Patron page → Restrictions → Add manual restriction
   Put this comment the "OVERDUES_PROCESS Give the books back or we're comming!"
3. Install the fr_FR locale and switch the interface to it
4. Go to OPAC: /cgi-bin/koha/opac-user.pl
5. Then you should see the ugly comment with "OVERDUES_PROCESS"
6. Apply this patch
7. Update the translation: ./translate update or equivalent
8. Open misc/translator/po/fr-FR-opac-bootstrap.po
9. Find the string containing "Restriction added by overdues process"
10. Remove the fuzzy flag
11. Install the language
12. Refresh the page in the OPAC
13. Then you should see the translation + the comment instead of "OVERDUES_PROCESS" + the comment

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19849: Minor fixes & refactor of opac-reserve.tt & opac-user.tt
Victor Grousset [Wed, 20 Dec 2017 14:15:49 +0000 (15:15 +0100)]
Bug 19849: Minor fixes & refactor of opac-reserve.tt & opac-user.tt

- make next patch easely reviewable.
- fix lone quote. (Replace by <strong>
- add forgotten condition for 9999-12-31

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 7136: Correct description of Grace period for subscriptions
Katrin Fischer [Wed, 16 May 2018 02:25:38 +0000 (02:25 +0000)]
Bug 7136: Correct description of Grace period for subscriptions

The grace period is used with the serialsUpdate.pl cronjob. It will
generate the next issue and set the one before to 'Late' with
an optional note.

There is on trace of a 'waiting' status for serials.

To test:
- check help file on the subscription edit form for
  the description of the 'Grace period'.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20507: Shelf browser does not update image sources when paging
Owen Leonard [Tue, 26 Jun 2018 13:05:42 +0000 (13:05 +0000)]
Bug 20507: Shelf browser does not update image sources when paging

This patch updates the shelfbrowser include so that the system
preference check for Coce will function correctly.

To test, apply the patch and test the OPAC shelf browser with each of
the enhanced content options enabled: Coce, Amazon, Google. In each
case, page through the shelf browser to confirm that covers load
correctly.

Signed-off-by: Cab Vinton <bibliwho@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20946: (QA follow-up) make outstanding_debits return the account lines only
Tomas Cohen Arazi [Mon, 2 Jul 2018 15:05:55 +0000 (12:05 -0300)]
Bug 20946: (QA follow-up) make outstanding_debits return the account lines only

This patch was discussed with Jonathan on a QA conversation. It is
better to keep this simpler and more reusable. And is the right approach
in this case.

This patch makes Koha::Account::outstanding_debits return the account
lines, and a method is added to Koha::Account::Lines so the outstanding
amount is calculated on the resultset. This is done the dame way it was
done before, and the tests got adjusted.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20946: (RM follow-up) Additional tests and fix addition to undef
Nick Clemens [Wed, 27 Jun 2018 03:53:27 +0000 (03:53 +0000)]
Bug 20946: (RM follow-up) Additional tests and fix addition to undef

Added a few tests with credit lines and found we got warnings, adjusted
the routine to avoid this

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20946: Additional unit tests for 0 lines edge case
Kyle M Hall [Tue, 26 Jun 2018 13:20:26 +0000 (13:20 +0000)]
Bug 20946: Additional unit tests for 0 lines edge case

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20946: Reduce number of db calls
Kyle M Hall [Tue, 26 Jun 2018 13:08:36 +0000 (13:08 +0000)]
Bug 20946: Reduce number of db calls

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl
Tomas Cohen Arazi [Sat, 16 Jun 2018 12:44:19 +0000 (09:44 -0300)]
Bug 20946: Use K::Account->outstanding_debits in pay.pl and paycollect.pl

This patch changes the how account lines are fetched (using
Koha::Account->outstanding_debits) so credits are not picked.

To test:
- Add a $5 credit to a patron
- Add a $1 fine
- Go to the 'Pay fines' tab
=> FAIL: Credit is displayed
- Try to pay all fines
=> FAIL: You are told to enter a value less than or equal to -4.00
         (Observe you cannot do that)
- Apply this patch
- Reload
=> SUCCESS: Credit is not displayed
=> SUCCESS: You are able to pay all fines
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20946: Add Koha::Account::outstanding_debits
Tomas Cohen Arazi [Sat, 23 Jun 2018 08:41:00 +0000 (05:41 -0300)]
Bug 20946: Add Koha::Account::outstanding_debits

This patch adds a handy method that returns the total for outstanding
debits (i.e. those that haven't been canceled with credits), and the
corresponding Koha::Account::Line objects.

Unit tests are added.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 21029: Make "Suspend until:" translatable
Jonathan Druart [Wed, 4 Jul 2018 17:55:14 +0000 (14:55 -0300)]
Bug 21029: Make "Suspend until:" translatable

The label was part of the holds.js file. As .js files are never
translatable it needs to be moved to template level.

Test plan:
- Place a hold on an item
- Go to the patron account
- Click on the Suspend button on the holds tab
- View the modal, the label before the date field "Suspend until:" is
now translatable.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 21020: Fix return branch on transfer - SIP
Jonathan Druart [Fri, 29 Jun 2018 13:06:31 +0000 (10:06 -0300)]
Bug 21020: Fix return branch on transfer - SIP

Caused by
  commit 546379cc92b733cb29a0b70247a72c770afdad26
  Bug 17680: C4::Circulation - Remove GetItemIssue, simple calls

Since this commit AddReturn return a Koha::Issue object, not a hashref
with item's info.

Test plan:
1 - Enable SIP server on your test instance
   For kohadevbox:
   cp /etc/koha/SIPConfig.xml /etc/koha/sites/kohadev/
   create patron with user/pass term1/term1 and grant circulation
   privileges
2 - enable AutomaticItemReturn
3 - Checkin an item which will generate a transfer via SIP2:
   perl /home/vagrant/kohaclone/misc/sip_cli_emulator.pl -a localhost -p
   6001 -su term1 -sp term1 -l LPL --item {BARCODE} -m checkin -t
   CR
4 - Note no CT field
5 - Apply patch
6 - Repeate checkin via SIP2
7 - Transfer destination is correctly returned in CT

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoRevert "Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated"
Martin Renvoize [Mon, 9 Jul 2018 17:23:02 +0000 (18:23 +0100)]
Revert "Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated"

This reverts commit 6f5952023c615e72d3fe36aafe3b5fd82c8794fd, see
bugzilla for details

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20709: (follow-up) Update GERMAN MARC frameworks to Update 26 (April 2018)
Katrin Fischer [Fri, 11 May 2018 05:52:51 +0000 (07:52 +0200)]
Bug 20709: (follow-up) Update GERMAN MARC frameworks to Update 26 (April 2018)

A follow-up in line with bug 20710.

Again, the files used here have been generated automatically
from the po files on translate.koha-community.org.

To test:
- Make sure the de-DE installer can install all mandatory files cleanly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested using de-DE installer, all files load Ok
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20709: Update GERMAN MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec...
Katrin Fischer [Thu, 3 May 2018 22:32:26 +0000 (22:32 +0000)]
Bug 20709: Update GERMAN MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec 2017)

Translation of bibliographic and authority frameworks can be done
using translate.koha-community.org.

Updated and translated files will then be provided for download.

See: http://lists.koha-community.org/pipermail/koha-translate/2018-April/002721.html

To test:
- Verify SQL is correct and frameworks load without problem

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19835: (follow-up) Correct formatting in a few places
Katrin Fischer [Sat, 28 Apr 2018 20:54:14 +0000 (20:54 +0000)]
Bug 19835: (follow-up) Correct formatting in a few places

In some places - was used insted of --, changed for
consistency with existing descriptions.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19835: Fix MARC21 frameworks revision date
Bernardo Gonzalez Kriegel [Thu, 26 Apr 2018 15:36:35 +0000 (12:36 -0300)]
Bug 19835: Fix MARC21 frameworks revision date

This followup updates revison number and date

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19835: Fix repeatability on MARC21 subfields
Bernardo Gonzalez Kriegel [Thu, 26 Apr 2018 13:52:50 +0000 (10:52 -0300)]
Bug 19835: Fix repeatability on MARC21 subfields

This followup fixes all repeatability cases, from
updates 23+24+25 and a few older ones.

To test:
0) Apply both patches
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check repeatability...

Bibs and auth frameworks checked against LOC description.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19835: Update MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec 2017)
Bernardo Gonzalez Kriegel [Thu, 26 Apr 2018 02:57:40 +0000 (23:57 -0300)]
Bug 19835: Update MARC frameworks to Updates 23+24+25 (Nov 2016, May and Dec 2017)

There are a bunch of updates, summary below

1) Update 23
1.a) Bibs
New fields: 647 885
New subfields
e in 752
0 in 257 377
3 in 382
4 in 752

Changes
028 redefined
a renamed in 028
b renamed in 046
d renamed in 046

1.b) Auth
New Fields: 075 147 447 547 677 747 885
New Subfields: 0 in 377

2) Update 24
2.a) Bibs
New subfields
b in 567
g in 340
i in 370 386
0 in many fields
2 in 567
3 in 370
4 in 370 386

Changes
g renamed in 370
4 'Relationship code' -> 'Relationship' many fields
4 'Relator code'      -> 'Relationship' many fields

2.b) Auth
New subfields
i in 370 386
0 in 050 052 053 055 060 065 070 080 087
3 in 370
4 in 370 386

Changes
g in 370
4 'Relationship code' -> 'Relationship' many fields
4 'Relator code'      -> 'Relationship' in 371

3) Update 25
3.a) Bibs
New fields: 758
New subfields
r in 777
u in 777
z in 777
1 in many fields

Changes
d renamed in 111 611 711 811
s repeatable in many fields

3.b) Auth
New subfields
1 in many fields

Changes
d in 111 411 511 711
s repeatable in many fields

For more detail:
Update 23
bibs https://www.loc.gov/marc/up23bibliographic/bdapndxg.html
auth https://www.loc.gov/marc/up23authority/adapndxf.html

Update 24
bibs https://www.loc.gov/marc/up24bibliographic/bdapndxg.html
auth https://www.loc.gov/marc/up24authority/adapndxf.html

Update 25
bibs https://www.loc.gov/marc/bibliographic/bdapndxg.html
auth https://www.loc.gov/marc/authority/adapndxf.html

To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields

Repeatability checks on followup

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20793: (follow-up) Add style to the non-link hold count on detail page
Owen Leonard [Tue, 22 May 2018 16:29:09 +0000 (16:29 +0000)]
Bug 20793: (follow-up) Add style to the non-link hold count on detail page

This small follow-up changes the style on the bibliographic detail page
of the hold count so that it looks similar whether it's a link to holds
or not.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20793: Don't show a holds link in staff for users without permission
Katrin Fischer [Sun, 20 May 2018 00:42:28 +0000 (02:42 +0200)]
Bug 20793: Don't show a holds link in staff for users without permission

On the results list in staff the 'Holds (x)' link always shows
independent of the permissions of the staff user.

This patch tightens the permission checks on the result page
to explicitly check for the place_holds permission.

To test:
- Create a staff user with place_holds permission
- Check the result list, you should see 2 links to the
  holds page:
  - 'Place holds' on top of the results list
  - 'Holds (x)' at the bottom of each entry in the results
     list
  - Verify both links work
- Create a staff user without place_holds_permission
  - Without the patch you'll see the second link,
    but it will lead to a permission error
  - With the patch you'll still see the 'Holds (x)', but
    it will no longer be a link.
- Go to the detail page of a record with an existing hold.
  - Repeat test with both staff users.
  - One time the Hold information in the bibliographic information
    should show as a link, the other time as a simple text.

Displaying the information about existing holds still make sense
as this is the current beheviour.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20999: Remove invalid 'style="block"' from OPAC templates
Owen Leonard [Tue, 26 Jun 2018 15:17:21 +0000 (15:17 +0000)]
Bug 20999: Remove invalid 'style="block"' from OPAC templates

This patch removes an invalid attribute from OPAC template markup. There
should be no visible change to the OPAC.

To test, apply the patch and confirm that the following pages still look
correct when using various cover image sources: Coce, Amazon, Google:

 - Bibliographic detail page (opac-detail.pl)
   - The shelf browser
 - Catalog search results
 - Recent comments

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
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>
6 years agoBug 15360: Incorrect or mislabeled behavior on Authorities "New from Z39.50" Button
Owen Leonard [Thu, 31 May 2018 13:29:33 +0000 (13:29 +0000)]
Bug 15360: Incorrect or mislabeled behavior on Authorities "New from Z39.50" Button

This patch makes a third stab at resolving this issue by reorganizing
the authorities toolbar buttons to more closely match the bibliographic
toolbar buttons:

 - "New from Z39.50" has been added to the "New authority" dropdown.
 - "Edit" is now a dropdown, like on the bibliographic detail page:
    - Edit record
    - Edit as new (duplicate)
    - Replace record via Z39.50/SRU
    - Delete record

To test, apply the patch and go to the authorities module. Testing with
existing Z39.50 authority sources configured:

  - On the authorities home page and the authorities search results
    page, the "New authority" menu should have a "New from Z39.50" link.
  - View the details for an authority record. The menus should appear as
    described above. Test each option.

Remove all Z39.50 authority servers and test again. The "New from
Z39.50" link should no longer appear.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
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>
6 years agoBug 20920: (follow-up) generated d/control
Mirko Tietgen [Fri, 29 Jun 2018 20:25:33 +0000 (22:25 +0200)]
Bug 20920: (follow-up) generated d/control

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20920: Add missing dependency on CGI::Compile
Jérôme Charaoui [Wed, 20 Jun 2018 18:25:20 +0000 (14:25 -0400)]
Bug 20920: Add missing dependency on CGI::Compile

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20559: Compiled CSS
Owen Leonard [Mon, 25 Jun 2018 15:00:42 +0000 (15:00 +0000)]
Bug 20559: Compiled CSS

This patch contains the compiled OPAC CSS.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20559: Occurrences of loading-small.gif still exist
Owen Leonard [Mon, 25 Jun 2018 14:54:08 +0000 (14:54 +0000)]
Bug 20559: Occurrences of loading-small.gif still exist

This patch removes some leftover references to a file which no longer
exists. In the OPAC, loading-small.gif was included in CSS which was
never used. In the staff client, loading-small.gif should have been
corrected to spinner-small.gif.

To test, apply the patch and go to Tools -> Batch record modification.

 - Submit a batch of records to modify
 - In the table of titles which will be modified, click the 'Show MARC'
   button.
   - The modal preview window should show "Loading" and an animated
     spinner before the MARC record is loaded.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on
Owen Leonard [Wed, 20 Jun 2018 17:16:16 +0000 (17:16 +0000)]
Bug 20931: JS error "ReferenceError: $ is not defined" when CircSidebar is turned on

This patch reorganizes the way sidebar menus get highlighted based on
the current page. A global function is added to handle most cases.
Individual menu-handling scripts have been modified to handle only the
edge cases which aren't covered by the global one.

A new class is added to the global CSS file so that highlighted menu
links can be custom-styled.

To test, apply the patch and clear your cache if necessary.

View various pages to confirm that current-page-highlighting in the
sidebar menu is working correctly and that there are no JS errors in the
browser console. For example:

 - Administration -> Currencies and exchange rates.
 - Acquisitions -> Invoices
 - Tools -> Patron lists
 - Tools -> Export

And with CircSidebar turned on test various circulation pages, e.g.

 - Circulation -> Set library

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20977: Javascript vars used in confirm_deletion in catalog.js do not match string...
Kyle M Hall [Thu, 21 Jun 2018 15:11:54 +0000 (11:11 -0400)]
Bug 20977: Javascript vars used in confirm_deletion in catalog.js do not match strings in catalog-strings.inc

The naming mismatch can cause javascript errors.

Test Plan:
1) Confirm the string vars used in catalog.js match the ones in
   catalog-strings.inc

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
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>
6 years agoBug 20520: Re-indent moremember.tt
Owen Leonard [Wed, 4 Apr 2018 17:50:48 +0000 (17:50 +0000)]
Bug 20520: Re-indent moremember.tt

This patch reindents the template for the patron detail page,
moremember.tt:

- Trailing spaces removed
- Indentation changed to a consistent 4 spaces
- Markup indentation made more consistent

To test, view the patron detail page. There should be no visible
difference before and after the applying the patch.

HTML validation before and after the patch should return the same
results.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
6 years agoBug 20991: Do not lost patron's category when editing a patron
Jonathan Druart [Tue, 26 Jun 2018 16:04:01 +0000 (13:04 -0300)]
Bug 20991: Do not lost patron's category when editing a patron

If there is an error in the edit patron form the patron's category is
lost.
This seems to be a long standing bug.

Test plan:
- Edit an existing patron
- Change the patron category to a category that triggers the error that
the user is not in the right age range for that new category
- Save, error is triggered
=> Without this patch the patron category has been reset

You should also test different ways to edit/add a patron (quick add,
step 1)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 17886: Don't show option to add to existing list if there are no lists
Caitlin Goodger [Tue, 29 May 2018 17:32:12 +0000 (17:32 +0000)]
Bug 17886: Don't show option to add to existing list if there are no lists

This patch modifies the page for adding a title to a list so that the
"Add to existing list" option doesn't appear if there are no lists
defined.

TEST PLAN
---------
1) Make sure no lists exist at all.
2) Make there is at least one findable biblio record entered
3) Find that biblio record in the OPAC
4) Click 'Save to your lists'
   -- Notice that the whole save to list section is there.
5) Apply this patch
6) Click 'Cancel'
7) Click 'Save to your lists'
   -- Notice you can only add now, which makes sense.
8) Run koha qa test tools.

Perform the same tests in the staff client.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

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>
6 years agoBug 20945: (RM follow-up) Escape param_name too
Nick Clemens [Fri, 29 Jun 2018 20:09:38 +0000 (20:09 +0000)]
Bug 20945: (RM follow-up) Escape param_name too

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20945: Escape SQL parameters when constructing download links
Nick Clemens [Thu, 14 Jun 2018 14:20:44 +0000 (14:20 +0000)]
Bug 20945: Escape SQL parameters when constructing download links

TO test:
1 - Create a report that takes a parameter
2 - Enter a parameter containing '%'
3 - Attempt to download report, note link is misconstructed
4 - Apply patch
5 - Reload
6 - Note URL is now correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords
Marcel de Rooy [Thu, 3 May 2018 10:33:19 +0000 (12:33 +0200)]
Bug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords

If you do not use the EasyAnalyticalRecords feature (introduced with
bug 5528), you will have a lot of warnings in zebra-output.log like:

zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186

They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl.
This sub starts a Zebra search on index 'hi' (Host-Item-Number).
If you do not use this field at all (related to 773$9 in MARC21), Zebra
returns an Unsupported Use attribute error (114).

In making this change, I added one minor change:
[1] Remove the commented GetAnalyticsCount in additem.pl and correcting
    indentation in that loop (removing tabs). So no change at all there.

NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two
other scripts to this preference too on report 20702.

Test plan:
[1] If you use EasyAnalytics, verify that there is no change.
[2] If you do not, check the zebra-output.log. You should no longer see
    searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on
    this index.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 17869: Don't show pick-up library for list of holds in OPAC account when there...
Owen Leonard [Mon, 18 Jun 2018 18:29:57 +0000 (18:29 +0000)]
Bug 17869: Don't show pick-up library for list of holds in OPAC account when there is only one branch

This patch modifies the user summary page in the OPAC so that the
"pick up location" column isn't shown in the table of holds if there is
only one library defined.

To test, apply the patch and log into the OPAC as a user with one or
more holds.

 - In a system with more than one library defined the "Holds" tab of
   opac-user.pl should show a "Pick up location" column.

 - In a system with only one library defined there should be now "Pick
   up location" column.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20893: batchRebuildItemsTables.pl has incorrect parameter
Nick Clemens [Thu, 7 Jun 2018 14:03:11 +0000 (14:03 +0000)]
Bug 20893: batchRebuildItemsTables.pl has incorrect parameter

To test:
1 - run batchRebuildItemsTables.pl with a valid biblionumber
   perl /usr/share/koha/bin/batchRebuildItemsTables.pl --where biblio.biblionumber=38483  -c
2 - Note it says 'undefined biblionumber
3 - Apply patch
4 - Do it again
5 - It works!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 16653: (QA follow-up) Avoid a warning and remove unused variables
Julian Maurice [Mon, 25 Jun 2018 12:58:17 +0000 (14:58 +0200)]
Bug 16653: (QA follow-up) Avoid a warning and remove unused variables

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 16653: Display number of checkouts when exporting 'Most-circulated items' as CSV
Jonathan Druart [Thu, 7 Jun 2018 14:47:46 +0000 (11:47 -0300)]
Bug 16653: Display number of checkouts when exporting 'Most-circulated items' as CSV

reports/cat_issues_top.pl does not export "Count of checkouts" column as CSV

To replicate:

1/ Make sure that test instance has circulation in a given date range
2/ Go to Home › Reports › Most-circulated items
3/ Select a date range
4/ Select 'To screen into the browser' radio button, click submit.
5/ Note that Columns 'Rank/Biblioitemnumbers', 'Global' and 'Count of checkouts' appear in screen output.
6/ Click the browser's back button
7/ Change output to 'To a file', click submit.

Without this patch:
the columns "100/", "Global" and "Total" are exported to the CSV file.
"100/" contains the rank, "Global" is still global, and the "Total" column is empty.

With this patch patch applied, the last column is filled and the "Total" line is removed

(This script is really dirty)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
(Yes it is)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20903: Remove unnecessary category code parameters
Josef Moravec [Fri, 8 Jun 2018 09:43:13 +0000 (09:43 +0000)]
Bug 20903: Remove unnecessary category code parameters

Test plan:
0) Do no apply the patch
1) Have only one adults patrons category defined
2) Add a fine to child patron and pay it
3) Try to print the payment receipt (file printfeercpt.pl)
4) You see only ISE
5) Apply the patch
6) Try the printing again
7) Now you should see right receipt

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20998: Simplify the conditional statement
Jonathan Druart [Tue, 26 Jun 2018 15:37:19 +0000 (12:37 -0300)]
Bug 20998: Simplify the conditional statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20998: Only perform quicksearch if patron found with cardnumber
Nick Clemens [Tue, 26 Jun 2018 15:02:02 +0000 (15:02 +0000)]
Bug 20998: Only perform quicksearch if patron found with cardnumber

This patch makes sure we have a patron before we try to access their
branchcode and allows search to work

To recreate:
1 - Enable 'IndependentBranches'
2 - Setup a patron with all permissions, but not a superlibrarian
3 - Login to staff client as that patron
4 - Click 'Patrons' in the toolbar and try a search
5 - Internal server error
6 - Apply patch
7 - Try the search again
8 - Success!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20867: Ability to show membership renewal date on moremember.pl page
Amit Gupta [Tue, 5 Jun 2018 16:51:51 +0000 (22:21 +0530)]
Bug 20867: Ability to show membership renewal date on moremember.pl page

Test case:
1. Create the patron.
2. Search the patron whose date of membership is about to expire or expired.
3. Click on More->Renew patron.
4. Now membership is renewed.
5. Apply the patch.
6. Reload the page now you will able to see the Membership renewal date.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

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>
6 years agoBug 18521: Fix key binding in the header
Alex Buckley [Thu, 24 May 2018 10:10:05 +0000 (10:10 +0000)]
Bug 18521: Fix key binding in the header

Moving the conditional block [% IF (CAN_user_circulate_circulate_remaining_permissions ) %] block up the checkin-search.inc file above the CAN_user_catalogue IF conditional block fixes this bug.

Test plan:
1. Go to the circ home page and confirm the following
keyboard shortcuts work:

Alt+q = goes to search catalog
Alt+w = goes to renew

2. Go to returns.pl and confirm the following  keyboard shortcuts work:

Alt+q = goes to renew
Alt+w = goes to search catalog

3. Apply patch

4. Restart apache2, memchached and plack

5. Confirm on the returns.pl the following keyboard shortcuts work:
Alt+q = goes to search catalog
Alt+w = goes to renew

Sponsored-By: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated
Owen Leonard [Mon, 4 Jun 2018 13:52:28 +0000 (13:52 +0000)]
Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated

This patch adds a system preference check around the call to the
JavaScript include which sets the bibs_selected cookie. With
BrowseResultsSelection disabled, the cookie should never be set.

To test you should be using a browser with a tool for inspecting
cookies. View the cookies for your Koha domain under each of these
conditions, clearing cookies between each step:

Without the patch applied:

 - With  BrowseResultSelection enabled, search for any item. Your cookie
   tool should report that you have a bibs_selected cookie stored.
 - With BrowseResultSelection disabled, search for any item. You should
   have a bibs_selected cookie.

With the patch applied:

 - With the BrowseResultSelection system preference enabled, search for
   any item. Your cookie tool should report that you have a
   bibs_selected cookie stored.
 - With BrowseResultSelection disabled, search for any item. You should
   have no bibs_selected cookie.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20879: Fix regression in shibboleth when ldap enabled
Martin Renvoize [Thu, 21 Jun 2018 07:28:08 +0000 (08:28 +0100)]
Bug 20879: Fix regression in shibboleth when ldap enabled

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20972: Add a testcase for bug 20972
Colin Campbell [Fri, 22 Jun 2018 14:02:01 +0000 (15:02 +0100)]
Bug 20972: Add a testcase for bug 20972

Ensure all 10 characters of ISBN are preserved

And that ISBNs and EANs are correctly identidied in the PIA segment

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>
6 years agoBug 20972: If ISBN has 10 numbers only the first 9 numbers are used
xljoha [Thu, 21 Jun 2018 07:58:55 +0000 (09:58 +0200)]
Bug 20972: If ISBN has 10 numbers only the first 9 numbers are used

If ISBN has 10 numbers only the first 9 numbers are being added to the Edifact-message (PIA+5+3540556753:IB')

This is caused by wrong positioning of capturing parentheses in a regular expression.

Sponsored-by: Gothenburg University Library
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
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>
6 years agoBug 20876: The form_serialized_itype cookie is not used and should be removed
Owen Leonard [Mon, 4 Jun 2018 14:40:03 +0000 (14:40 +0000)]
Bug 20876: The form_serialized_itype cookie is not used and should be removed

This patch removes references to a form_serialized_itype cookie which
appears in the code as part of the process of storing information used
in the generation of the "Return to the last advanced search" link.

To test, apply the patch and perform an advanced search in the OPAC
using several search options including a limit by item type. From the
search results page, follow the "Return to the last advanced search"
link. The advanced search form should appear with all the search options
you submitted before.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20456: (follow-up) Fix number of subscriptions and position display
Katrin Fischer [Sat, 21 Apr 2018 01:07:58 +0000 (01:07 +0000)]
Bug 20456: (follow-up) Fix number of subscriptions and position display

TT variables needed to be adjusted because of changes from bug 20400.
Also: while we want logged_in_user in OPAC, we don't want that in staff.

1) Check the right number of subscriptions is displayed on top of the table
2) check the right position number is display for the routing list

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20456: Remove the C4::Serials::GetSubscriptionsFromBorrower
Katrin Fischer [Fri, 16 Mar 2018 09:13:19 +0000 (10:13 +0100)]
Bug 20456: Remove the C4::Serials::GetSubscriptionsFromBorrower

Bug 20400 added a routing list tab to the patron account in the
OPAC using Koha::Object. After changing the staff view too,
we can now safely remove GetSubscriptionsFromBorrower as it
is no longer used.

To test:
- Make sure that GetSubscriptionsFromBorrower is no longer used.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20456: Switch routling list tab in staff to use Koha::Object
Katrin Fischer [Fri, 16 Mar 2018 08:57:06 +0000 (09:57 +0100)]
Bug 20456: Switch routling list tab in staff to use Koha::Object

Bug 20400 added a routing list tab to the patron account in the
OPAC using Koha::Object.

This patch switches the routing list tab in the patron account
in intranet over to the new code. It also adds an additional
column showing the position of the patron on the routing list
and fixes the search.

To test:
- Create some subscriptions with routing lists
- Take a look at the patron accounts of several patrons having
  - no entries on routing lists
  - 1 entry on a routing list
  - entries on several routing lists
- Make sure the display works correctly.
- Search for a subscription and make sure search works.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20702: Bind results of GetHostItemsInfo to the EasyAnalyticalRecords pref
Marcel de Rooy [Thu, 3 May 2018 11:12:19 +0000 (13:12 +0200)]
Bug 20702: Bind results of GetHostItemsInfo to the EasyAnalyticalRecords pref

Triggered by the finding on bug 20697.
The three calls of GetHostItemsInfo should be controlled by the pref. This
patch makes the sub return an empty list when the pref is disabled.

The patch simplifies the sub by merging the two identical foreach loops
depending on the field number in MARC21/UNIMARC.

Will add a unit test on a follow-up patch.

Test plan:
See next patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
6 years agoBug 20702: Add unit tests for GetHostItemsInfo
Marcel de Rooy [Thu, 3 May 2018 12:08:01 +0000 (14:08 +0200)]
Bug 20702: Add unit tests for GetHostItemsInfo

Unfortunately, we did not have unit tests yet.
Adding some simple tests that test basic operation of the sub when the
pref is enabled/disabled and for MARC21/UNIMARC.

Test plan:
[1] Run t/db_dependent/Items/GetHostItemsInfo.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
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>
6 years agoBug 20794: Hide holds tab on details when user lacks circulate_remaining_permissions
Katrin Fischer [Sun, 20 May 2018 02:23:47 +0000 (04:23 +0200)]
Bug 20794: Hide holds tab on details when user lacks circulate_remaining_permissions

If a user doesn't have circulate_remaining permissions, but has borrowers:
- checkouts tab is hidden
- details tab is visible
- holds tab on details is visible, but results in an error

The problem is that the svc/holds script requires circulate_remaining_permissions.

To test:
- Create 2 staff users with and without circulate_remaining_permissions
  Both need borrowers permission
- Go to the details tab in a patron's account who has holds
- Verify that you get a datatables error for the staff patron without
  circulate_remaining_permissions
- Apply patch
- Verify that now the holds tab is no longer displayed for this patron

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20881: Order receiving: Price filter missing on_editing
Pasi Kallinen [Tue, 5 Jun 2018 10:26:43 +0000 (13:26 +0300)]
Bug 20881: Order receiving: Price filter missing on_editing

When the Price-filter is used on editable data, it should have the
on_editing -tag. Add it to the orderreceive.tt

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
To test:
- Set CurrencyFormat to FR
- Create a basket with orders in acq
- Close it
- Receive shipment and pick order line to receive
- On this screen verify that the actual cost appears as comma-separated
- Apply patch
- Refresh page
- Verify that the actual cost now appears .-separated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 13655: Same fix for partial edit
Jonathan Druart [Thu, 21 Jun 2018 15:28:18 +0000 (12:28 -0300)]
Bug 13655: Same fix for partial edit

Test plan:
- Create an organisation with surname='xxx'
userid will be autogenerated with 'xxx''
- Edit the surname with 'yyy'
userid will be unchanged, 'xxx'
- Parial edit and blank userid
userid will be autogenerated with 'yyy'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 13655: Allow creation of organisations without entering userid
Jonathan Druart [Thu, 12 Apr 2018 16:40:59 +0000 (13:40 -0300)]
Bug 13655: Allow creation of organisations without entering userid

See comment 1 of the bug report for defails of the issue.

Test plan:
Good luck (you will need to test all combinations (category type eq and
ne 'I'), then quick edition and partial edit)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge
Fridolin Somers [Fri, 15 Jun 2018 10:56:36 +0000 (12:56 +0200)]
Bug 20951: add missing use Koha::Patron::Debarments in Koha::Patron::Discharge

Koha::Patron::Discharge was missing use Koha::Patron::Debarments used in discharge() method.

Test plan :
1) Enable pref useDischarge
2) Go to OPAC user page
3) Go to 'ask for a discharge' tab
4) Click on 'Ask for a discharge'
5) Go to staff interface : /cgi-bin/koha/members/discharges.pl
6) Click on Allow
=> Without patch you get software error
=> With patch the discharge is validated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20928: Fix regression - display patron's info on moredetail if item is checked out
Jonathan Druart [Thu, 14 Jun 2018 14:43:12 +0000 (11:43 -0300)]
Bug 20928: Fix regression - display patron's info on moredetail if item is checked out

This patch is a follow-up of
  commit 5f80977875ff124d411f2cd89de4a944fa9c27af
  Bug 18403: Use patron-title.inc when hidepatronname is used

Test plan:
- Check an item out
- Go on the moredetail.pl page of this biblio record
Home › Catalog › Item details for your biblio
- Confirm that you see:
"Checkout status: Checked out to"
followed by the patron's info

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20906: Fix translatable-templates.t
Jonathan Druart [Fri, 8 Jun 2018 16:06:58 +0000 (13:06 -0300)]
Bug 20906: Fix translatable-templates.t

From Jenkins:
koha_1       | #   Failed test 'staff_prog templates are translatable'
koha_1       | #   at xt/author/translatable-templates.t line 87.
koha_1       | # Can't locate TmplTokenizer.pm in @INC (you may need to install the TmplTokenizer module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./tmpl_process3.pl line 20.

On Stretch, '.' is not longer added to @INC, see bug 17717 for more info

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20906: Prevent test failures due to precision changes (2)
Martin Renvoize [Fri, 8 Jun 2018 14:21:22 +0000 (15:21 +0100)]
Bug 20906: Prevent test failures due to precision changes (2)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20906: Prevent test failures due to stricter perl
Martin Renvoize [Fri, 8 Jun 2018 13:32:02 +0000 (14:32 +0100)]
Bug 20906: Prevent test failures due to stricter perl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20906: Prevent test failures due to precision changes
Martin Renvoize [Fri, 8 Jun 2018 11:50:31 +0000 (12:50 +0100)]
Bug 20906: Prevent test failures due to precision changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoAdd html release notes for 18.05.01
Martin Renvoize [Mon, 25 Jun 2018 13:56:55 +0000 (14:56 +0100)]
Add html release notes for 18.05.01

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoUpdate release notes for 18.05.01 release v18.05.01
Martin Renvoize [Fri, 22 Jun 2018 09:45:23 +0000 (10:45 +0100)]
Update release notes for 18.05.01 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoIncrement version for 18.05.01 release
Martin Renvoize [Fri, 22 Jun 2018 07:54:26 +0000 (08:54 +0100)]
Increment version for 18.05.01 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20981: Fix organization name when displaying patron's info
Jonathan Druart [Thu, 21 Jun 2018 20:34:17 +0000 (17:34 -0300)]
Bug 20981: Fix organization name when displaying patron's info

Caused by bug 18403.
From patron-title.inc, we need a IF instead of UNLESS.

Test plan:
Create organizations
Search for patrons
=> Without this patch the "Name" column is empty for organizations
=> With this patch applied you will see the surname (and othernames if
exists)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years ago(rm followup): Fix translations that are failing tests
Martin Renvoize [Fri, 22 Jun 2018 06:34:12 +0000 (07:34 +0100)]
(rm followup): Fix translations that are failing tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoTranslation updates for Koha 18.05.01
Koha translators [Fri, 22 Jun 2018 05:50:41 +0000 (02:50 -0300)]
Translation updates for Koha 18.05.01

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20285: Lost item refund won't always pay down lost item fee first
Kyle M Hall [Fri, 23 Feb 2018 13:44:45 +0000 (08:44 -0500)]
Bug 20285: Lost item refund won't always pay down lost item fee first

Due to a simple typo, the accountline passed to Koha::Account::pay from _FixAccountForLostAndReturned is not used. That means that the credit for the lost item fee may be applied to other fees before it is used on the lost fee itself.

Test Plan:
1) Find a patron with existing fines
2) Ensure your settings will charge patrons for lost items
3) Check out an item to a patron with existing fees that need paid
4) Mark the item lost, charging the lost item fee
5) Return the item
6) Note the fee was refunded, but it paid down earlier fines first,
   and not the lost item fee first
7) Apply this patch set
8) Repeat steps 1 - 5
9) Note the lost item fee is the first fee to be paid off by the lost
   item fee refund

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20285: Unit Test
Kyle M Hall [Fri, 23 Feb 2018 13:44:24 +0000 (08:44 -0500)]
Bug 20285: Unit Test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 19970: Revise change of bug 19413 to work better for translations
Owen Leonard [Thu, 31 May 2018 15:32:29 +0000 (15:32 +0000)]
Bug 19970: Revise change of bug 19413 to work better for translations

This patch changes how the submit and cancel buttons appear in the MARC
008 plugin window. The controls are now displayed as buttons in a
floating toolbar.

To test you must have MARC tag 008 configured to use the
marc21_field_008.pl plugin.

- Apply the patch and open an existing or blank record in cataloging.
- Click the plugin link next to tag 008 to trigger the popup window.
- Confirm that "Save" and "Cancel" appear correctly in a toolbar.
- Scroll down the page to confirm that the toolbar "sticks" to the top
  of the window.
- Confirm that the "Save" and "Cancel" buttons work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20760: Fill authorised values in svc framework
Jonathan Druart [Mon, 4 Jun 2018 16:02:33 +0000 (13:02 -0300)]
Bug 20760: Fill authorised values in svc framework

To test:
 1 - Map a marc field to an authorised value in the default framework -
say 300$c -> CCODE
 2 - Open the advanced cataloguing editor
 3 - Create a new field 300$c - note there is no dropdown
 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define
 5 - Note the many instance of
Koha::Schema::ResultSet::AuthorisedValueCategory->HASH...
 6 - Apply patch
 7 - Restart memcached and plack
 8 - reload/recreate record in rancor
 9 - Note that 300$c is now a dropdown as expected
10 - repeate 4
11 - note the authorised values look correct in response

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20911: Use 'POST' to submit search history forms
Nick Clemens [Mon, 11 Jun 2018 15:28:19 +0000 (15:28 +0000)]
Bug 20911: Use 'POST' to submit search history forms

To test:
1 - Enable EnableOpacSearchHistory and EnableSearchHistory
2 - Do some searches
3 - View your search history in staff/opac
4 - Confirm you can delete single or multiple rows
5 - Confirm other page functionality has not changed

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20892: Correct basketgroup link in histsearch.pl
Fridolin Somers [Thu, 7 Jun 2018 13:59:39 +0000 (15:59 +0200)]
Bug 20892: Correct basketgroup link in histsearch.pl

When searching an order, histsearch.pl page, you see if exists the backetgroup as a link.
This link is composed of "basketgroup.pl?booksellerid=xxx", it must also contain "basketgroupid=xxx" and "opa=add".

See Bug 11429 for example.

Test plan :
1) Create an order in a basket and add it to a basketgroup
2) Search for this order, you get to page histsearch.pl
3) Check clicking on basketgroup id leads to basketgroup details page

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20899: Fix patron's name display
Jonathan Druart [Tue, 12 Jun 2018 14:13:46 +0000 (11:13 -0300)]
Bug 20899: Fix patron's name display

This is a follow-up for
  commit fa54100dffe092e606f79b15692eedaf78f42e45
  Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]

We should use patron-title.inc to display (or hide) patron's info on the
checkout history view

Test plan:
Issue an item, go to the biblio, click the circulation history for this
tab.
Note that the patron's name is showing.

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20918: Fix left-side navigation on the checkout history page
Jonathan Druart [Tue, 12 Jun 2018 14:26:02 +0000 (11:26 -0300)]
Bug 20918: Fix left-side navigation on the checkout history page

  commit fa54100dffe092e606f79b15692eedaf78f42e45
  Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]

Removed:
-    biblionumber => $biblionumber, # required for left-side navigation

But did not deal with the side-effects.

Test plan:
When you are on the "Checkout history" page (/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=42),
the left-side navigation is broken if this patch is not applied, the biblionumber is not set.

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20922: Remove use of Koha::Number::Price in updatedatabase.pl
Jonathan Druart [Tue, 12 Jun 2018 16:12:25 +0000 (13:12 -0300)]
Bug 20922: Remove use of Koha::Number::Price in updatedatabase.pl

Koha::Number::Format->round use Number::Format->round with a precision=2
We should use it directly instead of Koha::* modules. It will avoid the
DB entry to fail because schema changes.

From the koha-devel list:

http://lists.koha-community.org/pipermail/koha-devel/2018-June/044608.html

16.06.00.042

Upgrade to 16.06.00.041 done (Bug 14629 - Add aggressive ISSN matching
feature equivalent to the aggressive ISBN matcher)
DBD::mysql::st execute failed: Unknown column 'me.p_sep_by_space' in
'field list' [for Statement "SELECT `me`.`currency`, `me`.`symbol`,
`me`.`isocode`, `me`.`timestamp`, `me`.`rate`, `me`.`active`,
`me`.`archived`, `me`.`p_sep_by_space` FROM `currency` `me` WHERE (
`active` = ? )" with ParamValues: 0=1] at
/usr/local/share/perl/5.24.1/DBIx/Class/Storage/DBI.pm line 1836.
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column
'me.p_sep_by_space' in 'field list' at
/inlibro/git/koha-csf-prod-inlibro/Koha/Objects.pm line 209

Basically, the update code uses Koha::Number::Price, which in full
modern object mode goes for its newly added *p_sep_by_space* _in the
18.05 code_.  But the DB doesn't have it yet (it comes with 17.12.00.022).

Signed-off-by: Blou <philippe.blouin@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20832: Fix opac user profile page when there is overdue fine and no rental charge
Josef Moravec [Tue, 29 May 2018 11:48:14 +0000 (11:48 +0000)]
Bug 20832: Fix opac user profile page when there is overdue fine and no rental charge

Test plan:
0) Do not apply the patch
1) Have an overdue fine linked with specific item currently checked out
to your patron
2) Do not have any unpaid rental fees
3) Go to this patron profile in opac - page opac-user.pl
4) The page crashes with "Can't call method "get_column" on an undefined
value at
/usr/share/koha/opac/cgi-bin/opac/opac-user.pl line 217" in log
5) Apply the patch
6) Restart plack
7) The page should working and show the right amounts for fines

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20851: Add module to circ/article-request-slip.pl
Marcel de Rooy [Fri, 1 Jun 2018 07:21:48 +0000 (09:21 +0200)]
Bug 20851: Add module to circ/article-request-slip.pl

See bug 20468, comment7.
Although the script seems to compile well, we better add the module here.
Trivial change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20756: Compiled CSS
Owen Leonard [Mon, 14 May 2018 15:08:13 +0000 (15:08 +0000)]
Bug 20756: Compiled CSS

This patch contains the compiled CSS file

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20756: OPAC "Share list" button should be styled with an icon
Owen Leonard [Mon, 14 May 2018 15:07:42 +0000 (15:07 +0000)]
Bug 20756: OPAC "Share list" button should be styled with an icon

This patch adds a new "share" icon to the sprite image used to style
controls in the OPAC. The "share list" links now have a "sharelist"
class which is used to style the links with the new icon.

Also changed: Fixed the page structure markup of opac-shareshelf.tt.

To test you must have the OpacAllowSharingPrivateLists system preference
enabled.

 - Log in to the OPAC and go to Lists -> Your lists.
 - Create one or more private lists if necessary.
 - In the table of your lists there should be a "Share" link with the
   new icon.
 - View one of these lists and confirm that the "Share" link at the top
   of the table of list items.
 - Click through to the share list page and confirm that the page looks
   correct.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20700: MARC21 add/update leader/007/008 codes
Bernardo Gonzalez Kriegel [Wed, 2 May 2018 22:42:22 +0000 (19:42 -0300)]
Bug 20700: MARC21 add/update leader/007/008 codes

This add/updates some codes from updates 22 (Apr/16)
and 23 (Nov/16)

Update 22 https://www.loc.gov/marc/up22bibliographic/bdapndxg.html

Sound Recording 007/03 n (new)
Sound Recording 007/10 n (new)
Sound Recording 007/01 r (new)
Sound Recording 007/01 s (new)

Update 23 https://www.loc.gov/marc/up23bibliographic/bdapndxg.html

Leader/18 n (new)
Music 008/20 p (new), b (renamed)

To test:
1) Apply the patch
2) Clean your browser cache
3) Go to cataloguing -> new record
4) Leader plugin: check leader/18, new option 'n'
5) 007 Plugin:
a) Sound recording
check 007/01 new 'r'
check 007/03 new 'n'
check 007/10 new 'n'
b) Electronic resource
check 007/01 new 's'
6) 008 Plugin: Music, check 008/20 renamed 'b', new 'p'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20886: Do not cast undef to 0 (TO_JSON)
Jonathan Druart [Wed, 6 Jun 2018 14:12:24 +0000 (11:12 -0300)]
Bug 20886: Do not cast undef to 0 (TO_JSON)

We should not cast undefined values to 0.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This was a bug I introduced. I think the fix is right, and if something
gets broken for this, it means it was making the wrong assumptions on
the data.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20778: (bug 19777 follow-up) Fix subscription deletion
Jonathan Druart [Mon, 4 Jun 2018 15:14:10 +0000 (12:14 -0300)]
Bug 20778: (bug 19777 follow-up) Fix subscription deletion

Caused by
  commit 666a1b276097785c2a7c33e718f26f5512b3d972
  Bug 19777: Move template JavaScript to the footer: Serials, part 3

TT vars should not be used in .js files

Test plan:
Delete a subscription, confirm you see the confirmation popup and that
the it deletes the subscription correctly after it has been confirmed.

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20053: Drop type attribute "text/javascript" in OPAC templates
Owen Leonard [Tue, 1 May 2018 13:08:18 +0000 (13:08 +0000)]
Bug 20053: Drop type attribute "text/javascript" in OPAC templates

This patch is a reimplementation of the original from Indranil Das Gupta
and the QA follow-up from Julian Maurice. Original test plan:

Conformance rules for HTML5 is generating warnings for <script> element
with type="text/javascript" attribute when the OPAC page is checked
with W3C Validator. This patch removes the cause of these warnings.

Test plan
=========

1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator
   and watch about 10+ warnings being generated by the validator.

2/ Apply patch and re-submit the page to the Validator. The warnings
   would be gone.

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20829: Handle non-existent barcode when linking to host item
Jonathan Druart [Wed, 30 May 2018 15:10:58 +0000 (12:10 -0300)]
Bug 20829: Handle non-existent barcode when linking to host item

Since commit 2c9aeb9b0f4449d1a25274b8fbf8dae4ec11d3bf
  Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem

$item is not defined if the barcode is invalid, we should not call
method on it in that case.

Test plan:
- Turn on EasyAnalyticalRecords
- Go to a detail page
- Edit > Link to host item
- Enter an invalid barcode
=> With the patch you get a friendly error message
=> Without this patch it explodes with
Can't call method "itemnumber" on an undefined value at
/home/vagrant/kohaclone/cataloguing/linkitem.pl line 86.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20120: (QA follow-up) display correct amount in redirect
Nick Clemens [Fri, 8 Jun 2018 12:03:01 +0000 (12:03 +0000)]
Bug 20120: (QA follow-up) display correct amount in redirect

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20120: force scalar context for CGI->param
Jonathan Druart [Thu, 3 May 2018 16:26:08 +0000 (13:26 -0300)]
Bug 20120: force scalar context for CGI->param

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20120: (QA follow-up) Pass on_editing parameter for Price plugin
Kyle M Hall [Fri, 27 Apr 2018 10:00:41 +0000 (06:00 -0400)]
Bug 20120: (QA follow-up) Pass on_editing parameter for Price plugin

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>
6 years agoBug 20120: Prevent writeoffs of more than the amount owed for a fee
Kyle M Hall [Fri, 9 Mar 2018 14:20:40 +0000 (09:20 -0500)]
Bug 20120: Prevent writeoffs of more than the amount owed for a fee

In short, it is possible to 'over-writeoff' a fee such that the value of the fee is now a credit.

Test Plan:
1) Attempt to writeoff a single fee, set the amount input to more than
   the amount of the fee.
2) Note the writeoff makes the fee go negative.
3) Apply this patch
4) Attempt to repeat step 1, you should be unable to write-off an
   amount more than the amount outstanding for the fee!

Signed-off-by: George Williams <george@nekls.org>
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>
6 years agoBug 20875: (bug 16735 follow-up) Fix library list for OpacAddMastheadLibraryPulldown
Jonathan Druart [Mon, 4 Jun 2018 14:23:35 +0000 (11:23 -0300)]
Bug 20875: (bug 16735 follow-up) Fix library list for OpacAddMastheadLibraryPulldown

This patch fixes a regression introduced by
  commit 2059f7d8016ab61172830e9b670279d3e28882b7
  Bug 16735: Migrate library search groups into the new hierarchical groups

It re-added code that was removed by bug 15758 (use of var BranchesLoop).

Test plan:
- Create library search groups
- Turn OpacAddMastheadLibraryPulldown on
- At the OPAC confirm that the search box with libraries and library
groups is displayed and works correctly.
- Remove the library search group
- The dropdown list should not have the optgroup tags

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>
6 years agoBug 20877: Do not consider DB user has permissions
Jonathan Druart [Mon, 4 Jun 2018 18:45:22 +0000 (15:45 -0300)]
Bug 20877: Do not consider DB user has permissions

Test plan:
0/ Do not apply the patch
1/ Confirm the new test fails
2/ Apply the patch
3/ Confirm the new test passes
4/ Test the installation process

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
6 years agoBug 18821: (QA follow-up) Last tweaks for performance
Marcel de Rooy [Fri, 1 Jun 2018 09:00:57 +0000 (11:00 +0200)]
Bug 18821: (QA follow-up) Last tweaks for performance

[1] passing unsafe has no use since it is a scalar, removed it to unconfuse
[2] remove caching when pref is disabled
[3] caching userid removes the need for calling Patron->find each time
[4] subsequent changes in unit test
[5] cosmetic renames to move from session to daily basis (changed dev angle)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First call going thru Koha::Patron takes about 0.0150 sec.
Subsequent calls only use caching and take about 0.0006 sec.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 18821: Convert to using cache with date checking
Kyle M Hall [Sat, 26 May 2018 06:40:24 +0000 (06:40 +0000)]
Bug 18821: Convert to using cache with date checking

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 18821: TrackLastPatronActivity is a performance killer
Kyle M Hall [Mon, 7 May 2018 17:29:12 +0000 (17:29 +0000)]
Bug 18821: TrackLastPatronActivity is a performance killer

Test Plan:
1) Apply this patch
2) Start a new session ( a private browser window works well )
3) Note the lastseen column in the borrowers table is updated
4) Browse a few pages, not the lastseen column is not updated again
5) Close the browser window and repeat steps 2-4
6) prove t/db_dependent/Auth.t

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20889: Prevent not for loan items to be checked out
Jonathan Druart [Wed, 6 Jun 2018 17:25:19 +0000 (14:25 -0300)]
Bug 20889: Prevent not for loan items to be checked out

1. Item type defined at item level (item-level_itypes=1)
2. Mark an item type not for loan (itemtypes.notforloan=1)
3. Checkout an item using this item type (items.itype="BK" for instance)
=> Checkout is not blocked!

I suspect
  commit 3953fdb921d7f280ffbaca813956357aa67d42ca
  Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued
to be the root of this issue.
One occurrence of $item->{itemtype} has not been replaced.
In this case it refers to the biblioitem->{itemtype} value whereas we want to use
$item->{itype}. So this issue does not happen if items.itype==biblioitem.itemtype
(just in case you are not reproducing the problem).

Test plan:
Make sure not for loan items cannot be checked out

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 years agoBug 20889: Add tests - not for loan items cannot be checked out
Jonathan Druart [Wed, 6 Jun 2018 17:24:33 +0000 (14:24 -0300)]
Bug 20889: Add tests - not for loan items cannot be checked out

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>