]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 16441: Do not use a package variable to cache C4::Letters::getletter
Jonathan Druart [Wed, 4 May 2016 18:43:43 +0000 (19:43 +0100)]
Bug 16441: Do not use a package variable to cache C4::Letters::getletter

C4::Letters::getletter use a package variable (%letter) to cache letter
returned by the subroutine.
I have not found any direct issues caused by that but it is safer to
remove it.
It won't be a big deal to hit the DBMS to get a valid letter when
needed.

No test plan here, just confirm that the changes make sense.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that performance loss is just a millisecond or so per
subsequent call of getletter.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c4f388f64966f2202e9f3e3c16dad5cef3dbe0ac)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c63dccba27842ce92569625a03df55085bf5681a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16443: [QA Follow-up] Add two tests for get_fields
Marcel de Rooy [Fri, 10 Jun 2016 09:49:45 +0000 (11:49 +0200)]
Bug 16443: [QA Follow-up] Add two tests for get_fields

Adds t/db_dependent/Members/Statistics.t.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30cf9ee277481b54ed75e500c38f328f2d82b831)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 03d51281b079c379a2fba0caf8a9df8ec9c6d500)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16443: Make C4::Members::Statistics plack safe
Jonathan Druart [Wed, 4 May 2016 19:08:53 +0000 (20:08 +0100)]
Bug 16443: Make C4::Members::Statistics plack safe

If the prefs is updated, the fields won't be.
To make sure we already fetch updated values, we should remove the
package variable and define it in the subroutine.

There is not test plan, just make sure the changes are consistent.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 29e402d398f567e2526c89695384bce7f4e4b737)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 93ffd58fe32dd4e27056f5cebf18b975f3d0624b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16455: Remove the "Too late to run INIT block" from C4::Tags
Jonathan Druart [Thu, 5 May 2016 15:58:06 +0000 (16:58 +0100)]
Bug 16455: Remove the "Too late to run INIT block" from C4::Tags

The pref TagsExternalDictionary is used to tell Lingua::Ispell to use an
other dictionary, different from the default one (/usr/bin/ispell).

To do so we need to set $Lingua::Ispell::path to the expected path.
It's currently done in the INIT block.

If you try to use C4::Tags, you will get the famous "Too late to run
INIT block at C4/Tags.pm line 74." warning. Plack use the INIT block to
load functions at run time, when we are using C4::Tags when hitting a pl
script, the compilation phase is finished and it's "too late to run INIT
block" from C4::Tags.

I do not really know if it has an impact on the behavior of
Lingua::Ispell (i.e. is the path redefined?), but I know that this INIT
block is not executed when we want.

Test plan:
under Plack,
- hit /cgi-bin/koha/opac-search.pl and confirm that the warning does no
longer appears
- Use another dictionnary (??), fill TagsExternalDictionary with its
  path and confirm that it is used by the tags approval system

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7d916c380a03904c47035f189d1ee666f00d9a11)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6ff159e214a2ebf904ff7f1b77f0f75162f8afe8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16508: Updating a syspref requires parameters_remaining_permissions
Jonathan Druart [Tue, 17 May 2016 13:38:04 +0000 (14:38 +0100)]
Bug 16508: Updating a syspref requires parameters_remaining_permissions

And not all of parameters flags.

Test plan:
1/ Create a staff user.
2/ Go to details, select more->set permissions.
3/ Set catalogue, Manage Koha system settings (Administration panel),
manage circulation rules, and Remaining system parameters permissions.
4/ Log in as the new staff user, go to administration > system
preferences. Change a syspref and save it... it will save correctly.
5/ Log back in as superlibrarian
6/ On the 'set permissions' screen, un-check 'manage circulation rules'
and save.
7/ Log back in to the new staff user, and try to change the same
systemprefrence and save.

Followed test plan, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f2fe433cf9afce98957826bf2ade457557fe4eff)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 259fe9947b73023a22aceda2b7f7ad357500884f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl
Jonathan Druart [Fri, 13 May 2016 19:46:42 +0000 (20:46 +0100)]
Bug 16518: Fix Plack variable scoping problem in opac-addbybiblionumber.pl

The script opac/opac-addbybiblionumber.pl is not plack safe because the
variable @biblios is declared with our and is not assigned to an empty
array (so not reset).

The issue:
When trying to add items to a list (virtualshelf), the biblionumbers are
added to the @biblios variable and the list is not reset between each
run.

Test plan:
Check from records from the result list and add them
to a list.
Cancel or save and re-add them (or others) to a list (same or
different).
=> Without this patch, the list of records will never stop growing, the
previous items added are still listed when adding new ones.
=> With this patch, the behavior is the one expected.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ab1beed06f249d1e7d0be5bb1b584e62f5b48783)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 2729f038c34b5c4f0b713738c9bf4a94068f1b43)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15641 - Typo in explanation for MembershipExpiryDaysNotice
Aliki Pavlidou [Sat, 4 Jun 2016 12:10:38 +0000 (12:10 +0000)]
Bug 15641 - Typo in explanation for MembershipExpiryDaysNotice

There's an extra period after the word "in" in the MembershipExpiryDaysNotice
sys "Send an account expiration notice when a patron's card will expire in.
[value box

Bug fixed!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6b7f4a3a9ec18b550d011a7eee9e7108b7042059)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e242625721b0dcd68cd7b3408ef9da5d367a878d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16537 - Overdue and Status triggers grammar
Rocio Dressler [Sat, 4 Jun 2016 09:24:45 +0000 (02:24 -0700)]
Bug 16537 - Overdue and Status triggers grammar

Test plan:

1) Go to the staff client
2) Click on Tools - Overdue notice/status triggers
3) Confirm that the first sentence reads "a" checkout rather than "an" checkout

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a589879f495aeb25200119cb4f1bf76c28dce660)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 020d755ed061cfc94ca12eace6fae7388cc89e3e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16444: Make C4::Tags plack safe
Jonathan Druart [Wed, 4 May 2016 19:20:51 +0000 (20:20 +0100)]
Bug 16444: Make C4::Tags plack safe

C4::Tags use a package variable to cache the pref
TagsExternalDictionary, it's not needed and not safe.

There is not test plan, just make sure the changes are consistent.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fff754a7fc7a99dad6a35129b8a7dd170684f2bf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 97a3f03970e1aa8d3eba5e5502f092202e43349b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16458: Update library when a guarantor is set
Jonathan Druart [Wed, 11 May 2016 11:00:01 +0000 (12:00 +0100)]
Bug 16458: Update library when a guarantor is set

If you edit a patron from the Edit link of the patron information block
(step 1 of the memberentry script), the branchcode is not displayed. If
you set a guarantor to a child from this form, a JavaScript error will
be raised:
  JavaScript error form.branchcode is undefined

It happens because there is the branchcode is not displayed and there is
no element with a branchcode name.

To avoid this issue, a branchcode hidden input is added to the form and
it will be updated when a guarantor is selected (same behavior as when
you edit a patron using the complete form).

Test plan:
Edit a patron using the Edit link of the patron info block (not the Edit
button in the toolbar)
Set a guarantor
=> Notice that the branchcode of the patron has been updated with the
branchcode of the guarantor

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fc35a5099f613c08d12be1d67fd027d4a5eaf99c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b7a0322258ad534ea8e5af34cb0581b0b5f174e8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16442: Make C4::Ris plack safe
Jonathan Druart [Wed, 4 May 2016 18:53:46 +0000 (19:53 +0100)]
Bug 16442: Make C4::Ris plack safe

