]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 20700: MARC21 add/update leader/007/008 codes (17.11.x version)
Bernardo Gonzalez Kriegel [Thu, 14 Jun 2018 14:42:20 +0000 (11:42 -0300)]
Bug 20700: MARC21 add/update leader/007/008 codes (17.11.x version)

For Koha 17.11.x version

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'

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>
(cherry picked from commit c058a4a4858d5c03841b88ba65d232a03046304d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 3f1f212553a329a5fbda51e2746fac91ec4fc37c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 1b8b3a7390f785b2fda403e679a1b34a730327c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 77159706ca0226dccc56c2c50c161b5bd37e64ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit c1f916c1aa6e4937eca2dcf5b6493368d18cbcae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 5d79a95226d71482a1070e994746785ec7278542)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 05e612525bf8d92562ae9e17904a974913819125)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit e98d4d30cad78715e613f833ed2356070f9985ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit d7ae1d65a461ed9f5052d45f3069a30f671660f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit da51f6bcc9eb2bff48da2d7ca0efb7b791c62192)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 3b02a8d2da4b3a20bc3a4970b537066ff389b959)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20693: Update control file
Mirko Tietgen [Tue, 15 May 2018 11:58:03 +0000 (13:58 +0200)]
Bug 20693: Update control file

Auto-generated file.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2a6cad2fa9d8e4419be7538949b4ce9a758d0e9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20693: Plack fails, because 'libcgi-emulate-psgi-perl' package is not installed
Mirko Tietgen [Tue, 15 May 2018 11:47:10 +0000 (13:47 +0200)]
Bug 20693: Plack fails, because 'libcgi-emulate-psgi-perl' package is not installed

Add CGI::Emulate::PSGI to PerlDependencies.pm

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f9e06c38495ad9b7c14a9866414c229da92833db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 6f047049ca973fe2cf02c7ce124fec0366c3f4fd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b3cd4a382ffad36668164749dafb58d48c00d7f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b6010314dfed0f35c87de1a6c8209cd3e8f8b3c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 0557c0fd9c468fb32011897318fb239dcdc30bc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 6ad2c1402fa3a8d419a357233a6e4ad19e58a3db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 9d96e2142140b8184e77da038fde51c0f7000c87)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 737702f9756f89f6f75b2a3323e03738234fa143)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 73f37b3a561efe61832bde372ffc42fb9dd47f54)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 5bb6b6581c9385d693194338db3e7865d2c28409)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 5f03b21cf3a7141dc0f2ae2b1922505d55d4cd34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit d874e52cdc6bcb20ee12885b9ecec0f339d315db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 3afc24c776a30fc510c23177548b8b26fd44c4c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 21019: Fix display of patron's address on reserve pop-up on returns.pl
Jonathan Druart [Fri, 29 Jun 2018 12:53:27 +0000 (09:53 -0300)]
Bug 21019: Fix display of patron's address on reserve pop-up on returns.pl

Caused by
  commit 2b90ea2cb0e5e976de7ddef0151ae83d8ac578e6
  Bug 17829: Move GetMember to Koha::Patron

address variable has been replaced by boraddress (wrong resolution
conflict?)

It does not affect master (thanks bug 18789)

Test plan:
Confirm the address of the patron with a hold placed on the item is now
displayed when this item is checked in

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit 5c6c65476838d701b1f44199407efbade349967b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit c528c05f303d1d4c99680ebf61fb78a79b92bedf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 82ce10dd2817e99aa138d87287d903e5c7539a0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b9bd93e9205d4b8344a77214fefb8efe2c84792e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 3b9a81e394c4f47433b3f0057b9b819549f583b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 7861cc07ba8afdf09079c7b51fdb99ad99132688)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 5462c1a88b2652fb25c67f40946436eb243d6ed1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b3d1a5bfecbfbac4af8335757414def1ee3e2df5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 279e328cdda0e3e17c244a39b933ce898bc5bee2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 842abeb423b81c61d2774f8446a5bcbb2d0a258c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 1600d82c610aba303ea0cb1f31f1a81d36483ffb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit a19c161675840c7a5f6546da3d678149d31e260b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit baf43e6a5b1ddd57306ef779d725e05534aad92b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b13429395830f3f84bc551d769e2ee28c7a740ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoUpdate release notes for 17.11.07 release v17.11.07
Fridolin Somers [Mon, 25 Jun 2018 13:04:03 +0000 (15:04 +0200)]
Update release notes for 17.11.07 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoIncrement version for 17.11.07 release
Fridolin Somers [Mon, 25 Jun 2018 12:22:08 +0000 (14:22 +0200)]
Increment version for 17.11.07 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoTranslation updates for Koha 17.11.07
Koha translators [Mon, 25 Jun 2018 12:14:05 +0000 (09:14 -0300)]
Translation updates for Koha 17.11.07

