]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 17025: Fix XSS in serials-search.pl
Jonathan Druart [Tue, 2 Aug 2016 13:46:11 +0000 (14:46 +0100)]
Bug 17025: Fix XSS in serials-search.pl

Test plan:
Hit
  /serials/serials-search.pl?ISSN_filter="%2F><script>alert('XSS')<%2Fscript>&searched=1
  /serials/serials-search.pl?title_filter="%2F><script>alert('XSS')<%2Fscript>&searched=1

=> Without this patch you will see the alert
=> With this patch, no more alert

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 1ea1504c30c5c34dd763027caee55dcf359e94cf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d432c5bba836601b809a9f807af05ef85e952453)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17029: Fix XSS in catalogue/*detail.pl
Jonathan Druart [Tue, 2 Aug 2016 14:46:06 +0000 (15:46 +0100)]
Bug 17029: Fix XSS in catalogue/*detail.pl

Hit
  /cgi-bin/koha/catalogue/detail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>
  /cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=1<script type="text/javascript">alert("XSS")</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f3a8e5a4117a0e95969ff2856dfcd95a6935ec55)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 990aca1cb7548bcead783f40661acb156952d09a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7441: Update DB rev (3.22.09.004)
Frédéric Demians [Wed, 10 Aug 2016 13:28:20 +0000 (13:28 +0000)]
Bug 7441: Update DB rev (3.22.09.004)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7441: QA follow-up - Add note about missing NORMARC support
Katrin Fischer [Wed, 10 Aug 2016 05:15:03 +0000 (07:15 +0200)]
Bug 7441: QA follow-up - Add note about missing NORMARC support

Adds a note about missing support for NORMARC (only supports
MARC21 and UNIMARC) to the system preference text.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 821cb91a80942a85f4d22e6b1a8c700add7bab7d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 57e2a013cc78db4e26367cbfd34bc0054e67a3ba)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7441 - Followup search results showing wrong branch [UNIMARC]
Jonathan Druart [Fri, 24 Jun 2016 15:08:23 +0000 (16:08 +0100)]
Bug 7441 - Followup search results showing wrong branch [UNIMARC]

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Playing with OPACResultsLibrary syspref, biblio with items having different
  home/holding library are displayed properly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 492d79a7df18efb294bd9bd9da5fa5b4efe1e592)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1d2da8fcd06e1f396d63fd834771f2a208fc5b91)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 7441 - search results showing wrong branch?
Kyle M Hall [Thu, 2 Jun 2016 14:01:56 +0000 (14:01 +0000)]
Bug 7441 - search results showing wrong branch?

When you search in the OPAC it shows you the HOME branch on the location
in XSLT, but if you click through to the detail page it shows you the
CURRENT BRANCH in the holdings table which is very confusing to patrons.
I don't know what's the right solution - home or holding branch, but they
should be the same in both places for the patron's sake. If you do the same
search in the staff client you see the right branch info on the search results
and on the detail page.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Search the catalog, you search should include results with items
   that have different home and holding libraries.
4) The results should look the same as before the patch
5) Change the system preference OPACResultsLibrary to "current location"
6) Refresh your page of search results
7) The results show now show the holding library instead of the home library

Signed-off-by: Barbara Walters <bwalters@ncrl.org>
Signed-off-by: Nick Clemens <nick@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 4db2e745e244bfc9e8315b4903c30e21142d9cb4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 17a103d8a06345ad39e3af9c0d3a50c3f24ce5e7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17023: Fix XSS in acqui/z3950_search.pl
Jonathan Druart [Tue, 2 Aug 2016 13:15:09 +0000 (14:15 +0100)]
Bug 17023: Fix XSS in acqui/z3950_search.pl

Test plan:
Enter the following in the different inputs:
<script>alert('XSS')</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit eb543a90848b97d35aa15052c8881134926a3ed0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 7cb27f092a4c699fcd428083383eef6f515da3e3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17023: Fix XSS in cataloguing/z3950_search.pl
Jonathan Druart [Tue, 2 Aug 2016 13:06:41 +0000 (14:06 +0100)]
Bug 17023: Fix XSS in cataloguing/z3950_search.pl

Test plan:
Enter the following in the different inputs:
<script>alert('XSS')</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f6e0a619d974fe002ec6a920206c7bc2808bce26)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 98c6d7873535d52609657ecaf256740c95c0e532)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16450 - Remove the use of "onclick" from guarantor search template
Owen Leonard [Wed, 4 May 2016 13:34:46 +0000 (09:34 -0400)]
Bug 16450 - Remove the use of "onclick" from guarantor search template

This patch updates the guarantor search template so that event
definition is done in the script rather than in an onclick attribute.

This patch also increases the size of the popup window to help prevent
the need for horizontal scrolling and adds Bootstrap style to the
"select" button.

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

- Go to Patrons and add a patron with a "child" category type.
- In the "Guarantor information" section, click the "Set to patron"
  button.
- In the pop-up window, search for a patron.
- Click the "Select" button next to a patron.
- The window should close, and the patron you selected should now appear
  as the guarantor. The guarantor's address information should be added
  to the "Main address" section.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17065 - Rename C4/Auth_cas_servers.yaml.orig
Mirko Tietgen [Sat, 6 Aug 2016 11:52:26 +0000 (13:52 +0200)]
Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig

C4/Auth_cas_servers.yaml.orig gets cleaned away after every package build because
of the .orig extension. This patch moves it.

It is only a sample file, there is no functionality to test. Just verify that the
file is there with the new name after you applied the patch.

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 30474a321575ffecfd4e2578dce59385267ec8d7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0447a6a217f9836e54225f4b6a1fdc13f85409fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17068: empty <li> in opac-reserve.tt
Eric Phetteplace [Sat, 6 Aug 2016 17:44:53 +0000 (10:44 -0700)]
Bug 17068: empty <li> in opac-reserve.tt

empty HTML list item on 'holds' page, to test:
- sign in as user
- attempt to place hold
- view source in between 'holds note' textarea & <!-- ITEM HOLDS --> comment
- note empty <li>
- apply patch
- repeat process above up until patch
- no more empty <li>

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 17a5ef51199736235f0c3fd35c84be124ecc166e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 9fa841b0e10849f89c66a222795aac0d96188aa5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16622: some tests triggered by prove t fail for unset KOHA_CONF
Mark Tompsett [Tue, 31 May 2016 16:01:46 +0000 (12:01 -0400)]
Bug 16622: some tests triggered by prove t fail for unset KOHA_CONF

TEST PLAN
---------
1) unset KOHA_CONF
2) prove t
   -- 00-load.t dies miserably
3) prove t/Creators.t
   -- fails
4) apply patch
5) prove t
   -- noisy, but all tests successful
6) prove -v t/Creators.t
   -- 2 skipped tests
7) run koha qa test tools

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 6b3a04da6a2f137ad87e0d39e9cc2c5ab7958850)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 72c6715260e6605be83cced71029ba21be51aba1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17044: Fix wrong destination for 'api' directory
Tomas Cohen Arazi [Wed, 3 Aug 2016 17:34:12 +0000 (14:34 -0300)]
Bug 17044: Fix wrong destination for 'api' directory

The original Makefile.PL tweak missed to trim the directory name thus
repeating the 'api' directory like in 'api/api'.

To test:
- Make a standard install (for example in /usr/share/koha
=> FAIL: check /usr/share/koha/api/api exists
- Make a single install (for example in /home/tcohen/koha-single)
=> FAIL: check /home/tcohen/koha-single/api/api exists
- Apply the patch
- Make a standard install (for example in /usr/share/koha
=> SUCCESS: check /usr/share/koha/api exists and doesn't contain a nested 'api' dir
- Make a single install (for example in /home/tcohen/koha-single)
=> SUCCESS: check /home/tcohen/koha-single/api exists and doesn't contain a nested 'api' dir
- Sign off :-D

Note: this affects the packages too, as the standard install is used as a basis.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 72d92be918eae8a9bc3c6723c155d1b0c6ba25e4)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 58fd9fbea35bcdf75c73ef10ee7c38a2fa5dc007)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16727: Clarify upload category note
Nicole C Engard [Wed, 27 Jul 2016 13:27:37 +0000 (13:27 +0000)]
Bug 16727: Clarify upload category note

This patch clarifies the note on the upload tool
that states that no categories are defined.

To test:

* Log in to Koha
* Confirm that you have no values set for the UPLOAD
  authorized value category
* Visit Tools > Upload
* Check the warning note for typos
* Add a authorized value category for UPLOAD
* Visit Tools > Upload
* Confirm that note is replaced

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 ebaa3543d6278fe31886310cda5b10c807e6ad8a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit fbb6eccabab6fa65bab8d03e4be444e4029faa7c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16864: Silence warnings in t/db_dependent/ILSDI_Services.t
Mark Tompsett [Wed, 6 Jul 2016 18:17:20 +0000 (14:17 -0400)]
Bug 16864: Silence warnings in t/db_dependent/ILSDI_Services.t

prove t/db_dependent/ILSDI_Services.t
generates noisy output as a result of the ambiguous context
of two $cgi->param() calls.

By storing into scalar variables, and then using the scalar
variables, the code maintains readability and fixes the problem.

TEST PLAN
---------
1) prove t/db_dependent/ILSDI_Services.t
   -- noisy.
2) apply patch
3) prove t/db_dependent/ILSDI_Services.t
   -- not noisy
4) run koha qa test tools

Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit ef0738922005e4235b80e70663d7fa711a87556e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ad5acf73bc03f2a68ebbaa27c3d9399ce38551ae)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting...
Marc Véron [Tue, 5 Jul 2016 05:14:26 +0000 (07:14 +0200)]
Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt

In koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt,
fix line splitted TT directives and sentence splitting leading
to translatability problems. (See first comment).

To test:
- Apply patch
- Go to detail pages of biblios with waiting holds
- Verify that messages in column 'Status' are OK
- Examine code in patch to make sure that the simplification in logic
  makes sense and that no TT directive is splitted
- Bonus test:
  - Go to folder misc/translator. Run perl translate create xx-XX
  - Verify that monster mentioned in first comment no longer exists
    (in po/xx-XX-staff-prog.po)

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

Amended for wording (comment #5) 2016-07-26 mv

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 13004a8c649f1098f1ddd3be5a02b75bad27f3d8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 536acf312012b29df27191683a313d097b176c1e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16971: Missing dependency for HTML::Entities
Marcel de Rooy [Fri, 22 Jul 2016 09:48:21 +0000 (11:48 +0200)]
Bug 16971: Missing dependency for HTML::Entities

This module is already used in opac-password-recovery.pl.
It is loaded in Acquisition, but not used (anymore?).
It is not yet listed in PerlDependencies.

Note: The module is packaged for Debian Wheezy and Jessie.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 92626f55c88661d1e5b8dea57bdca412df004123)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit df0efd70da3486969b0601a5d3018f2f8cd49a52)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16818: External auth redirect broken under Plack
Jesse Weaver [Fri, 8 Jul 2016 22:01:19 +0000 (16:01 -0600)]
Bug 16818: External auth redirect broken under Plack

Test plan:

0) Have either CAS or Shibboleth authentication enabled under Plack.
1) Hover over the authentication link on the staff client or OPAC, and
   notice that it has either '.../opac/...' or '.../intranet/...' instead
   of '.../cgi-bin/koha/...'. (This will be a complete dealbreaker for CAS
   authentication.)
2) Apply patch.
3) Check links again; they should now have the correct paths.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not test CAS or Shibboleth, but no regression found.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit d475dae77313e8f0ee11146ce824d019351cbc5f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0c5c0a50b87ceeaa8f76e18240e279a96596222a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11490: Update DB rev (3.22.09.003)
Frédéric Demians [Fri, 24 Jun 2016 11:53:02 +0000 (11:53 +0000)]
Bug 11490: Update DB rev (3.22.09.003)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11490: Split MaxItemsForBatch into 2 prefs to clarify things
Jonathan Druart [Wed, 11 May 2016 13:10:49 +0000 (14:10 +0100)]
Bug 11490: Split MaxItemsForBatch into 2 prefs to clarify things

Prior to this patch, a single pref (MaxItemsForBatch) was used to
restrict the use of the batch item modification and deletion.

On the batch modification tool, the pref is used to limit the number of
items a librarian is allowed to modify in a batch, but on the batch
deletion tool the pref is used to limit the number of items to display.

To clarify things, this patch split the pref into 2 new prefs:
MaxItemsToDisplayForBatchDel and MaxItemsToProcessForBatchMod.

Later we could add a MaxItemsToProcessForBatchDel if needed.
Note that this patch should not introduce any changes in the current behaviors.

Test plan:
0/ Do not execute the update DB entry
1/ Set a value != 1000 for MaxItemsForBatch
2/ Execute the update DB entry and confirm that the 2 new prefs are
initially set with the value of MaxItemsForBatch and that
MaxItemsForBatch has been deleted
3/ Set different values for these 2 prefs (2 and 3 for instance to ease
the next steps)
4/ Try to delete less than MaxItemsToDisplayForBatchDel items
=> You must see the items details
5/ Try to delete more than MaxItemsToDisplayForBatchDel items
=> You must not see the items details but are allowed to delete them
6/ Try to modify less than MaxItemsToProcessForBatchMod items
=> You must see the items details
7/ Try to modify more than MaxItemsToProcessForBatchMod items
=> You must be restricted and not allowed to process

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6b2c55ecdd7ad128c7ec923e70b13b1f287c7d00)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit bb5adfa7f959d80dd079b058ec67f0d3fc276d09)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 11490: Add prefs MaxItemsToProcessForBatchMod and MaxItemsToDisplayForBatchDel
Jonathan Druart [Wed, 11 May 2016 13:10:41 +0000 (14:10 +0100)]
Bug 11490: Add prefs MaxItemsToProcessForBatchMod and MaxItemsToDisplayForBatchDel

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 20f42350488ccd2795af3863ab1954d22b92eeae)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3e37c9db1760137bfc8a575590125c7d1b6aefa4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16975 : @INC should not have '.' as its last entry
Chris Cormack [Mon, 25 Jul 2016 20:57:50 +0000 (08:57 +1200)]
Bug 16975 : @INC should not have '.' as its last entry

To Test
1/ Try using a plugin
2/ Apply patch
3/ Test plugin still works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 28eae42d2d09c14d0bb1bd3e1655714b33711ab3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1cf1c89f304fd2d84a1264041e8834444d1c8bf3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16878: Fix XSS in opac-memberentry
Jonathan Druart [Fri, 22 Jul 2016 07:30:54 +0000 (08:30 +0100)]
Bug 16878: Fix XSS in opac-memberentry

The vars are gotten from the url and sent to the template as it. They
must be escaped.

Test plan:
I have not managed to create the original issue, so there is no test
plan for the XSS fix, but you can confirm there is no regression.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9bdea2e3691fd62e777cc974f89b867a69eec9a8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit b505c6b7d636f262eadef82984b83b5194438724)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16988 - Suspending a hold with AutoResumeSuspendedHolds disabled results in error
Kyle M Hall [Wed, 27 Jul 2016 18:00:53 +0000 (18:00 +0000)]
Bug 16988 - Suspending a hold with AutoResumeSuspendedHolds disabled results in error

iUnless AutoResumeSuspendedHolds is enabled, attempting to suspend a
hold from reserve/request.pl results in the following error:

The given date (undefined) does not match the date format (us) at
/home/vagrant/kohaclone/Koha/DateUtils.pm line 152.

Test Plan:
1) Enable SuspendHoldsIntranet
2) Disable AutoResumeSuspendedHolds
3) Attempt to suspend or unsuspend a hold
4) Note the error
5) Apply this patch
6) Repeat step 3
7) The hold should suspend or resume correctly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Megan Wianecki <mwianecki@mtpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 91bc9451d0378d65100c828776b09395e4c88199)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3810c29f61ebcd815066f1be2abc08cbb2bdc0aa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17022: Fix XSS in circ/branchtransfers.pl
Jonathan Druart [Tue, 2 Aug 2016 13:00:02 +0000 (14:00 +0100)]
Bug 17022: Fix XSS in circ/branchtransfers.pl

Test plan:
Enter the following in the barcode input:
    <script>alert('XSS')</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit c63d0b311b5e7ba882d19b9b8a71838256de98cf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 46322ffc6e683d0583283e7485548d46c9586019)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17024: Fix XSS in tools/viewlog.pl
Jonathan Druart [Tue, 2 Aug 2016 13:32:46 +0000 (14:32 +0100)]
Bug 17024: Fix XSS in tools/viewlog.pl

Test plan:
    Hit /tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=<script>alert("XSS")</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f563ba795e4863328ff4930e7877caae9458206c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 24664b719f9d09210f30d7f96fc025e08da8124e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17026: Fix XSS in serials/checkexpiration.pl
Jonathan Druart [Tue, 2 Aug 2016 13:51:49 +0000 (14:51 +0100)]
Bug 17026: Fix XSS in serials/checkexpiration.pl

Test plan:
Hit:
 /serials/checkexpiration.pl?title="><script>alert("XSS")</script>&date=12/02/2002
 /serials/checkexpiration.pl?issn="><script>alert("XSS")</script>&date=12/02/2002

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 9d00353a92487dcde654d88206fd5458448fff1b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ec78a0d43fe8032d9eeb9272878129085c3c429f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 17028: Fix XSS in reserve/request.pl
Jonathan Druart [Tue, 2 Aug 2016 14:41:49 +0000 (15:41 +0100)]
Bug 17028: Fix XSS in reserve/request.pl

Test plan:
Hit
  /cgi-bin/koha/reserve/request.pl?biblionumber=1"><script type="text/javascript">alert("XSS")</script>

=> Without this patch you will see the alert
=> With this patch, no more alert

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 66f81fc2101f194d39592bc28f3e2ff69764bc00)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 542c0dbbaa8bff5a101058e0e2397e21edf8f192)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15397 - Pay selected does not works as expected
Kyle M Hall [Thu, 19 May 2016 13:28:02 +0000 (13:28 +0000)]
Bug 15397 - Pay selected does not works as expected

When patron has more fees (account lines) and you wan't to pay just some
of them, you select wanted lines a click on "pay selected" button. But
the fine isn't paid, the "amountoutstandig" is not modified, but it is
added new line with "pay" code an with amountoutstanding below zero.
Paying one or all fine works as expected. Paying selected worked some
time ago, but I don't know when it stopped working, we realize it after
upgrade to 3.22.

Test Plan:
1) Apply this patch
2) Pay fines using "Pay selected"
3) Note the payment and the fees outstanding balances are reduced!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 537adde2d2f65ed9bb9a03a127b9906930d46353)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c0e2610bda62b3890fd5416124bc9c1157c23d4d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16573: Update DB rev (3.22.09.002)
Frédéric Demians [Mon, 1 Aug 2016 09:54:30 +0000 (09:54 +0000)]
Bug 16573: Update DB rev (3.22.09.002)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16573: Define virtualshelves.created_on as datetime for existing installs
Jonathan Druart [Fri, 22 Jul 2016 08:51:00 +0000 (09:51 +0100)]
Bug 16573: Define virtualshelves.created_on as datetime for existing installs

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 44785935bd45291a2ae36a5c9ab65b1e6cf69c5b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d2b20b2a82ef73423ec6571967173083ba333501)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16573: change created_on type - atomic update
Bernardo Gonzalez Kriegel [Tue, 24 May 2016 21:12:11 +0000 (18:12 -0300)]
Bug 16573: change created_on type - atomic update

This patch change 'created_on' virtualshelves column to
datetime type

To test:
1) Apply the patch
2) Run updatedatabase.pl
3) Verify type of 'created_on' column

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 162b9015d9bfb23200d1bddff69be9384a33463b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ce68d9b7fd14f9959f18039b63ad3e7bea44213e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16573: fix structure and sample data for MySQL 5.7
Bernardo Gonzalez Kriegel [Mon, 23 May 2016 20:06:01 +0000 (17:06 -0300)]
Bug 16573: fix structure and sample data for MySQL 5.7

Web install on Ubuntu 16.04/Mysql 5.7 fails.

This patch makes small changes to make installation
possible to kohastructure.sql and some sample files.

Sample values for quotes table can't have '0000-00-00 ...' values
nor NULL values, now() is perhaps an option.

Depends on Bug 16572

To test:
1) System with MySQL 5.7, for example Ubuntu 16.05
2) Apply 16572
3) Try web install, it fails
4) Apply this and next patch
5) Try again, now it succeed

This is only for English install, i18n files needs revision
I can do that if this is accepted.

Perphaps a change is needed to updatedatabase.pl

Ammended patch, 'created_on' field on virtualshelves
can't be timestamp default null, mysql 5.5 complains
that only one timestamp column can be defined as
default not null. Changed to 'datetime' type.

Can provide followup with updatedabase change,
but need an opinion if this type change makes sense.

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 36b2b288a7b8a39530f0a1ba7a00396206640533)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 8955b1b7c56ebbcf350a57e3a794597e0ac2d70c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16573: fix linkid value on marc_subfield_structure
Bernardo Gonzalez Kriegel [Mon, 23 May 2016 19:58:03 +0000 (16:58 -0300)]
Bug 16573: fix linkid value on marc_subfield_structure

followup to previous patch.

This patch fixes linkid value. It was set to '', but
declared as tinyint.
Mysql < 5.7 replaced this with nearest right value, i.e 0
Mysql 5.7 gives error here.

Also some normalization, all lines with data begins with two tabs

To test:
On top of Bug 16572 and previous patch

1) Run webinstaller
2) Add mandatory values
3) There must be no problems on MySQL 5.7

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 d00d46112df2dc1c3f823fbc2a8c347deb69cdb7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 58bd47a462a008f2e5cb9cfa221ee5b0a0bd5826)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16934: Add test for ModOrder
Jonathan Druart [Thu, 21 Jul 2016 17:23:00 +0000 (18:23 +0100)]
Bug 16934: Add test for ModOrder

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7adb8861aa352afdfd300bc50d03af450e26468f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 043c8f105b12a0bc52c14048b387c3b4b4b16d96)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16934 - Cannot add notes to canceled and deleted order line
Kyle M Hall [Mon, 18 Jul 2016 11:02:14 +0000 (11:02 +0000)]
Bug 16934 - Cannot add notes to canceled and deleted order line

Some librarians would like to be able to add notes to deleted order
lines to keep track of data such as what title the order line was for.
For some reason ModOrder dies if a biblionumber is passed in, even
though it does not use biblionumber and does not need it to exist in any
fashion! This limitation should be removed.

Test Plan:
1) Create a basket with an orderline
2) Cancel the order / delete the record
3) Click the "Add internal note" link for that order line
4) Fill in a note and click "Save"
5) Note the error
6) Apply this patch
7) Repeat steps 3-4
8) Note this time the note is saved!

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7cc6f6eb45333e1f2041e53dcfdc31532880bd9f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 43f7f6b0bddc3423220c7522569bce4f6f6d94fc)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16958: Fix XSS in opac-imageviewer.pl
Jonathan Druart [Fri, 22 Jul 2016 07:14:27 +0000 (08:14 +0100)]
Bug 16958: Fix XSS in opac-imageviewer.pl

Test plan:
Trigger
/opac-imageviewer.pl?biblionumber=14&imagenumber=7"><sCrIpT>alert(42)<%2fsCrIpT>

=> Without this patch you will see the JS alert
=> With this patch applied you won't see it

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 65918b146cd88f38a9d894be8175d049ea70d05f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a3e2ea765f2e34f397fa9e1236dbc4e837311f88)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16716: Replaced wrong GROUP BY with DISTINCT
Srdjan [Mon, 13 Jun 2016 03:35:56 +0000 (15:35 +1200)]
Bug 16716: Replaced wrong GROUP BY with DISTINCT

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 52ac9a1ca3990102c3c635e3d9af06aae29f73e1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 16b97e21d0ed13e5f38987c64db55ae15d944dc3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15974: Rancor: Correctly select existing authorized value
Jesse Weaver [Wed, 20 Jul 2016 22:51:45 +0000 (16:51 -0600)]
Bug 15974: Rancor: Correctly select existing authorized value

Test plan:
  1) Open up a record in Rancor with an itemtype besides the first in
     the list ('BK' in the sample itemtypes).
  2) It will show "Book" instead of the correct itemtype.
  3) Apply patch, reload the page.
  4) The correct itemtype should now show.

NOTE: The scope is only 942$c. This corrects that.

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 b01aa596abb91f8679c64e89197fbb2b3d9309cc)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 90dbfef3295130d62adf61b0e9d1dab44a4e0d4f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16531: Circ overdue report is showing an empty table if no overdues
Aleisha [Tue, 17 May 2016 04:46:31 +0000 (04:46 +0000)]
Bug 16531: Circ overdue report is showing an empty table if no overdues

EDIT: Comment 2
EDIT2: using noreport variable (Comment 5)

To test:
1) Ensure you have no items overdue
2) Go to Circ -> Circulation reports -> Overdues
3) Notice empty table, '0 items overdue' heading
4) Ensure syspref FilterBeforeOverdueReport is set to 'Don't require'
5) Apply patch and refresh page
6) Notice empty table is no longer showing and page says "There are no
   overdues"
7) Apply a filter to search
8) Page now says "There are no overdues matching your search" with a
   link to reset filter.
9) Click Reset filter -> confirm any filters you applied are cleared.
10) Set FilterBeforeOverdueReport to 'Require' and refresh overdue
    report
11) Page should say "Please choose one or more filters to proceed"
12) Check out an item to a member, ensure due date is a date that has
    passed (i.e. yesterday)
13) Refresh overdue report page
14) Page should still say "Please choose one or more filters to proceed"
15) Set FilterBeforeOverdueReport to 'Don't require'
16) Confirm table now shows correctly with '1 items overdue' heading
    etc.

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 b7c61a5d128cc3580ea3ee67bc29e02571923dd3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit de5621dd9b1f2e03ec5d4f37226fa462b2bf6b28)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16888: (follow-up)Add Font Awesome Icons to Members
Hector Castro [Mon, 11 Jul 2016 14:34:38 +0000 (08:34 -0600)]
Bug 16888: (follow-up)Add Font Awesome Icons to Members

Remove fa-ban according with QA comment 4

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dba6cfe441a3ee14183287795c0c4293c74b2989)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 160c584100877b3c25d2294180f59013fc7a5043)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16888: Add Font Awesome Icons to Members
Hector Castro [Fri, 8 Jul 2016 21:52:06 +0000 (15:52 -0600)]
Bug 16888: Add Font Awesome Icons to Members

Add Font Awesome Icons to:
- "Select/Clear all" links to pay.tt (Pay fines tab)
- "Filter icon" in "filter paid transactions" to Accout tab (boraccount.tt)
- "Trash icon" to Remove option in "Manual restrictions"
(borrower_debarments.inc) also add "Ban and plus icon" to "Add manual restriction"

To test:
-Apply patch
-Select a patron who has fines
-Go to "Fines->Pay fines" tabs and see the icons in "Select/Clear all"
-Choose the "Account" tab and sse the icon in "Filter paid transactions"
-Select the "Check out" tab and go to "Restrictions"
-Add a manual restriction and notice about the two new icons fa-plus and fa-band
-See the new button btn-mini and the fa-trash icon
-Verify that all works as expected

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 ae4195207726fb01cebad0d809addaefffe37975)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 24e2de8973a770c5d125de29654976b32bb66ea1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16777: Correct intranet search alias
Marcel de Rooy [Mon, 20 Jun 2016 12:57:25 +0000 (14:57 +0200)]
Bug 16777: Correct intranet search alias

A long-standing typo in our apache config files:
[intranet]/search refers to search.pl (which does not exist)

This patch refers it to catalogue/search.pl

Test plan:
Run an install or copy the change from apache-shared-intranet.conf or
koha-httpd.conf to your apache config. Restart Apache and check
if http://[your staff client]/search works.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested by making manual changes according to the patch. Did not test a
new installation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3fe6abc9d57fc1dc9968af0b25644f4cdb2289e0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 113aaae895c10faeddebd5bd41fd06c1ca8002c0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16701: Translatability: Fix problem with isolated ' in currency.tt
Marc Véron [Tue, 21 Jun 2016 07:08:06 +0000 (09:08 +0200)]
Bug 16701: Translatability: Fix problem with isolated ' in currency.tt

This patch moves markup <span class="ex"> into template variables to
avoid sentence splitting.

To test:
- Apply patch
- Verify that currency administration works as before
  (Home > Administration > Currencies & Exchange rates > Currencies)
- Examine code changes

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a83d75b6f2d59c3c2ac8d1b549b364fa79f52efe)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 538535ba7deb871d252b1afaf2ee4cb515350b98)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16621: Translatability: Issues in opac-user.tt (sentence splitting)
Marc Véron [Fri, 10 Jun 2016 08:25:54 +0000 (10:25 +0200)]
Bug 16621: Translatability: Issues in opac-user.tt (sentence splitting)

This patch fixes issues due to sentence splitting in
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt

Note: This is a string patch. It does not add or change functionallity.

To test:
- Examine code and verify that the text changes remove sentence splitting
  and that the changes make sense.
- Log in to OPAC and verify that messages look correct
  - with blocked /debarred user (with and without comment and date)
  - with user who has to much fines (needs syspref OpacRenewalAllowed
    and syspref OPACFineNoRenewals)
  - with user who has his card marked as lost
  - with user with an account that is about to expire
  - with user with expired account
  - with user with uncertain address information (with and without
    syspref OPACPatronDetails set to Allow)

Note: Amended to make patch apply 2016-07-10 mv
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 dc1ff4efff70cabfad5b8e2e69e7a9448cc61e16)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1c9e281e3981f965d61070644d14456a3a5f630c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16897 - Re-focus on "Add item" in Lists
Fridolin Somers [Mon, 11 Jul 2016 14:31:18 +0000 (16:31 +0200)]
Bug 16897 - Re-focus on "Add item" in Lists

Bug 11325 add solved a focus on "Add item" missing in Lists page.
Since revamping of this page, the add item form exists both in page.
The one corrected by Bug 11325 is not visible because it checks a bad
var allowaddingitem instead of can_add_biblios.

This patch removes the first form and corrects the second form.
It moves the form at left part of page so that it is always shown
(usefull when there are a lot of items). It does not add the list name
after "Add item" besause it whould be huggly for long names and because
listname already exists in breadscrumbs and on top of the table.
It also adds autocomplete="off" on barcode input because there can be
problems with a scanning device.

Test instructions:
1. Create a list
2. Make sure you have an object with an assigned barcode
3. Go to the list
   => The barcode entry interface should be at left and has the focus
4. Enter the barcode and press enter (or use a scanner)
   => The item is added to the list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This is a nice improvement, thanks!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fcf2e1325e6cf056b5b7e5e95545adcd322d1b52)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 723711ba9d512349dcbfabab609d0dc9a7a79dfd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16893 - Missing closing tag disrupts patron checkouts page style
Katrin Fischer [Mon, 11 Jul 2016 20:56:11 +0000 (22:56 +0200)]
Bug 16893 - Missing closing tag disrupts patron checkouts page style

Same fix as for the details page: checkouts page is very italic
when there is a restriction with a comment on the patron
account.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 93aff1fe37f7a9142958f11b45cfbcb62d646f62)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1151773c56ca620f231e484ec62066088aeb9d71)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16893: Missing closing tag disrupts patron detail page style
Owen Leonard [Mon, 11 Jul 2016 12:51:12 +0000 (08:51 -0400)]
Bug 16893: Missing closing tag disrupts patron detail page style

A missing closing </i> causes the the patron detail page to be in all
italics if the patron has a restriction message. This patch corrects it.

To test, apply the patch and locate a patron who has a restriction
message. The restriction message should be in italics but the rest of
the page should display normally.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Rest of the page displayed normally

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 27a7cdef1a6187fe7814a75e4fc5cee636ed77fa)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6ba7acf4e0b199a5d043b1e8b762741a41860d63)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16813: Allow empty string for OPACBaseURL
Jonathan Druart [Mon, 27 Jun 2016 12:32:31 +0000 (13:32 +0100)]
Bug 16813: Allow empty string for OPACBaseURL

The pref is prefixed by 'http://', but it should not when the pref is
set to an empty string.
This will fix the bug raised on bug 14790 comment 14.

Test plan:
Empty OPACBaseURL and confirm that it's save as it in DB

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
OPACBaseURL is saved up empty. Prefix http:// is not saved anymore

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e9b6a5e31e1bc225a6e620dcefbd9545bb6d98bf)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4fa7e90b0e650cd5e9e33a708b89052238197f30)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14138: Patroncard: Warn user if PDF creation fails
Marc Véron [Tue, 5 Jul 2016 17:23:59 +0000 (19:23 +0200)]
Bug 14138: Patroncard: Warn user if PDF creation fails

Change patroncards/create-pdf.pl to redirect with an error message
instead of writing an invalid pdf that does not open in pdf viewer.

To test:
- Apply patch

- Test that pdf creator behaves as before (with valid batches and
  patron lists)

- While testing, copy pdf link address from window with title 'Click
  the following link(s) to download...'

- Open another staff client browser tab

- Paste link to browser address field, change batch id rsp. patron
  list id to an invalid value and submit

- The window should redirect to cgi-bin/koha/patroncards/create-pdf.pl
  and display an error message

- Bonus test 1: Create an empty patron list and test patron card
  creation. You should get an error message as appropriate.

- Bonus test 2: Use a link with params like the following:
  ...create-pdf.pl?borrower_number=61&template_id=2&layout_id=1&start_card=1
  Verify that you can create a pdf with a valid borrower_number and that
  you get the error message with an invalid borrower number

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 b51f2baa7c1035657594f90d17c7c9eeedf4ea84)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5de1b336da5d0acdd589cacbf11abc9f8b35692e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16682: (followup) Fix display if Batch patron modification tool does not get...
Marc Véron [Tue, 5 Jul 2016 22:27:30 +0000 (00:27 +0200)]
Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons

Format message as proposed in comment #8

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5a1f3acaabf235733a3e7a98d16d0395df1980b8)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c27ba3c7bd41f51a9da871db47b93fa6c4ad60a0)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16682: Fix display if Batch patron modification tool does not get any patrons
Marc Véron [Tue, 5 Jul 2016 00:10:55 +0000 (02:10 +0200)]
Bug 16682: Fix display if Batch patron modification tool does not get any patrons

To reproduce:
- Go to Tools->Batch patron modification
- Submit without filling any of  "Use a file", "Or use a patron list",
  "Or list card numbers..." or use a patron lists with zero members
Result: Screen without any information

To test:
- Apply patch
- Repeat steps above
- Verify that you get a nice message
- Verify that the tool works as before
  - with invalid card numbers only
  - with valid and invalid card numbers
  - with valid card numbers only

Signed-off-by: Srdjan <srdjan@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 c0d420f42a293e68228bbe7fa95545a08fd2c964)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 36ffbb193fb8b2374a60b9acee8ca55ff5a7ea81)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006: Update DB rev (3.22.09.001)
Frédéric Demians [Mon, 1 Aug 2016 11:29:32 +0000 (13:29 +0200)]
Bug 15006: Update DB rev (3.22.09.001)

8 years agoBug 15006: [QA Follow-up] Only handle login requests in raw_transport
Marcel de Rooy [Wed, 13 Jul 2016 09:59:28 +0000 (11:59 +0200)]
Bug 15006: [QA Follow-up] Only handle login requests in raw_transport

Although mainly hypothetical, it would still be possible to get
response from the server for an acs resend request. (This exception
is allowed in MsgType::handle.)
I also noticed that the response may well be a message from an older
session still.
This patch just removes that exception by only passing login requests
to sub handle in the raw_transport loop.

Test plan:
[1] Verify normal login procedure for raw.
[2] Check a few acs resend requests in raw. They should terminate without
    a response.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e465d1aa4b16d7392950b2b682f99eb0c58c1ffd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a0a0e057c0620a49246d0b5c55a6013b1f664780)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006: [QA Follow-up] Satisfy qa tools with one tab less
Marcel de Rooy [Tue, 12 Jul 2016 13:48:34 +0000 (15:48 +0200)]
Bug 15006: [QA Follow-up] Satisfy qa tools with one tab less

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 64fe6e350074db48cf337dcf1794b40a58d7e606)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit aee5ba06949551ec789e5d95a41f8f224b2ae295)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006 Correct indentation of EXPORTs in Sip.pm
Colin Campbell [Wed, 6 Jul 2016 14:25:21 +0000 (15:25 +0100)]
Bug 15006 Correct indentation of EXPORTs in Sip.pm

Removed tabs and used spaces consistently
Used 'use base' to remove unnecessary BEGIN sub and
explicit setting of ISA at application level

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4ad4ab6396af26bed9dceb442adf4aad6687f362)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ad235daaa74193947a328f96ed35d43aa0ec6663)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006: Centralize timeout logic and allow zero client timeout
Marcel de Rooy [Wed, 6 Jul 2016 14:14:45 +0000 (15:14 +0100)]
Bug 15006: Centralize timeout logic and allow zero client timeout

Moving timeout logic to one routine (with unit test).

This further implements two suggestions from Kyle and Larry:

[1] You could use a client_timeout of 0 to specify no timeout at all.
[2] Have the client_timeout default to the timeout if not defined.

Test plan:
[1] Run t/db_dependent/SIP/SIPServer.t.
[2] Test login timeout for raw and telnet.
[3] Check ACS status message for timeout value. Should match policy
    timeout from institution.
[4] Test client timeout (zero and non-zero).
[5] Remove client timeout. Test fallback to service.
[6] Remove service timeout too. Test fallback to 30 at login.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended to incorporate Srdjan's suggestion to move get_timeout to
SIPServer.pm; this requires some additional mocking in the unit test.
And even makes the test db dependent, as documented.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eb8666357ce72e910569843f8acce674a332f4b0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e8a03065affb09718d16781a8beecfa262497639)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006: Introduce client_timeout in SIPconfig.xml
Colin Campbell [Fri, 20 Nov 2015 12:12:48 +0000 (12:12 +0000)]
Bug 15006: Introduce client_timeout in SIPconfig.xml

Most selfchecks have persistent connections and send a
periodic status request at intervals (approx every 5mins appears
the norm) The timeout was dropping connections by default every 30secs
which for the client appears as a very flakey network.

This patch adds a separate parameter client_timeout that can be
used if you do want to force a disconnect if the client sends
no requests for a period. The sample config sets it to 600, but you
can also define a 0 value meaning no timeout. If the parameter is not
defined, it will fallback to service timeout.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Restored this patch from Colin in order to separate it from the
get_timeout patch. Adjusted the commit message slightly.
The original value of 600 from Colin's earlier patch may give less
discussion than setting to 0 (no timeout) in a later proposal.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b27da7e0ce25c806612743100609255ace48257c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d477ba8b0621fae9c847ef4e84d685ef396b3258)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006 Remove tabs from sip_protocol_loop
Colin Campbell [Tue, 5 Jul 2016 09:36:31 +0000 (10:36 +0100)]
Bug 15006 Remove tabs from sip_protocol_loop

Remove the tabs causing inconsistent indentation
of sip_protocol_loop and replace with spaces

Reimplements the renaining parts of Marcel de Rooy's
original QA patch

No logic changes in this patch - layout only

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2b725b6728ea4156562aa6225b2323861f616885)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f5995e7ae9d66ce492d8314d087bf0d4f39c668a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15006 Drop raw connection if login fails
Colin Campbell [Mon, 4 Jul 2016 15:13:16 +0000 (16:13 +0100)]
Bug 15006 Drop raw connection if login fails

raw_connection was not behaving correctly if an invalid string was
passed or a login failed.
It was not checking that the login succeeded ( it checked that account
existed not that it contained data and it existed even if login failed)
and so failed logins instead of aborting immediately fell through into
the sip_protocol_loop, forcing that to timeout invalid connections.
It now checks that account has id set and returns if not.

The timeout alarm is now set on the while loop, in normal running this
should not be triggered as the socket is opened and the first data
should be a login message and the while loop should only iterate once,
but lets not go into an infinite loop due to unforeseen circumstances.

I have reindented the routine as the flow was not clear (the while was
not indented at all.

Also if using Net::Server::PreFork when a new connection comes in you
may be handed the the successful login parameters from a preceding call.
Because of this you could successfully transmit transactions and Koha
would carry them out without having received a valid login ( and
possibly with the wrong account details!) We now delete any existing
account for new connections.

NB: This patch requires that the patch for bug 13807 has been applied

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4f0fd3db556652f961710c64b9806512a491a7d3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4c91e8777004392459371bb20db8599c8c5a2646)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12178: Fix tests not to depend on dateformat syspref
Jonathan Druart [Tue, 21 Jun 2016 11:31:40 +0000 (12:31 +0100)]
Bug 12178: Fix tests not to depend on dateformat syspref

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e75d9befca13c2f74706e5eb7874a27bdc1928f1)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 008f50fccb75945f7141660c36855b7b14550f33)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12178: Tests for changes to claimed serial status
Florent Mara [Tue, 24 May 2016 02:10:32 +0000 (14:10 +1200)]
Bug 12178: Tests for changes to claimed serial status

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Remove trailing spaces

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c765d105096ac8c0bc5afd51eb212db54c7901e0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a14999b7bdb745ccd18ea2ba719defa12fae8abd)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12178: Update serial status to "claimed" when exporting to CSV
Jonathan Druart [Tue, 28 Apr 2015 15:00:44 +0000 (17:00 +0200)]
Bug 12178: Update serial status to "claimed" when exporting to CSV

On the same way as late issues, the serial status should be updated to
'claimed' when the issues as exported as csv.

QA note: The updateClaim and UpdateClaimdateIssues subroutine did almost the
same thing, I kick the second on off to centralize the code.

Test plan:
1/ Export some late issues as CSV (serials/claims.pl).
2/ Refresh the page (the export does not do it) and confirm that the
status, the claim date and the claim count have been updated.
3/ Select some others issues, select a notice and send the notification.
Confirm that the behavior is the same.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b416ac16b5c67d902444041882c31a99e0525fa0)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d4b8efca308423c9abfc3a55b22df51f46396435)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 2735: Update opac.css
Jonathan Druart [Thu, 9 Jun 2016 15:42:27 +0000 (16:42 +0100)]
Bug 2735: Update opac.css

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 2735: Fix authority search pagination at the OPAC
Jonathan Druart [Thu, 9 Jun 2016 15:39:56 +0000 (16:39 +0100)]
Bug 2735: Fix authority search pagination at the OPAC

The authority search pagination displays only 15 pages, even when there
are more.
To fix that, this patch mimic the authorities-home.pl intranet script to
manage the pagination.

Test plan:
Without this patch, do some authority search and click on different
pages.
Apply this patch, redo the same search and make sure the same records
are displayed (i.e. confirm that the pagination still works as before).

Signed-off-by: Nicole C Engard <nengard@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 de2df0dfe85bc8ac33375ad5b436ac247c3875d6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 08efc656cfdf6f572890f27ff822b188dfadf178)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 13807 Rework main input loop in SIPServer
Colin Campbell [Fri, 6 Mar 2015 11:57:09 +0000 (11:57 +0000)]
Bug 13807 Rework main input loop in SIPServer

Debugging various problems in SIPServer and control of it, found it
could loop on unread buffers (e.g. the LF of a CRLF if it was only
expecting CR) making it unresponsive to signals.
Reworked the input loop with an eye to removing unnecessary whiles
and replacing the while(1) by a while( connection valid)
Enhanced the timeout code by wapping in an eval.
Moved the logic from SIP_read_packet into the server itself
Hopefully this makes the already baroque code easier to navigate
and it did seem the server was the logical place for this
Removed no longer iused SIP_read_packet from Sip.pm

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 94441be435d9be074fc0f93bbec2c2e9122a5d67)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0817cf906f39d5b564f917ac4a2f0372fa332c43)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16866: Catch warning t/db_dependent/Languages.t
Mark Tompsett [Wed, 6 Jul 2016 19:19:46 +0000 (15:19 -0400)]
Bug 16866: Catch warning t/db_dependent/Languages.t

TEST PLAN
---------
1) prove t/db_dependent/Languages.t
   -- noisy output
2) apply patch
3) prove t/db_dependent/Languages.t
   -- no noise
4) run koha qa test tools.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No noisy output

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 042e8cf24bf3de4192b4c7cf0ca4e5f1da6c3ce9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit f9b989e3dd0e6e1a6d92c34a3c325ec14b749231)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16805: Log in with database admin user breaks OPAC
Mark Tompsett [Thu, 23 Jun 2016 18:51:26 +0000 (14:51 -0400)]
Bug 16805: Log in with database admin user breaks OPAC

TEST PLAN
---------
1) Apply Jonathan's test patch
2) prove t/db_dependent/Letters.t
   -- dies before finishing tests
3) Apply second test patch
4) prove t/db_dependent/Letters.t
   -- dies before finishing tests
   -- 'addalert' is changed to 'getalert'
5) Log into OPAC with database admin user.
   -- see error given in comment #0
6) Apply this patch
7) prove t/db_dependent/Letters.t
   -- says 'getalert'
   -- all tests pass.
8) Log into OPAC with database admin user.
   -- logs in, but gives warning with a nice logout button.
9) run koha qa test tools.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No kaha qa errors
In debian display diferent error:
Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/DBI.pm line 2054.
Works as advertised

NOTE: Revised test plan, as Jonathan added useful test case.
      Works as I've tested above.
      Hector tested older test plan which was steps
      5,6,8 and 9.

      Revised test plan again while tweaking to address comment #9.

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 dee29d9f0b2b43bc762cb82a2212cd8a3d243f45)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e45ed6d2f477aa9a85750c0f7c2a4df1af50e94f)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16805: Tweak new test message to say getalert
Mark Tompsett [Fri, 24 Jun 2016 16:28:27 +0000 (12:28 -0400)]
Bug 16805: Tweak new test message to say getalert

It said 'addalert', which is likely a cut-paste typo.
Plus, let's keep running the other tests if that one
goes bad.

TEST PLAN
---------
1) Apply Jonathan's test patch
2) prove t/db_dependent/Letters.t
   -- dies before finishing tests
3) Apply this test patch
4) prove t/db_dependent/Letters.t
   -- still dies before finished tests,
      'addalert' now is 'getalert' in message.
5) run koha qa test tools.

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 c57655d4ad69f82831b7f1b54b31a69d0d8275ee)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 946764c470a767439d65b463a4db9b2fdb0b58c4)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16805: Add test to getalert (no param passed)
Jonathan Druart [Fri, 24 Jun 2016 16:02:59 +0000 (17:02 +0100)]
Bug 16805: Add test to getalert (no param passed)

TEST PLAN
---------
1) apply patch
2) prove t/db_dependent/Letters.t
   -- fails
3) run koha qa test tools

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 5821ff3867c5291558238e54686c6834caa266c6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a7dd3dcc3f565f18876f233cf8ade85cbc5b2d25)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16801 - Include Font Awesome Icons to check/unchek all in Administration > Librar...
Hector Castro [Wed, 22 Jun 2016 17:11:03 +0000 (11:11 -0600)]
Bug 16801 - Include Font Awesome Icons to check/unchek all in Administration > Library transfer limits

For purpose to uniformity and leave just one entry in .po files,
this patch change: Check all/Uncheck all -> to -> Select all/Clear all.
Also added Font Awesome icons.

To test:
-Go to Administration > Library transfer limits
-Notice about Check all/Uncheck all for "For all items types" and
 "Policy for:"
-Apply patch and refresh the screen
-Notice about the new Select all/Clear all links with their icons
-Confirm that all links work as expected

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c9bb9dc14064ddecf767145b7a2bb26794ca090e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e766a5eae9c6919bac7fe42d379c827a1a18e7f2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16730 - Use member-display-address-style*-includes in moremember-brief.tt
Marc Véron [Tue, 14 Jun 2016 06:41:03 +0000 (08:41 +0200)]
Bug 16730 - Use member-display-address-style*-includes in moremember-brief.tt

To test:
- Apply patch
- Create a new patron with the same first and last name as an existing
  patron. This should trigger a duplicate warning message. Click the
  "View existing record" link to trigger a pop-up window with a patron
  detail brief view.
- Verify that the address information displays the same way as on the
  patron details screen (moremember.pl).
- Change syspref 'AddressFormat' and verify that the address displays
  as appropriate.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Works as described: AddressFormat is taken into account on 'view exiting
  record' dialog box.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f542ce5a82a40b503b10c709b8b960ace2637f7d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a7e0bc97113b7ac8f08c417ccd4060f2067cf5fe)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16677 - Use abbr for authorities linked headings
Fridolin Somers [Tue, 7 Jun 2016 07:27:15 +0000 (09:27 +0200)]
Bug 16677 - Use abbr for authorities linked headings

In authorities search results, UNIMARC flavour, linked headings are displayed
with a link type : BT, NT, UF, RT.

This patch adds a abbr tag around those acronyms to know there meaning :
BT = Broader Term
NT = Narrower Term
UF = Used For
RT = Related Term

Acronyms are used because there can be a lot of linked headings, using abbr
will display the complete text on mouse over.

Test plan :

- Use UNIMARC database
- Create an authority with :
250 $a Heading250a
450 $a Heading450a
550 $5 a $a Heading550a
550 $5 g $a Heading550g
550 $5 h $a Heading550h
- Save an index zebraqueue
- Go to intranet authorities search
- Search for "Heading250a"
- You see :
Heading250a
Heading250a
UF: Heading450a
RT: Heading550a ; BT: Heading550g ; NT: Heading550h
- Move your mouse over the acronyms, you see a tip with the complete text
- Same with opac authorities search

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Works as described. Translatable.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b9e47f135e036232b00cd3b24bb25ea0c6a9291e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3471304666e1b1a9379ef5a423291af6909b6fe5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16860: Remove the comment about the warning
Jonathan Druart [Thu, 7 Jul 2016 15:52:10 +0000 (16:52 +0100)]
Bug 16860: Remove the comment about the warning

It is no longer necessary.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c19f342bb1a8eaae25db979e94dc23efa4bc8a26)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ee7af309a628b5ac4655ca7c53a9fa3ab50647d6)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16860: Catch warning t/db_dependent/ClassSource.t
Mark Tompsett [Wed, 6 Jul 2016 15:51:40 +0000 (11:51 -0400)]
Bug 16860: Catch warning t/db_dependent/ClassSource.t

$ prove t/db_dependent/ClassSource.t
t/db_dependent/ClassSource.t .. 3/24 attempting to use non-existent class sorting routine routine1
t/db_dependent/ClassSource.t .. ok
All tests successful.
Files=1, Tests=24,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.66 cusr  0.02 csys =  0.70 CPU)
Result: PASS

The above warning might be scary to those unfamiliar with the test.
Add a test to catch the warning.

TEST PLAN
---------
1) prove t/db_dependent/ClassSource.t
   -- as above
2) apply patch
3) prove t/db_dependent/ClassSource.t
   -- no message
4) prove -v t/db_dependent/ClassSource.t
   -- test 13 is the new test
5) run koha qa test tools

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b80318f1b7441328d818dfe67a4cb8cd345f585e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 756f75a0445b2e700d34b84dadde478fa7ddee83)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16857: Check on item.branches makes more sense
Jonathan Druart [Thu, 7 Jul 2016 15:40:47 +0000 (16:40 +0100)]
Bug 16857: Check on item.branches makes more sense

The test should be on the existence of the item.branches
method/attribute

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f38bcf5505e1196c3ae4d2e9d5df523bb07ef281)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 6a7fd3ecdc60b00252fa65cede5cde655312ec98)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16857 - patron-attr-types.tt: Get rid of warnings "Argument "" isn't numeric"
Marc Véron [Mon, 4 Jul 2016 09:37:33 +0000 (11:37 +0200)]
Bug 16857 - patron-attr-types.tt: Get rid of warnings "Argument "" isn't numeric"

To vrify:
- Go to Home > Administration > Patron attribute types
- Make sure you have some patron attribute types with no branches limitation
- For each attribute type you get a warning in intranet-error.log:
patron-attr-types.pl: Argument "" isn't numeric in numeric gt (>) at (...)/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt line 284.

To test:
- Appy patch
- Verify that warnings no longer appear in intranet-error.log

Signed-off-by: Srdjan <srdjan@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 abb7980004ad75de4a51d06815f5e98e1cbb0f6d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit dc6ea8d5c9bc3e4e8e859511ef151be4061d1be5)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16803: Add Font Awesome Icons to "Select/Clear all" links to shelves.tt
Hector Castro [Thu, 23 Jun 2016 16:35:24 +0000 (10:35 -0600)]
Bug 16803: Add Font Awesome Icons to "Select/Clear all" links to shelves.tt

Add Font Awesome Icons to "Select/Clear all" links to shelves.tt
(Public and private lists)

To test:
-Apply patch
-Go to More -> Lists
-Create some Public and Private Lists
-See the contents of the list and notice about the new icons in
 "Select/Clear  all"

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 3c80818f680278e595cf2a890b311db7866766a6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1d29e0488c2781e21b282f3ec4d61a7a4725bcdf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16779: Move road type after address in US style address formatting (main address)
Marc Véron [Mon, 20 Jun 2016 13:27:39 +0000 (15:27 +0200)]
Bug 16779: Move road type after address in US style address formatting (main address)

To verify:
- Create a patron with address, streettype, streetnumber defined
- Set syspref 'AddressFormat' to US style
- Go to patron's detail page (in staff client)
- In main address, road type preceeds address (e.g. 25 Drive Euclid)

To test:
- Apply patch
- Refrexh patron's detail page
- Verify that main address displays correctly (e.g. 25 Euclid Drive)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.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 eb77861750cb3a2720e4a3a8003d526fa7d61552)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a6c80d1a0f6f5277f5f5c9528072dadc5f05825e)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15929 - typo in explanation for MaxSearchResultsItemsPerRecordStatusCheck
Claire Gravely [Mon, 13 Jun 2016 22:25:03 +0000 (00:25 +0200)]
Bug 15929 - typo in explanation for MaxSearchResultsItemsPerRecordStatusCheck

There's a typo in the explanation for the new
MaxSearchResultsItemsPerRecordStatusCheck  sys pref that was added in 3.22.2.

"If a record has more than this number of items, they availability statuses
..."

I have re-worded the description so it reads a bit better.

Test plan:
1. Check the description for syspref MaxSearchResultsItemsPerRecordStatusCheck.
2. Apply patch
3. Check syspref MaxSearchResultsItemsPerRecordStatusCheck description
 to make sure it makes sense.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cae7e29cf27b3a751211dc71e1aeebe723153433)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ac83809da7b9109a60982acf23cf6bbf931b18ee)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t
Mark Tompsett [Thu, 7 Jul 2016 06:34:28 +0000 (02:34 -0400)]
Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t

By properly defining a opachtdocs (intranethtdocs was done too)
in the mock function, uninitialized variable warnings are
eliminated. Given that we can check if $KOHA_CONF is defined or
not, we can catch the warning as part of testing, so the output
of the test is cleaner.

TEST PLAN
---------
1) unset KOHA_CONF
2) prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- lots of noise
3) apply patch
4) prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- no noise
5) prove -v t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- see the warnings were caught and not just ignored.
6) run koha qa test tools

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5ec641fbbb67501e2a71be64b12c9224caee1b55)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5129b29b02f1b4f586a0c6bc943f8cea8f605619)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16774: Format date on 'Transfers to receive' page to dateformat system preference
Marc Véron [Sun, 19 Jun 2016 15:43:19 +0000 (17:43 +0200)]
Bug 16774: Format date on 'Transfers to receive' page to dateformat system preference

To test:
- Apply patch
- Go to Home > Circulation > Transfers to receive
- Verify that in title (Transfer made to your library as of...) is
  is formatted as defined in syspref dateformat

Additionaly, the patch changes page title and breadcrumb from:
Home > Circulation > Transfers to your library
to:
Home > Circulation > Transfers to receive
...to make them consistent with the link text on the Circulation home page
   (Transfers to receive)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11dc97cfae96676ff1cc242e8a43ad513c36c6ef)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 82bbaf5212a0095008ce82d92bcac04839015ef2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 15636 - DataTables Warning: Requested unknown parameter from opac-detail.tt
Bouzid Fergani [Tue, 12 Apr 2016 13:27:18 +0000 (09:27 -0400)]
Bug 15636 - DataTables Warning: Requested unknown parameter from opac-detail.tt

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the same tests in the aoColumns DT definition than the
ones in the creation of the table. That's sound good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a12d3d1bfa00499a0b16d39f01136050de537449)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 57a727afa5b4a8fa9f7a8d4e4257c7e172ed1f6d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16859: Fix wrong item field name in export.pl
Marcel de Rooy [Wed, 6 Jul 2016 13:52:54 +0000 (15:52 +0200)]
Bug 16859: Fix wrong item field name in export.pl

Field callnumber should be itemcallnumber.
For completeness, prefixing the joined fields with items table prefix.

Note: You should expect Tools/Export to export only the items within a
given itemcallnumber range, but if the biblio has one item in that
range, the biblionumber is selected for export with ALL items. The script
is designed that way (first select biblio numbers based on criteria, and
run export with those biblio numbers).

Test plan:
[1] Select a biblio N with one item with say itemcallnumber X.
[2] Goto Tools/Export. Select biblio range N,N and no itemcallnumber
    range. The biblio should be exported.
[3] Select biblio range N,N and itemcallnumber range A,B. No output.
[4] Select biblio range N,N and itemcallnumber range A,<empty>. Output.
[5] Select biblio range N,N and itemcallnumber range <empty>,X. Output.

Signed-off-by: Srdjan <srdjan@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 00960f196482bb8dda3ddac8d9361ca1ffc5af93)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 58de933e0301451bbe3af107ee1359f72b15e286)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16855 - Poor performance due to high overhead of SQL call in export.pl
Nick Clemens [Tue, 5 Jul 2016 18:49:35 +0000 (14:49 -0400)]
Bug 16855 - Poor performance due to high overhead of SQL call in export.pl

This patch eliminates all columns retrieved in the biblioitems query
except for biblionumber.

To test:
1 - Go to tools->Export data
2 - Export using various filters and note you get expected records
3 - Apply patch
4 - Ensure exported results match results before patch

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a44bb07b88ba9d5049a64f88610a8bb8e82efe3a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0b40c96d2d7bb6e7f550698713fd4db7e6939960)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16854: request.tt: Logic to display messages broken
Marc Véron [Mon, 4 Jul 2016 01:48:40 +0000 (03:48 +0200)]
Bug 16854: request.tt: Logic to display messages broken

This patch fixes broken logic in
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt

To verify, see initial comment.

To test:
- Apply patch
- Have a patron with a restricion and with outstanding fines
  greater than defined in syspref 'maxoutstanding'
- Place a hold for this patron and verify, that messages
  'Patron has restrictions' and 'Patron has outstanding fines...'
  appear

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.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 44092cbafd1641ef865497183b8368db83bb62a7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e9840ac7956c4a8028575daab41303bc34457e0a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16780 - Specify due date always sets time as AM when using 12 hour time format
Kyle M Hall [Fri, 24 Jun 2016 10:35:25 +0000 (10:35 +0000)]
Bug 16780 - Specify due date always sets time as AM when using 12 hour time format

This regression is occurs because the time format for the checkout
date/time widget is only meant to be given in 24 hour format. The time
due should not be converted to 12 hr time even if the library has 12
hour set as their preferred time format.

Test Plan:
1) Performat a backdated checkout with a date due that has a PM time
2) Note the date/time picker on the confirmition screen shows the time
   in AM/PM
2) Note the time is not stored correctly
3) Apply this patch
4) Repeate step 1
5) Note the confirmation date/time picker now show the time in 24hr
   format
6) Note the time was stored correctly

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7c89f78f3bef1cdebb51dcb41fdda7a8dc252b94)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit e0b29cea2ac3f32a8e1322ab680a0bcb513725a8)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16762: Record matching rules: Remove match check link removes too much
Owen Leonard [Fri, 17 Jun 2016 15:33:41 +0000 (11:33 -0400)]
Bug 16762: Record matching rules: Remove match check link removes too much

My patch for Bug 5006 introduced a lot of markup changes to the record
matching rules template. I missed a change in one are though, which
caused a bug with the way the 'Remove match check' link works.

To reproduce:

- Go to Administration -> Record matching rules.
- Edit a matching rule which includes at least one match check.
- Click a 'Remove match check' link. The entire "Required match checks"
  block is removed.

To test, apply the patch and repeat the steps above. Clicking any
'Remove match check' link should remove only the corresponding rule.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ffcb360321f6abe111c3352606b4c641ac48950a)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 071ce5aa26f362c017ced445320b9afcb1c8ee88)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16760: fix Circulation Statistics wizard under Plack
Galen Charlton [Tue, 5 Jul 2016 16:22:39 +0000 (16:22 +0000)]
Bug 16760: fix Circulation Statistics wizard under Plack

This patch fixes some variable scoping problems when running
the circulation statistics wizard under Plack.  For example,
when using the item type as a row header, with this patch the
item type description is displayed rather than "UKNOWN VALUE".

This patch also enables warnings and fixes a couple variable
initialization issues. (Note that turning on warnings across
the board would make it easier to identify Plack variable scoping
issues, as "Variable "$foo" is not available at' errors would
be recorded in the Plack error log).

To test
-------
[1] Run the staff interface under Plack.
[2] Go to the Circulation Statistics Wizard and run a report
    using item type as the row. Note that the row labels
    display as "UNKNOWN VALUE" rather than the item type.
[3] Apply the patch and restart Plack.
[4] Run step #2 again; this time, the item type descriptions should
    be used as the row labels.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
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 8ca55a7fb37ac50103de978f82408776fc06b7bb)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 01b0fe1aa85364611b93eafd7f30a2665a228e3c)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16459: Add patron to a patron card requires catalogue permission
Jonathan Druart [Fri, 6 May 2016 14:55:31 +0000 (15:55 +0100)]
Bug 16459: Add patron to a patron card requires catalogue permission

Currently, serials => 'routing' is required, which does not make any
sense.
It's a copy/paste error when this file has been created (you can blame
me).

Note that I am not sure catalogue is the correct permission, but it's
the one used almost everywhere in this module

Test plan:
Confirm that catalogue is enough to search for patrons to add to a
patron card.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3bb51d038639c7b197022a2c7c6ae864c834060f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 7c68f51d13499992c634775d5407ced89cc69a5b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14968 - Provides unit test
Alex Arnaud [Wed, 15 Jun 2016 14:11:07 +0000 (16:11 +0200)]
Bug 14968 - Provides unit test

Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1509322c9a813809ca453b476ea1163bbc9303ca)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit ca08a21e4e8f3a24e636a47eddfab464352b6418)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 14968 - found shouldn't be set to null when cancelling holds
Lyon3 Team [Tue, 6 Oct 2015 13:42:15 +0000 (15:42 +0200)]
Bug 14968 - found shouldn't be set to null when cancelling holds

Signed-off-by: JM Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 83328c1061af0ae82d8a2086e298375875e2dfa9)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 3bed66a3e2a9d9eafe69a19442e34413b4e9a399)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 12509 - Fix Untranslatable Restriction added by overdues process
Morgane Alonso [Mon, 6 Jun 2016 12:24:56 +0000 (12:24 +0000)]
Bug 12509 - Fix Untranslatable Restriction added by overdues process

Changes the value of the "comment" column in "borrower_debarments" table
from "Restriction added by overdues process yyyy-mm-dd hh:mm:ss" to
"OVERDUE_PROCESS yyyy-mm-dd hh:mm:ss" in the overdue_notices.pl. Then in
the templates "moremember.tt", "circulation.tt", "memberentrygen.tt",
"opac-reserve.tt" and "opac-user.tt" the value of "comment" is
check, if it's an automatical comment due to overdue process it'll
write "Restriction added by overdues process yyyy-mm-dd hh:mm:ss",
then if there is a customizable comment it will be written without
modification. Like this, the comment "Restriction added by overdues
process" is written in the po files and can be translated later.

To test:
1) create a patron with automatical restriction due to overdue process;
2) apply patch;
3) run misc/cronjobs/overdue_notices.pl;
4) verify if the comment "Restriction added by overdues process" is well
   written and translatable on the following page :
    - opac patron home page (opac-user.tt);
    - opac item reservation page (opac-reserve.tt);
    - pro patron page (moremember.tt);
    - reservation item for a patron (circulation.tt, memberentrygen.tt);
5) try to translate the comment in po files;
6) sign off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a1285ba9c0f9a7020ba5f6e982dd2a5891ab9f63)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 17156342e629cea984c1ff411fc38a6b33512a42)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16772 - Change label from 'For:' to 'Library:' to ease translation
Marc Véron [Sun, 19 Jun 2016 16:10:06 +0000 (18:10 +0200)]
Bug 16772 - Change label from 'For:' to 'Library:' to ease translation

This patch changes the label from "For:" to "Library:" in the
acquisition information filter on the suggestions page in staff client.

To test:
- Apply patch
- Go to Home > Acquisitions > Suggestions management
- Verify that label reads as appropriate (in filter
  Acquisition information)

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 4747e6155efc9902003ae3ae4c14535fc7ece015)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 79744a3989e2e9bed9f06c2a0828524f8cb49115)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16770: Remove 2 other occurrences of libmemoize-memcached-perl
Jonathan Druart [Tue, 21 Jun 2016 11:36:38 +0000 (12:36 +0100)]
Bug 16770: Remove 2 other occurrences of libmemoize-memcached-perl

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 735789d71aa802385b282c79edad43d2a6fb58d6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 927498a007fe076feacfddefafc07e9cdbb8827d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16770: Remove Memoize::Memcached dependency
Jonathan Druart [Sat, 18 Jun 2016 14:22:35 +0000 (15:22 +0100)]
Bug 16770: Remove Memoize::Memcached dependency

This module is no longer in use and can be removed.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
This part involves some changes in a bunch of mysterious debian|ubuntu
related files, not quite sure if I know what I'm doing
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 67e6efab5d2da2c55d138153060c70cba342db7e)
(cherry picked from commit 998ea5d57a2311d63d53e13879e4194a141d4199)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages
Jonathan Druart [Sat, 18 Jun 2016 14:21:28 +0000 (15:21 +0100)]
Bug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages

Looking at this code, you might think these subroutines are cached, but
actually they are not.

The eval surrounding the code hides a bug, if you remove it, you will
get:
  Invalid memcached argument (expected a hash)

Test plan:
Do not apply this patch and confirm that the code does not work

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 44fb6e72254391d38b7a66fa395bb9874a6d716c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 0a09cb7d09e3dabd983d137dd7f86e08525a75fa)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16651: Notes field blank for 952$z in opac-course-details.pl
Nick Clemens [Mon, 6 Jun 2016 15:28:39 +0000 (11:28 -0400)]
Bug 16651: Notes field blank for 952$z in opac-course-details.pl

This patch changes course reserves to check for item notes form the
course reserve and fallback to itemlevel notes if they are empty

To test:
1 - Enabvle course reserves
2 - Add some items
3 - Make sure the items have notes at the item level and not at course
reserves
4 - Notes don't display in staff or opac
5 - Apply patch
6 - Notes display in staff and opac
7 - Add notes at course reserves level
8 - These override the item level notes

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 62508428cdf3a4c3da975ef5f88c8ece9cf50537)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit d09b015e973c799cc392327484f3cc485a60ece2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16751: What is sitemaper?
Marcel de Rooy [Thu, 16 Jun 2016 11:03:30 +0000 (13:03 +0200)]
Bug 16751: What is sitemaper?

s/sitemaper/sitemapper/

Test plan:
Run t/db_dependent/Sitemapper.t

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 3e566de51fe6f2e966158f97682f9a5aaecab974)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1db9defdec44a7dd2e1af9f3486b8cfed4e132b7)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
8 years agoBug 16718 - Translatability: Fix problems with sentence splitting by <strong> in...
Marc Véron [Mon, 13 Jun 2016 12:21:47 +0000 (14:21 +0200)]
Bug 16718 - Translatability: Fix problems with sentence splitting by <strong> in about.tt

This patch removes sentence splitting by <strong> tags in
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt for better translatability.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0712048030c44ba731780916935f6d9d352d4c0b)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 992ac84f3e10d6f9bd54dc125eac75364e3c78de)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>