C4::Ris incorrectly uses 4 package variables:
- $utf: not used, can be removed
- $intype: set to marcflavour once, but later it assumes that it is
  usmarc if not defined
- $marcprint: always 0, so set it to 0
- $protoyear: only used in 1 subroutine, let's define it at this
  level

Test plan:
Just make sure the RIS export works as before this patch

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 87b181c6d40e7a811fee511648ddd3cb7d44c4e4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a987ff3ba92e1558e11a63335895749b5efd1689)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16642 - Fix capitalisation for upload patron image
Claire Gravely [Fri, 3 Jun 2016 08:38:25 +0000 (10:38 +0200)]
Bug 16642 - Fix capitalisation for upload patron image

To fix capitalisation on the staff interface when patronimages is turned on.

Test plan:
1. In staff interface. Turn on patronimages sys preference.
2. Go to a patron without an image and check that the "Upload
 patron image" box heading now has correct capitalisation.
3. Go to a patron with an image already uploaded and check the
 "Manage patron image" box heading has correct capitalisation.

Signed-off-by: Sofia <szapoun@lib.auth.gr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 78b2fde34831a4840f6b89df054a5307f1ead54b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9a2c6bfde243f0fe41112fe1b651273ab091c901)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16565: Drop additional_fields and additional_field_values before creating them
Jonathan Druart [Mon, 23 May 2016 11:19:46 +0000 (12:19 +0100)]
Bug 16565: Drop additional_fields and additional_field_values before creating them

These 2 tables should be dropped before trying to create them

Test plan:
From the SQL CLI, source the kohastructure.sql file
source it again
=> Without this patch you get 2 warnings
ERROR 1050 (42S01) at line 3580 in file:
'installer/data/mysql/kohastructure.sql': Table
'additional_fields' already exi
sts
ERROR 1050 (42S01) at line 3596 in file:
'installer/data/mysql/kohastructure.sql': Table
'additional_field_values' alrea
dy exists

=> With this patch, you won't get them

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a01cd77e19f810bf61c8d26ebb97f7c49f1d1f32)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b49adab4a1c4bb08714371223572caf35460f0f4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16582 t/Price.t test should pass if Test::DBIx::Class is not available
Mark Tompsett [Wed, 25 May 2016 02:31:15 +0000 (22:31 -0400)]
Bug 16582 t/Price.t test should pass if Test::DBIx::Class is not available

TEST PLAN
---------
1) prove t/Prices.t
   -- failure
2) apply patch
3) prove t/Prices.t
   -- nicely skipped when Test::DBIx::Class is not available.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 5ba5f9e0c5958b518bd648f08146329e355f3a7e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 65232361231f5006f25cc354e24b38b07f359d61)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16610 - Regression in SIP2 user password handling
Kyle M Hall [Fri, 27 May 2016 12:42:17 +0000 (12:42 +0000)]
Bug 16610 - Regression in SIP2 user password handling

Previous to bug 14507, SIP2 only did internal authentication. A change
to the way we check empty passwords has caused any empty password to
send back a CQ of Y. Previous to that patch set, a CQ of Y would only be
sent back of the patron password column was NULL. Now, an empty AD field
*always* returns a CQ of Y.

Test Plan:
1) Send a patron information request with an empty AD field
   Note: You must send the AD field or you won't get back a CQ field
2) Note you get back a CQ of Y
3) Apply this patch
4) Repeat step 1
5) Note you now get back a CQ of N

Signed-off-by: Trent Roby <troby@bclib.info>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 71f0370ddde0d8b8e2a666a091081186fb6531e8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 66c9ef12c16efeebf78e3a98be7b2ccc42d14e7a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16504: [QA Follow-up] Make koha-qa happy with two newlines
Marcel de Rooy [Tue, 31 May 2016 12:16:07 +0000 (14:16 +0200)]
Bug 16504: [QA Follow-up] Make koha-qa happy with two newlines

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 567a1a9021aaea3bf42b19f493b79f682ed9042b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5712275a4645d4d899815120fe79e730edf1034e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16504: (follow-up for bug 15163) Do not remove attributes of other patrons
Jonathan Druart [Fri, 13 May 2016 13:43:52 +0000 (14:43 +0100)]
Bug 16504: (follow-up for bug 15163) Do not remove attributes of other patrons

Simple patch for a silly error, this single line is going to fix a
critical bug.
If a patron attribute is limited to a library, all the values for that attributes
for every patrons will be deleted.

Test plan:
Create a patron attribute limited to a library
Set the the attribute for a patron
Set the the attribute for another patron
=> Without this patch applied, the attribute's value for the first
patron is deleted
=> With this patch applied, the 2 values exist in the DB after the
second edition

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit da94410ab5022c3bd97fba1878673149802db584)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 247bd55876a4e930934419070fc926a656a0d9d7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16504: Add regression tests
Jonathan Druart [Fri, 13 May 2016 13:42:52 +0000 (14:42 +0100)]
Bug 16504: Add regression tests

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 72bd06e3a88f62fcfe8710773091447ebafebcb3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5949faae071c317c029c9c89320c52d73cd7a362)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16511: Making contracts actions buttons
Aleisha [Fri, 13 May 2016 00:46:40 +0000 (00:46 +0000)]
Bug 16511: Making contracts actions buttons

To test:
1) Go to Acqui -> find a vendor
2) On Vendor details page (supplier.pl) confirm that Contracts table now
   has one column called Actions
3) Confirm that Edit and Delete show as buttons
4) Confirm that buttons don't wrap on a narrower browser
5) Click Contracts tab
6) Confirm Actions column, Edit and Delete buttons, and button's don't
   wrap

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 23c8dc0e6384779c0eaf8441d598b60ac6aea46e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 92c08a6a4e177622a4513fa34c81dfcbec20ec57)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16525: Have cancel button when adding new aq budget
Aleisha [Mon, 16 May 2016 01:10:43 +0000 (01:10 +0000)]
Bug 16525: Have cancel button when adding new aq budget

At the moment you only see the cancel button on the form if editing an
existing budget. This patch adds a cancel button to the form which adds
a budget. Also changes the wording of the save button from 'Save
changes' to just 'Save' so it makes more sense when adding a new budget

To test:
1) Go to Admin -> Budgets -> New budget
2) Notice 'Save changes' button and no cancel
3) Apply patch and refresh page
4) Notice 'Save' button and 'cancel' link
5) Click 'cancel' - should be taken to Budgets administration page
6) Edit an existing budget
7) Click 'cancel' - should be taken to the funds page for that budget

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Sabine Liebmann <Liebmann@dipf.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Still an issue: If edit a budget fron aqbudgets.pl, then cancel, you get
aqbudgets.pl?budget_period_id=XX. But existed before this patch.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c4f17a6eb3e5688b1d1f3c4b578f17ae80e46f8f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0c4661110c467c8d11631cc627395acef941c9c9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16001 - Use standard message dialog when there are no cities to list
Owen Leonard [Mon, 7 Mar 2016 17:12:40 +0000 (12:12 -0500)]
Bug 16001 - Use standard message dialog when there are no cities to list

If there are no existing cities in Administration -> Cities and Towns,
the message saying so should be in the standard message dialog.

Another minor change: Edit the message to say "There are no cities
defined," which I think reads better in English.

To test you must have no cities and towns defined.