6 years agoBug 17111 - Automatic debian/control updates (oldstable/17.11.x)
Nightly Build Bot [Fri, 15 Jun 2018 11:34:10 +0000 (13:34 +0200)]
Bug 17111 - Automatic debian/control updates (oldstable/17.11.x)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
6 years agoBug 19970: (17.11.x) Revise change of bug 19413 to work better for translations
Owen Leonard [Mon, 18 Jun 2018 12:05:06 +0000 (12:05 +0000)]
Bug 19970: (17.11.x) 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.

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>
(cherry picked from commit 2f2a5b2c58f49e2635a38040fa0130d5f2677488)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 096ba7d34cd08fcafed0aef2fcf272907cba55f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit ac390bd228c6ea7eab7c8b694a378a837f8da464)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit e4c26c44d3c70cf62225361a4cce94e1f5aa16c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit e60226e40117e50a5fcc51b125cac22036dfb32f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 93de5885098b9982a3ab9ad73ff73111d71ac3ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 84fd5b109e24e7c1ee67d7bb0c7ff1fb9776c8de)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit b004818515a5b5fbc7748da614b758d1516c0ff2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 19972: Make holds to pull list honors item-level_itypes syspref
Victor Grousset [Tue, 16 Jan 2018 09:06:20 +0000 (10:06 +0100)]
Bug 19972: Make holds to pull list honors item-level_itypes syspref

And reflect that in the UI strings + variable names

Test plan:
1. Set syspref "item-level_itypes" to "specific item"
2. Create a hold on a record with one item
3. Change the document type of the item
4. Check that the item edition page and the record page show 2 different
     types.
5. Go to /cgi-bin/koha/circ/pendingreserves.pl
6. Check that the displayed type is the item one
7. Set syspref "item-level_itypes" to "biblio record"
8. Go to /cgi-bin/koha/circ/pendingreserves.pl
9. See that the displayed type is the item one. When the sysopref says
     "record"
     This is the bug.