Apply this patch and go to Administration -> Cities and Towns. You
should see a message displayed in a standard "message" style dialog.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Better view, no errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 89b41ede653227c5b4f777d6a4b30422ab473153)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 300cfc1ac8ae979b737b584e303823059d34680e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16200: Update DB rev (3.22.07.001)
Brendan Gallagher [Tue, 31 May 2016 08:56:42 +0000 (08:56 +0000)]
Bug 16200: Update DB rev (3.22.07.001)

8 years agoBug 16200: Convert all existing expired holds accounttype to HE
Lari Taskula [Tue, 17 May 2016 11:44:45 +0000 (14:44 +0300)]
Bug 16200: Convert all existing expired holds accounttype to HE

Before Bug 16200 expired holds have used accounttype F which is also used by
other type of fines. This patch updates all existing expired holds to new
accounttype HE (Hold Expired).

To test:
-1. Make sure you translated the string in previous patch of this buug
1. Find a Patron with "Hold waiting too long" fines and go to his Fines tab
2. Change Koha's language to some other than English
3. Observe that "Hold waiting too long" is still in English
4. Apply patch and run database update
5. Go back to Patron's Fines tab
6. Observe that "Hold waiting too long" is now translated

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 09de19c427c1e99d7e921210ed39cb6a19737317)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d80368370258432aab4d4171b886af26442d08c1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16200: Make 'Hold waiting too long' translatable and give it an unique accounttype
Lari Taskula [Tue, 17 May 2016 11:33:57 +0000 (14:33 +0300)]
Bug 16200: Make 'Hold waiting too long' translatable and give it an unique accounttype

Holds that have expired have been untranslatable in Patron's Fines-tab. Also, they are
mixed with other type of fines with accounttype "F". This patch gives expired holds an
own accounttype "HE" (Hold Expired) and modifies the boraccount to recognize this new
accounttype in order to make it translatable.

To test:
1. Make a hold and let it expire
2. Go to Patron's Fines tab
3. Change Koha's language to some other than English
4. Observe that there is a "Hold waiting too long" fine described in English
5. Apply patch
6. Make another hold and let it expire
7. Update translations
8. Find "Hold waiting too long" from your .po file
9. Translate it and install translations
10. Go back to Fines tab and observe that the new expired hold is translated

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 7163fcfeea382e1e042a47a76d384155e8c69bc0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 326616d2bce77b245e0d38eb3df659e821130645)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16617 - fix issues with debian/control
Robin Sheat [Wed, 25 May 2016 14:19:09 +0000 (16:19 +0200)]
Bug 16617 - fix issues with debian/control

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit e604538283ef3531aaa769dee70c83cdec942656)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8b9812fa83c110c446b58b6b1188d67d20011430)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16548 - All libraries selected on Tools -> Export Data screen
Owen Leonard [Wed, 18 May 2016 23:45:27 +0000 (19:45 -0400)]
Bug 16548 - All libraries selected on Tools -> Export Data screen

This patch adds "select all" and "select none" links to the display of
libraries in the export bibliographic records form.

Also modified: call number range and accession date fields have been
grouped in their own fieldsets in the hopes that this is more readable.
Page title and breadcrumbs have been corrected to read "Export data"
instead of "MARC export," matching menu items.

To test, apply the patch and go to Tools -> Export data.

- Test the select all/select none links and confirm that they work as
  expected.
- Confirm that the structural changes to the form look okay.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Post sign-off revision: Use the standard "Clear all" instead of "Select
none."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 06b9194cdd178f14347b8f9090657dbf5b712450)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a85be57e1ce1d2adde6b9ee3dba55f7c5f2e06ab)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16569 - Message box for "too many checked out" is empty if AllowTooManyOverride...
Kyle M Hall [Mon, 23 May 2016 14:28:10 +0000 (14:28 +0000)]
Bug 16569 - Message box for "too many checked out" is empty if AllowTooManyOverride is not enabled

If the limit for number of items checked out is reached, the message box
shows up but is empty.

Test Plan:
1) Disable AllowTooManyOverride
2) Check out items to a patron until the patron has reached the limit
   of checkouts he or she can have
3) Try to check out one more item
4) Note the empty message box
5) Apply this patch
6) Try to check out one more item again
7) Note the message is now visible

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit af43f91335b2258ea39b40247a1492ca41dafe2a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a47180eb3bc0ca26a018f68ffcc4d5635f6f7789)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16597: Fix XSS in shelves.pl
Jonathan Druart [Thu, 26 May 2016 10:07:47 +0000 (11:07 +0100)]
Bug 16597: Fix XSS in shelves.pl

Reported by
Alex Middleton at Dionach

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit fa1dd408ca7714aed406ff75d3c4c55545b97cf0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16597: Fix XSS in opac-shareshelf
Chris Cormack [Thu, 26 May 2016 09:33:33 +0000 (21:33 +1200)]
Bug 16597: Fix XSS in opac-shareshelf

To test
1/ Go to /cgi-bin/koha/opac-shareshelf.pl?op="><script>alert('XSS')</script>&shelfnumber=5
2/ Notice you see a js alert
3/ Apply patch
4/ It is gone

Reported by
Alex Middleton at Dionach

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c47c835672a8fcd8c7df79663443f01639fc7657)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16597: Fix XSS in opac-shelves.pl
Chris Cormack [Thu, 26 May 2016 09:06:18 +0000 (21:06 +1200)]
Bug 16597: Fix XSS in opac-shelves.pl

To test
1/ Hit /cgi-bin/koha/opac-shelves.pl?shelfnumber=5&category=1&op=edit_form&referer="><script>alert('XSS')</SCRIPT>
2/ Notice JS is executed
3/ Apply patch
4/ Notice it's fixed

This bug reported by

Alex Middleton at Dionach

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 344033c32490df3e396ed530dcbf250086483371)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16599: Fix other potentials XSS for shelfname
Jonathan Druart [Thu, 26 May 2016 11:08:30 +0000 (12:08 +0100)]
Bug 16599: Fix other potentials XSS for shelfname

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit bb4543f7db62836b048c632a0a184acb021286ad)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16599: Fix XSS in opac-shareshelf.pl
Jonathan Druart [Thu, 26 May 2016 11:03:55 +0000 (12:03 +0100)]
Bug 16599: Fix XSS in opac-shareshelf.pl

Test plan:
- Create a list with the name "<script>alert(1)</script>"
- On the shelf list, click on share
=> Without this patch you will see the JS alert
=> With this patch applied you won't see it

Reported by Kaybee at Dionach

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a44a930c076fceca0f7193f488e187d9849f89b6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16343: 7XX XSLT subfields displaying out of order
Hector Castro [Thu, 28 Apr 2016 19:34:13 +0000 (13:34 -0600)]
Bug 16343: 7XX XSLT subfields displaying out of order

This patch respect previous css classes
.authordates and .relatorcode but also include .titleportion

.authordates {display: none;}
.titleportion {display: none;}
.relatorcode {display: none;}

To test:
- Stage the two record attached with titles:
  - Surface & coatings technology.
  - Women crime writers.
- Reindex zebra (necessary to Opac and Itranet results)
- Leave empty the OPACUserCSS and IntranetUserCSS sysprefs
- Go to the new records in OPAC and Intranet detail page
- See the wrong display of dates
- Apply patch and refresh the page
- Test in OPACUserCSS and IntranetUserCSS the css stated before
- Play deleting or adding the classes
- Test with multiple records with 700 (with and without dates, etc;
  710 and 711)

NOTE: dates in 710 and 711 can be hidden with .titleportion class;
dates in this kind of heading go with another data for example:
Catholic Church. Plenary Council of Baltimore (2nd : 1866)
Patch rebased some typos fixed in comments

Signed-off-by: Dani Elder <danielle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0073a0c3f88276f6f5fac7b63ef6254cb8770e6b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16216: Circulation_Branch.t doesn't set itemtype for test data
Tomas Cohen Arazi [Wed, 6 Apr 2016 15:44:25 +0000 (12:44 -0300)]
Bug 16216: Circulation_Branch.t doesn't set itemtype for test data

This patch makes the tests create better data for them:
- Run
  $ prove t/db_dependent/Circulation_Branch.t
=> FAIL: Warnings raised
- Apply the patch
- Run
  $ prove t/db_dependent/Circulation_Branch.t
=> SUCCESS: No warnings raised
- Sign off

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Test pass successful

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 366e31f8c020080b9a0319abb7d2c02e10f42a40)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16454: Remove another occurrence in comment
Jonathan Druart [Mon, 16 May 2016 11:10:56 +0000 (12:10 +0100)]
Bug 16454: Remove another occurrence in comment

Note that few other occurrences exist in DB.

This patch also replaces a tab with 4 spaces.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 68280172e1446eaba07cf7ab5ac0135eff742b35)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16454: Use 'inventory' instead of 'inventory/stocktaking'
Aleisha [Thu, 12 May 2016 04:46:54 +0000 (04:46 +0000)]
Bug 16454: Use 'inventory' instead of 'inventory/stocktaking'

To test:
1) Go to the tools home page. Confirm it says 'Inventory' instead of
   'Inventory/stocktaking' in heading and in description
2) Click Inventory. Confirm heading now says 'Inventory' instead of
   'Inventory/stocktaking'
3) Confirm that it now says 'Inventory' instead of
   'Inventory/stocktaking' in the tools menu along the left of the page
4) Click Help in top right corner. Confirm help heading now says
   'Inventory' instead of 'Inventory/stocktaking'
5) Go to user account page, go to Set Permissions
6) Expand Tools option and confirm it says 'inventory' instead of
   'inventory (stocktaking)'

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5d3ea96e578fa4b0a143cc26330c7d4ff689ef4b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16385: Fix breadcrumbs when ordering from subscription
Katrin Fischer [Fri, 29 Apr 2016 00:39:15 +0000 (02:39 +0200)]
Bug 16385: Fix breadcrumbs when ordering from subscription

- Rephrase removing 'Shopping'
- Fix link to vendor

To test:
- Create a subscription for vendor X
- Create a baskest for vendor X
- Choose: order from subscription
- Check breadcrumbs:
  - Link to vendor works
  - 'Shopping' is gone, Basket remains

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b1c97f0ff6202728b2e75de2eddbc5dcd84c04ed)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15333: [QA Follow-up] Add few tests
Marcel de Rooy [Fri, 20 May 2016 08:14:28 +0000 (10:14 +0200)]
Bug 15333: [QA Follow-up] Add few tests

This report had no test plan and no unit tests.
Adding some lines to Holidays.t.
Added a trivial line move in Calendar.pm.

Test plan:
Run t/db_dependent/Holidays.t with and without cache.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with memcached, Cache::Memory and no cache (edit Cache.pm).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 73aa490029b4b536c86c3ac59e53f9e118c7c292)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15333: Use Koha::Cache to cache exception_holidays instead of a package variable
Jonathan Druart [Wed, 4 May 2016 19:35:39 +0000 (20:35 +0100)]
Bug 15333: Use Koha::Cache to cache exception_holidays instead of a package variable

On the same way as bug 14522, we should use Koha::Cache to cache
exception_holidays.
It's not safe to use a package variable if running under Plack.

There is not test plan, just make sure the changes make sense.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit cbd375fab76a89b75f3795c9ebafe434bf79c878)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13669: followup to add DBIx::RunSQL dependency
Bernardo Gonzalez Kriegel [Tue, 24 May 2016 13:37:01 +0000 (10:37 -0300)]
Bug 13669: followup to add DBIx::RunSQL dependency

Just that

To test:
1) run koha_perl_deps and check it show up

The module appears now on the About page.
Signed-off-by: Marc Véron <veron@veron.ch>
Ammended patch, only change is DBIx::RunSQL version,
now 0.14 :)

Module's author kindly accept to upgrade it, in particular
this makes Bug 16572 innecesary and is not needed to install
without problems.

Tested install on Ubuntu 14.04/Mysql 5.5.49, marc21 + all sample

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dadd11af22486903704444ba2f46697b611e1351)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoIncrement version for 3.22.7 release v3.22.07
Julian Maurice [Wed, 25 May 2016 10:31:06 +0000 (12:31 +0200)]
Increment version for 3.22.7 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoTranslation updates for Koha 3.22.7
Julian Maurice [Wed, 25 May 2016 11:40:42 +0000 (13:40 +0200)]
Translation updates for Koha 3.22.7

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoUpdate release notes for 3.22.7 release
Julian Maurice [Wed, 25 May 2016 10:48:55 +0000 (12:48 +0200)]
Update release notes for 3.22.7 release

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16499 [QA Followup] - Improve readability
Kyle M Hall [Mon, 23 May 2016 17:34:29 +0000 (17:34 +0000)]
Bug 16499 [QA Followup] - Improve readability

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 59c0d44792b0ce4f88c028be97a32a62fb4a8b36)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16499: Remove "Use of uninitialized value" warnings in circulation.pl
Jonathan Druart [Wed, 11 May 2016 14:05:59 +0000 (15:05 +0100)]
Bug 16499: Remove "Use of uninitialized value" warnings in circulation.pl

If you search for a patron in the circulation module, you get:

Use of uninitialized value $barcode in string eq at
/home/koha/src/circ/circulation.pl line 84.
Use of uninitialized value $restoreduedatespec in string eq at
/home/koha/src/circ/circulation.pl line 170.

Test plan:
- Search for a patron and confirm the warnings are not displayed anymore
- Make sure this patch does not introduce regression on bug 14015

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 208637165ee40b2fe7d103c787a1f4f93b55d49b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16550: Clean the tests
Jonathan Druart [Fri, 20 May 2016 16:32:30 +0000 (17:32 +0100)]
Bug 16550: Clean the tests

- replace ok with is
- remove diag
- replace $dbh->prepare->execute->fetchrow with $dbh->selectrow_array

And remove unecessary force to scalar context in pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 908fdb572ab90541ecf1700eb716eeb5c1399553)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16550: Add test to NewsChannels.t
Marc Véron [Fri, 20 May 2016 12:42:08 +0000 (14:42 +0200)]
Bug 16550: Add test to NewsChannels.t

To test: Run t/db_dependent/NewsChannels.t

Tests adding and retreiving a news item without expiration date.
This test should fail without patch for Bug 16550 and pass OK with patch.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 521bfb082732c00e33843ee44cbb8ff2a2c1d56d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16550: Can't set opac news expiration date to NULL, it reverts to today
Marc Véron [Fri, 20 May 2016 10:19:36 +0000 (12:19 +0200)]
Bug 16550: Can't set opac news expiration date to NULL, it reverts to today

This patch fixes an issue with the expiration dates for news always reverting to today if empty.