10. Apply this patch
11. Go to /cgi-bin/koha/circ/pendingreserves.pl
12. See that the displayed type now follows the syspref
13. Set syspref "item-level_itypes" to "specific item"
14. Go to /cgi-bin/koha/circ/pendingreserves.pl
15. See that the displayed type still follows the syspref

Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4c9b26e437f70f9ad422586cc3a40812aa660aff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 2bae585fcd4d5a5e31c0503cc8ea1cd3ea0f29ba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 1e19bb32844dedc3d2d4d506e22f60bfac2b4057)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.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>
(cherry picked from commit 0aa5eec2332f0e0ae7f6adefebc274b02f8830c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20546: Display shelving location on checkin
Magnus Enger [Mon, 9 Apr 2018 10:39:23 +0000 (12:39 +0200)]
Bug 20546: Display shelving location on checkin

Currently, the sehlving location is not being displayed in the table
of checked in items on <intranet>/cgi-bin/koha/circ/returns.pl

To test:
- Make sure you have a couple of books with a value for shelving location (952$c)
- Check the books out
- Check the books in
- Verify nothing is displayed in the "Shelving location" column
- Apply this patch
- Check the books out and in again
- Verify the shelving location is now being displayed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e5220bc6a130e7fe8a31739b98993b203cfee2b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20685: Escape letter template content in textarea
Jonathan Druart [Thu, 3 May 2018 18:40:11 +0000 (15:40 -0300)]
Bug 20685: Escape letter template content in textarea

Test plan:
enter the following text into the Email template for 'HOLD_SLIP'
in Home › Tools › Notices & Slips › Modify notice

<div style='max-width: 4in;'>
<h3><<borrowers.surname>>, <<borrowers.firstname>></h3><br />
<<borrowers.streetnumber>> <<borrowers.address>><br />
<<borrowers.address2>><br />
<<borrowers.city>>, <<borrowers.state>> <<borrowers.zipcode>><br />
<br />
<br />
<img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5&notext=1">

Edit it again
Without this patch you will get:
<img src="/cgi-bin/koha/svc/barcode?barcode=<<borrowers.cardnumber>>&type=Industrial2of5¬ext=1">

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 305d3c36cb685fabce3ec4357ed769c25b12eb73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in...
Nick Clemens [Wed, 30 May 2018 13:07:39 +0000 (13:07 +0000)]
Bug 17561: (follow-up) Pass itemnumber on returns and correct itemnumber param in circulation

To test:
1 - Place two holds on a bib for a single patron
2 - Check in both items, confirm the screen message and slip are correct
3 - Checkout both items to another patron, confirm the screen message
and slip are correct

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>
(cherry picked from commit 183e10c13f6366b29dd79a7a9549f7d105d73f73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17561: (QA follow-up) Update existing unit tests
Kyle M Hall [Fri, 18 May 2018 12:00:03 +0000 (08:00 -0400)]
Bug 17561: (QA follow-up) Update existing unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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>
(cherry picked from commit 9c4040f37d705f2705fafc7a338695ddd76c1999)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17561: (QA follow-up) Simplify new ReserveSlip code
Kyle M Hall [Fri, 18 May 2018 11:20:06 +0000 (07:20 -0400)]
Bug 17561: (QA follow-up) Simplify new ReserveSlip code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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>
(cherry picked from commit a088aad171fda8deefca517517d35bee851f7ffc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 17561: ReserveSlip needs itemnumber for item level holds on same biblio
Benjamin Rokseth [Thu, 15 Mar 2018 11:57:37 +0000 (12:57 +0100)]
Bug 17561: ReserveSlip needs itemnumber for item level holds on same biblio

This patch fixes a regression after bug 14695.
This patch adds itemnumber and barcode as optional params in ReserveSlip used
by hold-transfer-slip.pl to generate HOLD_SLIP. This is for ReserveSlip to be
able to generate correct slips when items in multi-item holds are checked in.

Test plan:

1) activate a circulation rule with multi-item holds
2) Place two holds on same biblio for patron
3) for debugging, either use browser console to observe POST request and responses
   or use info from reserves, e.g. reserve_id in the HOLD_SLIP
4) checkin two items from same biblio on pickup branch
5) note that both holds are effectuated, but reserve_id is the same on both slips
6) also note that there is no itemnumber or barcode in the requests from returns.pl
7) Apply this patch
8) repeat 2-4
9) note that reserve_id is now different on the two slips

and/or:
Run tests:
  t/db_dependent/Reserves/ReserveSlip.t

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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>
(cherry picked from commit a2b9db00cf468b1712263879f6afeddb3553bf61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20861: Correct EDI permissions on EDI messsages
Katrin Fischer [Sun, 3 Jun 2018 08:09:23 +0000 (10:09 +0200)]
Bug 20861: Correct EDI permissions on EDI messsages

The permission for EDI is edi_manage, but 2 pages asked
for manage_edi, allowing users not to access those.

To test:
- Add edi_manage to your permissions
- Try to access the EDIFACT messages from the
  acq start page
- Verify it doesn't work
- Apply patch and try again
- You should be able to access the page now
- Try to access the other page directly (if you don't
  have EDI data):
  /cgi-bin/koha/acqui/edimsg.pl
- Verify you can access the page and don't get a
  permission error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7883b19de5f24551b36bf29133b04bc71ad4d56a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20763: Remove unecessary Koha::Patron fetch
Jonathan Druart [Mon, 28 May 2018 19:36:54 +0000 (16:36 -0300)]
Bug 20763: Remove unecessary Koha::Patron fetch

If $borrowernumber is not set, there is no userenv.
So let's pick the library code set in the userenv instead of fetching
the Koha::Patron->branchcode from DB

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
(cherry picked from commit 7e025fde1ae976cb12d4593b33579e12f5b284ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl...
Kyle M Hall [Mon, 14 May 2018 12:45:00 +0000 (08:45 -0400)]
Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in

Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error".

Test Plan:
1) Enable AllowPurchaseSuggestionBranchChoice
2) Enable AnonSuggestions
3) In the OPAC, perform a search that will have no results,
   click the "Make a purchase suggestion" link.