To test:
- Apply patch
- Go to Home > Tools > News
- Create a news item, do not set expiration date
- Verify that expiration date stays empty
- Edit this news item
- Do not set expiration date
- Verify that expiration date stays empty
- Do the same with expiration dates
- Verify that they are saved properly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b5acde6513eeb9805a3f34a3dc6102038b3cf4cc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16516: Define the showListsUpdate JS function at the OPAC
Jonathan Druart [Fri, 13 May 2016 18:21:47 +0000 (19:21 +0100)]
Bug 16516: Define the showListsUpdate JS function at the OPAC

Bug 12233 removes the declaration of the showListsUpdate JS function for
the OPAC.
It results in a JS error (ReferenceError: showListsUpdate is not
defined) when a user tries to add selected titles to a list if no title
is selected.

Test plan:
Launch a catalogue search
Select a list in the "Select titles to" dropdown list
=> Without this patch you will get the JS error
=> With this patch you will get a JS alert "No item was selected"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c7ca98c8d9a2647f422f6446239ec67c91261aa1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16484 - Virtualshelves: Using no XSLTResultsDisplay breaks content display in...
Nick Clemens [Tue, 10 May 2016 00:33:15 +0000 (20:33 -0400)]
Bug 16484 - Virtualshelves: Using no XSLTResultsDisplay breaks content display in intranet

To test:
1 - Create a list in staff client
2 - Set XSLTResultsDisplay to blank
3 - View list, titles don't display
4 - Apply patch
5 - View list, titles display
6 - Set XSLTResultsDisplay to default
7 - View list, titles display as before patch

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6c0e8feb79513598c3837b1a8f6a35dba18a786f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16478: Fix checkout history tabs - intranet
Jonathan Druart [Mon, 9 May 2016 16:59:52 +0000 (17:59 +0100)]
Bug 16478: Fix checkout history tabs - intranet

Test plan:
Same as before for the intranet.
And please retest the OPAC => I have changed the filter's values to
match OPAC/intranet

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3c80b7c19e07ae2c19a45949d91b78ac339a30e9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16478: Translation breaks display of Checkout history in tab Checks / On-site...
Marc Véron [Mon, 9 May 2016 16:30:27 +0000 (18:30 +0200)]
Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts

To test:
- Make sure that syspref OnsiteCheckouts is enabled
- Log in to OPAC as a patron who has checkouts, online checkouts and checkout history enabled
- Go to 'your reading history' (in English)
- Display all three tabs
- Apply patch
- Reload page, display oll three tabs again, there should be no difference
- Examine source code changes to verify that the words 'checkout' and 'onsite' no longer
  will be exposed to translation.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 64c28e5c725ca3d7473abee71990a19fbd3a2a0d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15878 [QA Followup]
Kyle M Hall [Mon, 23 May 2016 17:49:02 +0000 (17:49 +0000)]
Bug 15878 [QA Followup]

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 12faa24f776c812a16174fd64a479484a0e53778)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15878 - C4::Barcodes::hbyymmincr inccorectly calculates max and should warn when...
Nick Clemens [Fri, 13 May 2016 18:03:37 +0000 (14:03 -0400)]
Bug 15878 - C4::Barcodes::hbyymmincr inccorectly calculates max and should warn when no branchcode present

Test plan:

1 - prove t/db_dependent/Barcodes.t
2 - All should pass
3 - Apply first patch (unit tests update)
    4 - Tests should fail on values and warnings
    5 - Apply second patch
    6 - All tests should now pass

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described
Removed tab on line 47 of C4/Barcodes/hbyymmincr.pm
No more qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 03f303ce534e3c1c04944010f8fc352eb32be2d2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15878 - Updated unit tests for hbyymmincr barcodes
Nick Clemens [Fri, 13 May 2016 18:02:33 +0000 (14:02 -0400)]
Bug 15878 - Updated unit tests for hbyymmincr barcodes

Test plan in second patch

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 15878 - QA Followup

* Remove debug statment
* Move transcation start
* Remove unused testbuilder object

Rebased on top of 16561

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 48597577d63b6e4b35dcbf3c90b83179074ec44b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16517: Do not crash when creating a list with an existing name
Jonathan Druart [Fri, 13 May 2016 19:21:12 +0000 (20:21 +0100)]
Bug 16517: Do not crash when creating a list with an existing name

A typo has been made during a merge conflict when rebasing bug 16517.

it should be
  eval { Koha::Object->new->store; };
instead of
  eval { Koha::Object->new; }->store;

Test plan:
From the result list (intranet side), check some entries and add them to
a new list
Use an existing list's name
=> Without this patch you will get a server error (exception 'Duplicate shelf
object' raised by Koha::Virtualshelf->new->store)
=> With this patch you must get a friendly error message

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7dfc64022b8be63a10cb4c3f802d45a0b0f99973)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16505: <collection> is missing the marc namespace and updates fail if -x is passed
Tomas Cohen Arazi [Fri, 13 May 2016 14:51:54 +0000 (11:51 -0300)]
Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed

Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in
terms of what our XSLTs expect for indexing. This patch introduces the right namespace information
on the exported records so indexing succeeds.

To test:
- On current master, have some records on your db
- Run:
  $ sudo koha-shell kohadev
  $ cd kohaclone
  $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x
=> you will get a message like this:

NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept.

- Run
  $ less /tmp/NL5ufjUfpp/biblio/exported_records
=> FAIL: The first line looks like this

<?xml version="1.0" encoding="UTF-8"?><collection><record

- Now run:
  $ xsltproc \
     /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
     /tmp/NL5ufjUfpp/biblio/exported_records
=> FAIL: No output
- Apply the patch
- Run:
  $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x
- Take a look at the result file:
  $ less /tmp/asdiouqwiue/biblio/exported_records
=> SUCCESS: The start of the file looks like this:
<?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim">

- Run:
  $ xsltproc \
     /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
     /tmp/asdiouqwiue/biblio/exported_records
=> SUCCESS: There is actually indexing data :-D
- Sign off :-D

Edit: I changed qq{} for q{} as suggested by Jonathan.

Sponsored-by: American Numismatic Society
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7a178fd262dfd88c11461247ec90f2e7ee676616)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16561 - Bug 15877 followup to fix tests
Nick Clemens [Sat, 21 May 2016 23:59:07 +0000 (19:59 -0400)]
Bug 16561 - Bug 15877 followup to fix tests

When I altered the tests to avoid accidental deletion of all items, I
didn't rollback the transaction, hence the tests now delete all items
from a db when run.

This patch rollsback the transaction so items are not deleted from your db

To test:
1 - Backup your db
2 - prove -v t/db_dependent/Barcodes.t
3 - Note that all items and issues are deleted from the DB
4 - Restore your DB
5 - Apply this patch
6 - prove -v t/db_dependent/Barcodes.t
7 - Your DB should eb unchanged

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ff898e88330d4572daac241d4a480f616fd0dcc7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15877 - Unit tests
Nick Clemens [Wed, 24 Feb 2016 17:56:23 +0000 (17:56 +0000)]
Bug 15877 - Unit tests

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit cbe3dedc4f91a91e40f9e648c9de2358c68379cb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15877 - C4::Barcodes does not correctly calculate db_max for 'annual' barcodes
Nick Clemens [Wed, 24 Feb 2016 17:10:02 +0000 (17:10 +0000)]
Bug 15877 - C4::Barcodes does not correctly calculate db_max for 'annual' barcodes

This patch alters the MySQL query to remove a max statement which
incorrectly groups full annual barcodes with numeric values.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit a3557fd0f25371246445ff2e327eaa5df5bf6e8f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16539: Add tests
Jonathan Druart [Wed, 18 May 2016 14:01:03 +0000 (15:01 +0100)]
Bug 16539: Add tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3bf5a0569560f6a8f51b7d2d16fb788fa437a826)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16539 - Koha::Cache is incorrectly caching single holidays
Nick Clemens [Tue, 17 May 2016 18:39:49 +0000 (14:39 -0400)]
Bug 16539 - Koha::Cache is incorrectly caching single holidays

This makes the loop add holidays for each bracnh instead of the calling
branch

To test:
I used memcached-tools to view the cache, clear the cache, and wait for
holidays to regnerate

Have a branches with different holidays
Clear the cache
Do a checkout
View the cache - one libraries holidays are repeated for all branches
Apply patch
Clear the cache
Do a checkout
Library holidays are correctly cached

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d6c37a0994fd27e8fdbcc99a70100ea90495c582)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13669: Catch the errors to have them to the logs
Jonathan Druart [Sat, 21 May 2016 08:04:27 +0000 (09:04 +0100)]
Bug 13669: Catch the errors to have them to the logs

This patch redirect STDERR to a variable to retrieve the errors raised
by the DBMS when loading a sql file, it could be useful to debug errors.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
It's better of course, trying to load a failed fiel
it outputs mysl errors
DBD::mysql::st execute failed: You have an error in your SQL syntax...
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8da05cb2a8793b5866c50f796569ce3336807256)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13669: Re-adds error handling to load_sql
Bernardo Gonzalez Kriegel [Fri, 20 May 2016 17:26:14 +0000 (14:26 -0300)]
Bug 13669: Re-adds error handling to load_sql

This patch prevents crashing in case an
error is detected when loading a file

To test:
1) Apply patch
2) Mangle kohastructure.sql or any sample
file adding and invalid SQL line
3) Run webinstaller and check that the error
is handled gracefully

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 080f5a6b8ed1c958983bd8f528bda4b32cc76ebf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13669: (alternative) use DBIx::RunSQL
Bernardo Gonzalez Kriegel [Wed, 18 May 2016 19:25:25 +0000 (16:25 -0300)]
Bug 13669: (alternative) use DBIx::RunSQL

Alternative POC solution, on top of
previous patches, feel free to obsolte.

This patch use DBIx::RunSQL->run_sql_file
to procees each sql file.

To test:
1) Apply all patches
2) Same test plan of patch 1

Timing test running web installer, marc21,
all sample data, time in seconds

a) without patch
structure   data
59.7        66.5
58.6        66.0

b) SQL::SplitStatement (patch 1+2)
59.4        101
59.7        102

c) DBIx::RunSQL (patch 3)
60.7        66.8
59.4        66.2

Tomas' version is a bit slower loading sample data,
all give similar results processing kohastructure.

New dependency to package: DBIx::RunSQL

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e64f01ce0d6b3ff127a23070aa82427b69d89263)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13669: (followup) Fix kohastructure.sql so FK dependencies are sorted
Tomas Cohen Arazi [Wed, 18 May 2016 20:34:06 +0000 (17:34 -0300)]
Bug 13669: (followup) Fix kohastructure.sql so FK dependencies are sorted

The current table creation order is left to mysql's strategy, which is not
suitable for parsing the SQL files and passing one statement at a time in
the current order.

This patch just moves table creation statements around so FK constraints are
defined for previously created tables.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2358185379ed325eb388b717250e90978ffdea5a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13669: Use perl to load SQL statements from sample data
Tomas Cohen Arazi [Wed, 18 May 2016 16:23:25 +0000 (13:23 -0300)]
Bug 13669: Use perl to load SQL statements from sample data

This patch changes C4::Installer::load_sql so it uses File::Slurp [1] to read
the SQL files, and SQL::SplitStatement to extract the statements from the full SQL
file so they can be passed to $dbh->do.

To test:
- On Mysql 5.5, run the webinstaller
=> SUCCESS: Everything works as expected
- Apply the patch
- Run
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> SUCCESS: Everything works as expected
- On Mysql 5.6+ (5.7 is implied)
- Run
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> FAIL: It cannot load the sql files due to a password-in-command-line error
- Apply the patch
- Make sure everything is clean (it should):
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> SUCCESS: EVerything works as expected
- Sign off :-D

[1] Note: This is a POC patch, in the sense that it does the job, fixes a nasty problem
but using File::Slurp to load the SQL files in memory comes with a big runtime penalty.
You will notice the install procedure is now much slower, for instance.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5c151f35aac55c3b4c92fb11397d4ef3b8c9f9b8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16501: Remove some unneeded warns in Upload.t
Marcel de Rooy [Wed, 11 May 2016 14:17:47 +0000 (16:17 +0200)]
Bug 16501: Remove some unneeded warns in Upload.t

At some point I saw some gain in warning about a missing config line.
But these warns are actually not needed here.
Removing them here.

Test plan:
Run t/db_dependent/Upload.t while having upload_path in your koha-conf and
also without it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8117033e4c41247f453a9fb2488dc9568ab642f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15086: Update DB rev (3.22.06.005)
Kyle M Hall [Mon, 16 May 2016 17:34:57 +0000 (17:34 +0000)]
Bug 15086: Update DB rev (3.22.06.005)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15086: Creators layout and template sql has warnings
Mark Tompsett [Thu, 29 Oct 2015 22:23:20 +0000 (18:23 -0400)]
Bug 15086: Creators layout and template sql has warnings

When doing a hacked install off the master branch:
use ... {koha database name}
truncate creator_layouts;
truncate creator_templates;
truncate printers_profiles;
source installer/data/mysql/... {name of a sample_labels type file}
Warnings are generated, which may not be visible in the UI.

Most of the warnings were triggered by:
-/*!40000 ALTER TABLE `creator_layouts` DISABLE KEYS */;
-/*!40000 ALTER TABLE `creator_layouts` ENABLE KEYS */;
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_illegal_ha

In the Russian, the layout_name was truncated, because the layout_name was only 20. An atomic update sql and kohastructure.sql update were provided to widen it to 25.
http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_warn_data_truncated

Also fr-FR, ru-RU, and uk-UA were slightly different in structure, so the structure was made the same as the other files.

See comment #1 for the test plan.

NOTE: pl-PL is likely very out of date, but is not affected in this regard.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, no more warnings
mysql> show warnings;
Empty set (0.01 sec)

No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d6ac9270b00ad5a8de6ee755a4ddc40ea4e4d2e3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16481 - Report menu has unexpected issues
Owen Leonard [Mon, 9 May 2016 18:23:34 +0000 (14:23 -0400)]
Bug 16481 - Report menu has unexpected issues

This patch corrects a problem with the reports toolbar include file
which can cause a problem with the "duplicate" button. The duplicate
button passes the entire report SQL as a URL parameter, but the template
variable was not escaped as a URL variable.

This patch also adds the "uri" filter to the report name and notes
fields just to be safe.

To reproduce the bug, create a new SQL report using the SQL in the bug
report. When you run the report you should see a broken "Duplicate"
button.

Apply the patch and run the report again. The duplicate button should
look correct and work correctly.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8aec387198ac589d4179064123a0f6e213efa5f1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 1859: Do not display <<>> if an entry without value is selected
Jonathan Druart [Fri, 13 May 2016 21:03:08 +0000 (22:03 +0100)]
Bug 1859: Do not display <<>> if an entry without value is selected