4) Note the error
5) Apply this patch
6) Reload the page
7) The page should load now!

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@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>
(cherry picked from commit e3cc49a61b13ff863262da6a397eb49a3045b14a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20798: Client side validation for for fund selection prevents adding only some...
Kyle M Hall [Mon, 21 May 2018 18:56:58 +0000 (14:56 -0400)]
Bug 20798: Client side validation for for fund selection prevents adding only some records to a basket

Bug 19453 "fixed" the fund validation that never actually worked. This validation should be removed altogether instead. It is overly simplistic and simply checks to see if each record in the batch has a fund selected regardless of whether that record will be imported or not.

In addition, the code completely ignores items generated by MarcItemFieldsToOrder such that even if items on that page have a fund selected, the javascript forces the librarian to make a selection from the left-hand fund pulldown even though it will not be used.

Considering this bad validation is basically 'new' as it never worked before, the most sensible course of action would be to 'undo' the change and remove the validation.

Test Plan:
1) Add records to a basket from an import batch
2) Select only some of those items in the batch
3) Note Koha will not let you import them unless you set funds for *all*
   records in the batch
4) Apply this patch
5) Note Koha no longer forces a budget to be selected in the pulldown

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=20789
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c5dc6aeae728078ca76e88f8af8693772006d842)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20696: Fix a few ugly "eq undef" comparisons in Search.pm
Marcel de Rooy [Wed, 2 May 2018 14:13:20 +0000 (16:13 +0200)]
Bug 20696: Fix a few ugly "eq undef" comparisons in Search.pm

Comparisons like $a eq undef should normally raise a warning like:
    Use of uninitialized value in string eq at ...
But unfortunately we still suppress warnings here and there.

Test plan:
[1] Just read this patch and confirm the small changes.
[2] Git grep on "eq undef" and do not find other occurrences.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Passes test plan and QA tools. Searching works correctly.

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>
(cherry picked from commit 66f5b793ed8e52372466122263cac0ddd84dea63)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20781: Set a minimum enrollemnt period 'in months' of 1
Nick Clemens [Fri, 18 May 2018 14:01:09 +0000 (14:01 +0000)]
Bug 20781: Set a minimum enrollemnt period 'in months' of 1

To test:
 1 - Browse to Admin->Patron Categories
 2 - Click '+ New category'
 3 - Enter data as required, however, enter 0 in 'Enrolment period' ->
'in months'
 4 - Save
 5 - View the list of categories, the new category has 'Enrolment period'
= 'until'
 6 - Create a patron in this category, note their dateexipry is
'0000-00-00'
 7 - Search for them
 8 - internal server error
 9 - Delete that patron
10 - Apply patch
11 - Edit the category, note you cannot save with 0 months
12 - Set 1 month and save
13 - Create a patron in this cateogry
14 - Note they have a valid dateexpiry
15 - Search for them
16 - All works
17 - Create a new category and verify you cannot add with 0 months

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>
(cherry picked from commit 59989e7be4e4c697b0ef316eab53b6450f5edb58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20191: (QA follow-up) Require Jessie's Test::MockTime
Tomas Cohen Arazi [Thu, 5 Apr 2018 13:06:37 +0000 (10:06 -0300)]
Bug 20191: (QA follow-up) Require Jessie's Test::MockTime

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit aaea46594215c88b4459cd882f1d869faeb2e2d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20191: Use Test::MockTime to hold time still
Mark Tompsett [Thu, 5 Apr 2018 01:31:38 +0000 (01:31 +0000)]
Bug 20191: Use Test::MockTime to hold time still

The problem is the calls to HTTP::OAI::Header, etc.
may reference gmtime which is continually changing by
the second. By forcing time to lock for all the tests,
except the last one, we can be assured things should
not fail.

TEST PLAN
---------
install libtest-mocktime-perl
apply the patch
restart_all
in kshell, prove t/db_dependent/OAI/Server.t
run koha qa test tools

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b76ad51b9d45d67746bddf27a9376e810c1b2d1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20191: Use find with unique key combination
Jonathan Druart [Fri, 16 Feb 2018 15:12:00 +0000 (12:12 -0300)]
Bug 20191: Use find with unique key combination

To prevent unexpected issues later.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 04005f2ea12c270f2895738eb434e5292218b789)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20191: Make OAI/Server.t tests use timestamps from the DB
Tomas Cohen Arazi [Thu, 15 Feb 2018 17:14:18 +0000 (14:14 -0300)]
Bug 20191: Make OAI/Server.t tests use timestamps from the DB

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2f90cd2be0affbdd2e2bc0c2223bfcf0cf65a13a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20767: Display a stack trace when a method is not covered by tests
Jonathan Druart [Mon, 14 May 2018 17:04:01 +0000 (14:04 -0300)]
Bug 20767: Display a stack trace when a method is not covered by tests