For instance there are ---TABLES--- to delimite fields' tables, if
selected we do not want to add "<<>>" to the letter.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2c332513ffd421af6b23ebf30474f5baeac8ba6f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 1859 - Notice fields: can't select multiple fields at once
Owen Leonard [Fri, 13 May 2016 00:35:01 +0000 (20:35 -0400)]
Bug 1859 - Notice fields: can't select multiple fields at once

When selecting database fields to appear in a notice, selecting multiple
fields at once doesn't work correctly. The selected fields are grouped
together between << and >> instead of each being bracketed separately.

This patch corrects this problem. Also changed: Removal of 'onclick';
Conversion of 'insert' button to a Bootstrap buttons styled with a Font
Awesome icon; HTML validation error fixes.

To test, apply the patch and go to Tools -> Notices & Slips.

- Edit any notice.
- Select a notice version to edit (Email, Print, etc.).
- Confirm that the "Insert" button looks correct.
- Using ctrl+click, select multiple database fields to add to the
  notice. Confirm that clicking the "Insert" button adds the fields
  correctly.
- Confirm that there are no HTML validation errors.

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9b99d7810176726fe28c65d17c7f93dcd95cdd09)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16259: Replace CGI->param with CGI->multi_param in list context - part 2
Jonathan Druart [Fri, 15 Apr 2016 08:00:28 +0000 (09:00 +0100)]
Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2

This patch is a follow-up of bug 16154.

It removes the warning "CGI::param called in list context" in the
following scripts:
admin/branches.pl
admin/categories.pl
admin/patron-attr-types.pl
admin/preferences.pl
catalogue/image.pl
circ/circulation.pl
patroncards/add_user_search.pl
serials/add_user_search.pl
tools/marc_modification_templates.pl
virtualshelves/shelves.pl

Note that the warning from catalogue/itemsearch.pl still exists (the
call to CGI->param is done from the template).

Test plan:
- Add/modify a library, patron category, patron attr type
- Update a syspref
- Set localcoverimage and call catalogue/image.pl?biblionumber=XXX
- Search for patrons in the patron cards or serials module
- Add a marc modification templates
- Add a list (shelves)

You should not get the warning in the log after all these actions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7f3feacfe3897affbf76531eb3abd8cbc88a81e9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16402: Update DB rev (3.22.06.004)
Kyle M Hall [Mon, 16 May 2016 17:09:53 +0000 (17:09 +0000)]
Bug 16402: Update DB rev (3.22.06.004)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16402: (QA followup)
Tomas Cohen Arazi [Mon, 16 May 2016 15:36:56 +0000 (12:36 -0300)]
Bug 16402: (QA followup)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4e1b0e024297ecfe9b9ca91ea43e730db74a528a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16402: Fix fox existing installations
Jonathan Druart [Mon, 9 May 2016 14:08:56 +0000 (15:08 +0100)]
Bug 16402: Fix fox existing installations

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 74937f9c891b9a17c06cbb8100ef535c7da56285)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16402: Make kohastructure.sql valid for MySQL v5.7
Jonathan Druart [Thu, 5 May 2016 14:14:51 +0000 (15:14 +0100)]
Bug 16402: Make kohastructure.sql valid for MySQL v5.7

A primary key should not contain null value, and MySQL v5.7 is now more
strict and won't accept our errors in the DB structure.

Test plan:
  mysql < installer/data/mysql/kohastructure.sql
should work using MySQL v5.7

QA:
- letter.branchcode should not be NULL, the default (all) is an empty
string
- permissions.code should not be NULL, it's always a string

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Clean install of Ubuntu 16.05, MySQL 5.7.11
kohastructure.sql loads ok, just one warning
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1960ba7e5b108ecc81ec7ac2f6303ee45f0f2c2c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16476: Do not call CGI->param in list context, some more
Jonathan Druart [Mon, 9 May 2016 14:03:12 +0000 (15:03 +0100)]
Bug 16476: Do not call CGI->param in list context, some more

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 70498b1566118bfdf6c23f827845ad994fd1dc89)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13871: [QA Follow-up] Fix small regression on AF with branchcode in Patron Info...
Marcel de Rooy [Wed, 11 May 2016 12:42:33 +0000 (14:42 +0200)]
Bug 13871: [QA Follow-up] Fix small regression on AF with branchcode in Patron Info request

If you enable send_patron_home_library_in_af in your sip account, you
want a separate AF field for the home branch.

Test plan:
Send a 63 (Patron Info) and verify that you have an extra AF.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested Patron Status and Patron Info.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c2ddc19600c70bcdc87cd64983c80073e19ac794)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16154: Fix some other occurrences
Jonathan Druart [Wed, 13 Apr 2016 16:22:18 +0000 (17:22 +0100)]
Bug 16154: Fix some other occurrences

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c133bedf54d34b5f7f4deec6bfe2f375ccc9b713)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16154: CGI->multi_param - Assign a list
Jonathan Druart [Tue, 29 Mar 2016 08:52:25 +0000 (09:52 +0100)]
Bug 16154: CGI->multi_param - Assign a list

This patch replaces the occurrences of
  @foo = $cgi->param('foo');
with
  @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a159d2b067c62bbfd524709813071951bc600ae4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16154: CGI->multi_param - Force scalar context
Jonathan Druart [Tue, 29 Mar 2016 08:51:07 +0000 (09:51 +0100)]
Bug 16154: CGI->multi_param - Force scalar context

This patch replaces the occurrences of
  $template->param( foo => $cgi->param('foo') );
with
  $template->param( foo => scalar $cgi->param('foo') );

perl -p -i -e 's/(\s*=>\s*)\$(cgi|input|query)\->param\(/$1scalar
\$$2\->param\(/xms' **/*.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f3e4b5bbb6b02d7bb6e89d84c0379666eb1e704f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16154: CGI->multi_param - Manual changes
Jonathan Druart [Tue, 29 Mar 2016 08:41:58 +0000 (09:41 +0100)]
Bug 16154: CGI->multi_param - Manual changes

This patch does the same as the previous one, but affects lines which
have not been caught by the regex.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ac5a1bfececb5400a77f0ebad90181f5215d5a85)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16154: CGI->multi_param - Declare a list
Jonathan Druart [Tue, 29 Mar 2016 08:15:43 +0000 (09:15 +0100)]
Bug 16154: CGI->multi_param - Declare a list

This patch replaces the occurrences of
  my @foo = $cgi->param('foo');
with
  my @foo = $cgi->multi_param('foo');

perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 66aacace086f16d2eca860cc6c2aa164866d0488)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16480: Unclosed tag <span> in shelves line 332 on intranet
Hector Castro [Mon, 9 May 2016 17:31:29 +0000 (11:31 -0600)]
Bug 16480: Unclosed tag <span> in shelves line 332 on intranet

Unclosed tag <span> in shelves line 332 on intranet when translating
<span>An error occurred when creating this list./span>
This error was introduced by bug 15403

To test: Verify the template in line 332 to see the unclosed tag fixed
or follow test plan for bug 15403

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
(cherry picked from commit 9f5163cfcd1eb8becf48ae0861d8096720965c61)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15403 [QA Follow] - Minor language tweak
Kyle M Hall [Fri, 15 Jan 2016 15:30:07 +0000 (15:30 +0000)]
Bug 15403 [QA Follow] - Minor language tweak