When a method is not allowed yet (not covered by tests), developers get
an error the is not really useful: "The method XXX is not covered by
tests!"
It would be more useful to have a stack trace in order to know where
this error come from.

Test plan:
Modify some code to display this stack trace and confirm it makes sense
to have it, i.e. it will make debug easier

Signed-off-by: Mark Tompsett <mtompset@hotmail.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>
(cherry picked from commit b9dffc169ddb7a3a32a071c4a004420814fa3a3f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 3886: Fix mismatch of required permissions for printing slips
Katrin Fischer [Wed, 16 May 2018 00:45:02 +0000 (02:45 +0200)]
Bug 3886: Fix mismatch of required permissions for printing slips

- Print summary (summary-print.pl)
- Print quick slip (printslip.pl)
- Print slip (printslip.pl)
- Print overdues (print_overdues.pl)

Perl scripts all require circulate_remaining_permissions, while
in the template we were checking for edit_borrowers.

Now the print pull down will only be visible if the patron has
circulate or circulate_remaining_permissions.

To test:
- Verify that printing the listed slips works for staff users
  with either circulate or circulate_remaining_permissions
  and without edit_borrowers.

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>
(cherry picked from commit 82908dc5bfa387742e2130330fdf1664b9d69c88)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20752: Fix capitalization on the files tab for patron files
Katrin Fischer [Thu, 10 May 2018 17:54:38 +0000 (17:54 +0000)]
Bug 20752: Fix capitalization on the files tab for patron files

- Activate EnableBorrowerFiles
- Go to any patron account in staff
- Go to the files tab
- Check that strings on the page ar all properly capitalized
  - button
  - legend on section

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>
(cherry picked from commit 7fd76164079c0a791bbbe06640d339e87f99b0cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20791: Correct capitalization on 'Notices & slips' page
Katrin Fischer [Fri, 18 May 2018 05:39:19 +0000 (05:39 +0000)]
Bug 20791: Correct capitalization on 'Notices & slips' page

- Standardizes spelling to 'Notices & slips'

Signed-off-by: Mark Tompsett <mtompset@hotmail.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>
(cherry picked from commit 96ce61f54dfa1bf6f6355077fc665268ac69acdf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20827: Display Fund's owner name when selected
Jonathan Druart [Mon, 28 May 2018 14:40:20 +0000 (11:40 -0300)]
Bug 20827: Display Fund's owner name when selected

When a fund is created or edited and does not have a owner yet, the
name of the patron will not be displayed when selected.

The HTML element the JS code expects is not present in the DOM.

Test plan:
- Create a fund, set a owner
- remove the owner, edit, etc.
- Save
- Edit again
Make sure it works as expected.

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>
(cherry picked from commit dc396756a050bf3fe07bb3141df6535a27fd9afb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20652: Fix result sorting after search on limit only
Jonathan Druart [Tue, 24 Apr 2018 18:38:41 +0000 (15:38 -0300)]
Bug 20652: Fix result sorting after search on limit only

1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f4f2c1fd8e653b511d94e8b209169c898a2a56b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20343: Put translatable strings in strings.tt
Julian Maurice [Wed, 18 Apr 2018 13:20:02 +0000 (15:20 +0200)]
Bug 20343: Put translatable strings in strings.tt

Also add a CSS class on <details> for easier styling and change the
list style so it take less space on screen

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 618ccd243ea9bdd2daa115415bafb5a4c864333b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20343: Show number of checkouts by itemtype in circulation.pl
Julian Maurice [Tue, 6 Mar 2018 13:47:46 +0000 (14:47 +0100)]
Bug 20343: Show number of checkouts by itemtype in circulation.pl

It is sometimes useful to have the number of checkouts grouped by
itemtype (to see if we're approaching the maximum number of checkouts
allowed for instance).
This patch adds this information above the checkouts table, in
circ/circulation.pl

Test plan:
1. Check out some items with various item types to a patron
2. In circ/circulation.pl, click on 'Show checkouts' button to display
   the table
3. Notice the line "Number of checkouts by item type" above the table,
   click on it
4. See that the list of item types is displayed with a count in front of
   each one
5. Compare the numbers to the checkouts in the table and verify that the
   numbers are correct

Signed-off-by: claude <claude.brayer@cea.fr>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 67d905d49f2871c884dc868bd1b50517624dcdbf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 18799: XSLTresultsdisplay hides the icons
Owen Leonard [Thu, 15 Jun 2017 12:32:43 +0000 (12:32 +0000)]
Bug 18799: XSLTresultsdisplay hides the icons

If item-level_itypes is turned off and XSLTResultsDisplay is turned on,
biblio-level itemtype images are not shown in staff client search
results. This patch corrects the problem.

This patch also adds some markup and CSS to the itemtype image to make
it look a litte cleaner and work better in result sets in which some
titles have images and some don't.

To test, apply the patch and view the staff client search results page
with various settings:

- XSLT turned on and off
- item-level_itypes turned on and off
- noItemTypeImages turned on and off

Confirm that item type images are shown or not shown correctly according
to each setting.

The difference between this patch and the other patch currently on this
bug is that this patch continues the practice of hiding biblio-level
itemtype information when item-level_itypes is ON.

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3c5843b1564cc2f1cab2c6bb8be7556b51730631)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20722: Display search results when searching only by ITEMTYPECAT
Jonathan Druart [Mon, 7 May 2018 18:04:33 +0000 (15:04 -0300)]
Bug 20722: Display search results when searching only by ITEMTYPECAT

- Create an entry for the ITEMTYPECAT authorised value category.
  Make sure to fill in the OPAC description.
- Go to administration > itemtypes and add the new category to 2 item types.
- Go to the OPAC and check that the advanced search shows your new itemtype
  group instead of the individual itemtypes.
- Check the checkbox and Search.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4200ffb720f1864a6ee02c071dc5aa09ee258f42)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
6 years agoBug 20701: (17.11 follow-up) Move csrf token after checkauth and use v17.11.06
Nick Clemens [Wed, 23 May 2018 10:37:35 +0000 (10:37 +0000)]
Bug 20701: (17.11 follow-up) Move csrf token after checkauth and use
scalar

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoUpdate release notes for 17.11.06 release
Nick Clemens [Tue, 22 May 2018 12:06:47 +0000 (12:06 +0000)]
Update release notes for 17.11.06 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20730: Move the authentication block before doing anything
Jonathan Druart [Tue, 8 May 2018 17:27:38 +0000 (14:27 -0300)]
Bug 20730: Move the authentication block before doing anything

No need to add more information here, it's self-explanatory...

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20701: Add csrf protection to mancredit.pl
Jonathan Druart [Thu, 3 May 2018 12:09:19 +0000 (09:09 -0300)]
Bug 20701: Add csrf protection to mancredit.pl

Works OK.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20701: Add csrf protection to maninvoice.pl
Nick Clemens [Thu, 3 May 2018 11:52:24 +0000 (11:52 +0000)]
Bug 20701: Add csrf protection to maninvoice.pl

TO test:
1 - Be signed in to Koha
2 - Add a manual invoice to an account, works fine
3 - Now do it via url: http://localhost:8081/cgi-bin/koha/members/maninvoice.pl?borrowernumber=5&type=test&amount=5&add=Save
4 - Apply patches
5 - Test that everything continues to work as expected (but more securely)
6 - Try adding a new invoice via URL
7 - Should get 'internal server error' and wrong csrf token in logs

Works OK.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoIncrement version for 17.11.06 release
Nick Clemens [Tue, 22 May 2018 11:52:58 +0000 (07:52 -0400)]
Increment version for 17.11.06 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoTranslation updates for Koha 17.11.06
Koha translators [Tue, 22 May 2018 11:37:22 +0000 (08:37 -0300)]
Translation updates for Koha 17.11.06

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11943: Add unit test for double accepts
Marcel de Rooy [Fri, 4 May 2018 07:54:30 +0000 (09:54 +0200)]
Bug 11943: Add unit test for double accepts

Test plan:
Run t/db_dependent/Virtualshelves.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 11943: Prevent double accepts in Koha::Virtualshelfshare
Marcel de Rooy [Fri, 4 May 2018 07:34:02 +0000 (09:34 +0200)]
Bug 11943: Prevent double accepts in Koha::Virtualshelfshare

This 'bug' existed long enough now to finally remove it ;)

We do so by deleting the invitation if the borrower already has a share
on this list. Actually not that hard.

We still need: a unit test and a db revision.

Test plan:
[1] Share a list. Let user B accept.
[2] Without this patch: Share again and let B accept again.
[3] Verify that you have two shares for this list in virtualshelfshares.
[4] With this patch: Share another list, let B accept.
[5] Share this other list again, let B accept again.
[6] Verify that virtualshelfshares does not contain double entries now.
    (Note: This pertains to the second list only.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20687: (follow-up) Look for invitekey in show_accept and fix error codes
Marcel de Rooy [Fri, 4 May 2018 06:10:46 +0000 (08:10 +0200)]
Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes

We should check the invitekey in show_accept by passing it along in the
search call.
On the way I fixed some error checking: if the list number is invalid, or
the list is public or you are the owner, or if the key is not found, we
should set the right error code; the template contains those messages.

Test plan:
[1] Share a list and accept a correct invitation with another user.
[2] Try to accept some invalid proposals: wrong key, wrong list.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested invalid key, wrong list, owner, public list, expiry.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20687: Check all share keys for a given list
Nick Clemens [Tue, 1 May 2018 13:47:18 +0000 (13:47 +0000)]
Bug 20687: Check all share keys for a given list

This patch gets all the shares for a list and iterates through to find
the correct one when accepting from a link

To test:
1 - Create a private list in the opac
2 - Invite 2 patrons to the list
3 - Try to accept from the patron you first shared to
4 - You will get a failure message about expiration of the link
5 - Apply patch
6 - Now try to accept the first share
7 - It works! Success!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19030: Preserve link between order and subscription when editing an order
Jonathan Druart [Mon, 16 Apr 2018 20:41:42 +0000 (17:41 -0300)]
Bug 19030: Preserve link between order and subscription when editing an order

The aqorders.subscriptionid info is not sent to the template when the
order is edited. Which means we lose this link.

Test plan:
Create an order from a subscription
Edit the order
=> Without this patch, the aqorders.subscriptionid value is set to NULL
and items are created when receiving serial.

=> With this patch applied the link is preserved and expected behaviors
are preserved during all the acquisition workflow

You should also try and create several orders from the same subscription

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20556: Marking ILL request as complete..
Andrew Isherwood [Tue, 10 Apr 2018 15:50:56 +0000 (16:50 +0100)]
Bug 20556: Marking ILL request as complete..

When marking a request as complete, the status is updated internally
then the user to redirected to the view of the request.

Although the redirect header is sent, there is no exit to indicate that
the program flow should stop. As a result, an attempt is made to render
the template, which fails.

This patch simply adds the missing exit.

TEST PLAN
---------

- Create an ILL request
- "Manage request" > "Confirm request"
- "Mark completed"
- TEST: Ensure that no error is written to the error log upon clicking
"Mark completed"

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20562: Fix Returns.t test
Jonathan Druart [Thu, 19 Apr 2018 19:21:57 +0000 (16:21 -0300)]
Bug 20562: Fix Returns.t test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20562: Pass the Koha::Checkout object to AddIssuingCharge
Jonathan Druart [Mon, 16 Apr 2018 16:48:54 +0000 (13:48 -0300)]
Bug 20562: Pass the Koha::Checkout object to AddIssuingCharge

We do not need to pass all those parameters, just the checkout object is
enough.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20562: issue_id is not stored in accountlines for rental fees
Kyle M Hall [Sun, 8 Apr 2018 07:11:11 +0000 (07:11 +0000)]
Bug 20562: issue_id is not stored in accountlines for rental fees

Test Plan:
1) Apply this patch
2) Assign a charge to an item type
3) Checkout an item of that type to a patron
4) View the accountlines table for that patron
SELECT * FROM accountlines WHERE accounttype='Rent' and borrowernumber=##;
5) Note there is an issue_id

Or

1) Apply this patch
2) prove t/db_dependent/Circulation/issue.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>