The phrase "Please check it's not" sees incorrect gramatically, changing
the wording to "Please verify it is not"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 132ef99cf0a69668b318b38d4090152ff2880ca2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15403: Tidy up error messages in Staff lists
Aleisha [Wed, 13 Jan 2016 23:44:58 +0000 (23:44 +0000)]
Bug 15403: Tidy up error messages in Staff lists

To test:
1) Create a list on the intranet, observe the message
2) Create another list with the same name, observe the message
3) Delete a list, observe the message
4) Check the patch itself for typos

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f6c1b30d6f23b87bc082c55fb7fb3ecb6dd3da78)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16439: Allow styling to button for upload local cover images (Font Awesome Icons)
Hector Castro [Wed, 4 May 2016 18:10:41 +0000 (12:10 -0600)]
Bug 16439: Allow styling to button for upload local cover images (Font Awesome Icons)

Improve button for upload local cover image with Font Awesome Icon

To test:
-Set syspref LocalCoverImages and OPACLocalCoverImages to Allow
-A new tab 'Images' appear in bib record detail on Intranet.
-Notice about the button upload.
-Apply the patch and reload the page.
-The button is changed for class=btn btn-mini like the button "edit"
 used in items in the tab Holdings
-Also added the Font Awesome icon upload "fa fa-upload" class.

Button is styled as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 6003c6b320a4fec0be37b4940a676dfdfa1875f4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16381 [QA Followup] - Wrap string for translations
Kyle M Hall [Fri, 29 Apr 2016 16:09:08 +0000 (16:09 +0000)]
Bug 16381 [QA Followup] - Wrap string for translations

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d50cdb72b366417b9ef5f8b5daa29308e0b3eaae)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16381: Fix capitalization on tags review page
Katrin Fischer [Fri, 29 Apr 2016 00:15:30 +0000 (02:15 +0200)]
Bug 16381: Fix capitalization on tags review page

- Fixes capitalization of the sub heading "Displaying ... terms"
- Fixes button label of "Test"

To test:
- Look at all, approved, rejected, pending tags and check
  the line below the heading "Tags" - "Displaying..."
- Check a term using the search box on the left side
  Before the patch: Test - Processing... - test
  After the patch this should be Test again in the end.

Capitalization looks good. QA tools complain about tabs, but there
are loads of tabs all over review.tt. Proper formatting of the whole file
could be done in a separate bug.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5aa4bb4f33ef0105e82c68f1c8f79a6225eb943f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16340: JS variable in opac-bottom.inc is declared two times
Hector Castro [Mon, 25 Apr 2016 16:04:13 +0000 (10:04 -0600)]
Bug 16340: JS variable in opac-bottom.inc is declared two times

MSG_NO_RECORD_SELECTED declared two times

To test: Go to cart and list (virtual shelves) in OPAC and
verify if those pages work as expected

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c01bb7dfca65bfbc26197a3039988ba775eb4e79)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16270 (followup) Typo authentification vs authentication
Marc Véron [Fri, 15 Apr 2016 14:18:37 +0000 (16:18 +0200)]
Bug 16270 (followup) Typo authentification vs authentication

Additionally fix typo in following files:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt

To test: Apply patch, verify in files that authentification is
         replaced by authentication

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e297342f52bcdbc09b4a0c1b4d28cbb50ae2518f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16270: Typo authentification/authentication
Jonathan Druart [Fri, 15 Apr 2016 07:05:37 +0000 (08:05 +0100)]
Bug 16270: Typo authentification/authentication

Test plan;
Trigger /cgi-bin/koha/errors/404.pl
Confirm the typo without the patch and that it's fixed with this patch
applied.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1c85d476aa8604fb93f0c27bec207aa9f4048467)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16253: Changing 'delete order' to 'cancel order'
Aleisha [Tue, 26 Apr 2016 01:15:47 +0000 (01:15 +0000)]
Bug 16253: Changing 'delete order' to 'cancel order'

To test:
1) Go to Acqui -> do a vendor search and view an open basket
2) Confirm last column heading says cancel instead of delete
3) Confirm link to cancel order says cancel instead of delete
4) If can't delete record, confirm reasons say cancel order instead of delete
5) Click the vendor name, then Baskets tab, then Receive Shipment
6) Fill vendor invoice field and click next
7) If there are any pending orders, confirm that all instances of 'delete order' now say cancel

Sponsored-by: Catalyst IT
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 61d670795fe89aca2d244668c51b1b75145bb5a5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16218: printfeercpt.tt (and others) does not include jQuery
Marc Véron [Thu, 7 Apr 2016 17:10:55 +0000 (19:10 +0200)]
Bug 16218: printfeercpt.tt (and others) does not include jQuery

This patch adds [% INCLUDE 'doc-head-close.inc' %] to the following files
(to make them include jQuery):

koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt

To test:

1) Temporarily include the follwing lines in syspref IntranetSlipPrinterJS:

function printThenClose() {
  if (typeof jQuery != 'undefined') {
    // jQuery is loaded => print the version
    alert(jQuery.fn.jquery);
  }
  else {
    alert('jQuery not available');
  }
}

2) Go to a users page and print slips:
From the Print button in the tool bar:
- Print summary
- Print slip
- Print quick slip
From the "Fines" tab: Account
- 'Print' link in the table with paid transactions

Without patch, a JavaScript message 'jQuery not avaliable' appears.
With patch, the message displays the current jQuery version (1.7.2)

3) Remove IntranetSlipPrinterJS
- Verify that the slips above print as expected.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0b6bc2b5983f0e66c13902e74352cdcd68971a7f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15009: QA follow-up
Jonathan Druart [Mon, 18 Apr 2016 09:37:18 +0000 (10:37 +0100)]
Bug 15009: QA follow-up

This patch adds a test to check the unicity of auth cats, simplify
the GetBudgetAuthCats subroutine and make it return an arrayref of scalar
instead of an arrayref of hashref with only 1 key.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9c5b8191009eba54e851512c9cfa2e3d5ab949df)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15009: Correctly populate planning filter
Jonathan Druart [Mon, 18 Apr 2016 09:36:51 +0000 (10:36 +0100)]
Bug 15009: Correctly populate planning filter

The filter for planning values was populated with empty strings.
Note that it's not caused by previous patches.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5e8ded21af689f43f9791f19772a478fb3c67afe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats
charles [Fri, 25 Mar 2016 21:09:24 +0000 (17:09 -0400)]
Bug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1a9ca842939ba48789dd11bfa5b9510e73bad645)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15009 - Planning dropdown button in aqbudget can have empty line
Blou [Tue, 13 Oct 2015 20:12:49 +0000 (16:12 -0400)]
Bug 15009 - Planning dropdown button in aqbudget can have empty line

When displaying a budget, the Planning button in the admin toolbar displays

Plan by months
Plan by libraries
Plan by item types
Plan by

The last one is empty, due to C4::Budgets::GetBudgetAuthCats returning an empty field if the budget has no sort defined.
This prevents returning an array with empty element(s)

TEST:
1) Admin -> Budgets
2) Select a budget
   a) you must have '' (empty) in your aqbudgets.sort1_authcat field.
   b) edit the budget (direct DB or interface) to get that.
3) Click on Planning dropdown, see the "Plan by <nothing> " entry.
4) apply the patch, revalidate.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more empty option
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b8076d8ec7236360274e1a4e861969c86bb679ea)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>