]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoBug 11166: make library filter in funds administration page more precise
Fridolyn SOMERS [Wed, 30 Oct 2013 09:28:49 +0000 (10:28 +0100)]
Bug 11166: make library filter in funds administration page more precise

In funds administration, admin/aqbudgets.pl, there is a combobox for
filtering by library code.

The bug is that the filter uses a pattern match  instead of equals :
  next unless $budget->{budget_branchcode} =~ m/$filter_budgetbranch/;

In this case, if there is a library with code '1' and one with code '12',
filtering by library '1' will also show funds of library '12'.

Test plan :
- Create a library with code '1' and one with code '12'
- Create funds in both libraries
- Go to admin/aqbudgets.pl
- Filter by branch '12'
=> You see only funds of this library
- Filter by branch '1'
=> You see only funds of this library

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 484d1490925d736f99a430a6933c96e42ea4e768)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10626: (follow-up) replace use of KohaAuthorisedValues in the Bootstrap theme
Galen Charlton [Fri, 20 Dec 2013 04:22:20 +0000 (04:22 +0000)]
Bug 10626: (follow-up) replace use of KohaAuthorisedValues in the Bootstrap theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e334aed702634b8c73aa28c467b585202c7ab117)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc

10 years agoBug 10626: (follow-up) remove final invocation of KohaAuthorisedValues
Katrin Fischer [Sat, 7 Sep 2013 17:43:57 +0000 (19:43 +0200)]
Bug 10626: (follow-up) remove final invocation of KohaAuthorisedValues

Removes USE KohaAuthorisedValues plugin from
item-status-schema-org.inc as it does not seem to be used
in the file.

Couldn't detect regressions removing it on OPAC detail page.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0c19c582187f59eda19b2b97865d0d5a3b13a8dd)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10626: (follow-up) replace an instance of KohaAuthorisedValues
Kyle M Hall [Tue, 27 Aug 2013 17:12:11 +0000 (13:12 -0400)]
Bug 10626: (follow-up) replace an instance of KohaAuthorisedValues

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Trying to write my own test plan here:

1) AllowNotForLoanOverride = Allow
   Mark single item not for loan and try to check it out.
   Check item not for loan status shows up correctly in message:
   Item is normally not for loan (Staff Collection). Check out anyway?

2) Toggle AllowNotForLoanOverride = Not Allow
   Try to check out your not for loan item again.
   Message has changed, but not for loan status should still show:
   Item not for loan (Staff Collection).

3) Check out item that is marked damaged.
   Check damaged status shows correctly in list of checkouts.

4) Mark item as lost and check it out.
   Check lost status shows up correctly in message:
   This item has been lost with a status of "Lange überfällig (Verloren)".

5) Create your own custom SUGGEST_STATUS and check that it shows
   up correctly on the suggestion page.

6) Test item status show up correctly on OPAC detail page (lost, not
   for loan, damaged, etc). Requires follow-up patch to be applied.

7) Mark a suggestion with your custom status and make sure it shows
   up in the patron account in OPAC correctly.

Passes tests and QA script - needs a follow up for item-status-schema-org.inc.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0958ec11ce00a6274e8257ddb5cd2f2539b9069a)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10626: Remove doubled up TT plugins - Merge KohaAuthorisedValues and AuthorisedValues
Kyle M Hall [Thu, 19 Dec 2013 17:13:23 +0000 (12:13 -0500)]
Bug 10626: Remove doubled up TT plugins - Merge KohaAuthorisedValues and AuthorisedValues

This patch removes the KohaAuthorisedValues TT plugin; uses of it are
replaced by the AuthorisedValues plugin, which does the same thing.

Test Plan:
1) Apply this patch
2) View the pages that this patch has modified, make sure the branch
   name is still visible

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b5b3d4c403f3df91578a3d49ed15811cd1386e52)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10626: (follow-up) replace another use of KohaBranchName
Kyle M Hall [Tue, 27 Aug 2013 17:14:12 +0000 (13:14 -0400)]
Bug 10626: (follow-up) replace another use of KohaBranchName

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
To test:
Make sure
- independentbranches is turned on
- Your user doesn't have superlibrarian permission
Then
- Try to check out an item with home and holding branch !=
  logged in branch

Patch works alright.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a7bb58b1daf5edc47581f17b3dfef1e7beac601)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10626 - Remove doubled up TT plugins - Merge KohaBranchName and Branches
Kyle M Hall [Tue, 23 Jul 2013 13:52:08 +0000 (09:52 -0400)]
Bug 10626 - Remove doubled up TT plugins - Merge KohaBranchName and Branches

Looking at the TT plugin directory I notice we have some plugins that
seem to do the same thing:

KohaBranchName.pm
Branches.pm

This patch drops KohaBranchName in favor of Branches

Test Plan:
1) Apply this patch
2) View a basket group, note the branch name is displayed
3) View a subscription's details, note the branch name is displayed
4) View suggestions, note the branch names are displayed
5) Return an item that needs transfered, note the branch name is displayed
6) Run 'prove t/db_dependent/Koha_template_plugin_Branches.t'

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested with a branch name with umlauts.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6000bfdf87db3f7f43feb21efd3cac8b7de9c048)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: (follow-up) update the POD for C4::Serials::SearchSubscriptions
Galen Charlton [Sat, 14 Dec 2013 00:33:25 +0000 (00:33 +0000)]
Bug 10852: (follow-up) update the POD for C4::Serials::SearchSubscriptions

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 945dbfc490e7bc8849f7b5f741856131c765cc75)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: (follow-up) regression tests
Galen Charlton [Sat, 14 Dec 2013 00:24:06 +0000 (00:24 +0000)]
Bug 10852: (follow-up) regression tests

This patch adds regression tests for the changes to
C4::Serials::SearchSubscriptions().

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 659ac6a904dbfe9c5e535963a4717fd183ffb7e6)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: (follow-up) fix POD for C4::Serials::NewSubscription
Galen Charlton [Sat, 14 Dec 2013 00:21:48 +0000 (00:21 +0000)]
Bug 10852: (follow-up) fix POD for C4::Serials::NewSubscription

The error in the POD was discovered in the course of writing
test cases for the main patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8a5ce95916fad6f73b8d5be2908ead65b78a7f2f)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: (follow-up) tweak wording of serials search form
Galen Charlton [Sat, 14 Dec 2013 00:10:46 +0000 (00:10 +0000)]
Bug 10852: (follow-up) tweak wording of serials search form

* "Callnumber" => "Call number"
* "Expire before" => "Expires before"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c88d7d831877895cc74c5bf90730530a65cc9f98)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: (follow-up) switch from KohaAuthorisedValues to AuthorisedValues
Kyle M Hall [Fri, 13 Dec 2013 20:34:17 +0000 (15:34 -0500)]
Bug 10852: (follow-up) switch from KohaAuthorisedValues to AuthorisedValues

Bug 10626 will remove the KohaAuthorisedValues plugin and keep the
AuthorisedValues plugin.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 28e4a4a69946c3e30c054467ca3465e835841aac)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: (follow-up) rename the "expiration date" filter name
Jonathan Druart [Wed, 4 Dec 2013 13:42:22 +0000 (14:42 +0100)]
Bug 10852: (follow-up) rename the "expiration date" filter name

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d20489c874fb62415ad0aa9489aa07817d5a7091)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10852: serials search improvements
Jonathan Druart [Tue, 20 Aug 2013 13:06:08 +0000 (15:06 +0200)]
Bug 10852: serials search improvements

This patch adds 3 filters for the serials search:
- location
- callnumber
- expiration date

To test:
- Search serials by location and/or callnumber and/or expiration date
  and check that results are consistent.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4651bbff213996c3c1e9364855de02de568596f4)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoRevert "Bug 8230: Display acquisition details on the catalogue detail page"
Fridolin SOMERS [Mon, 30 Dec 2013 08:49:01 +0000 (09:49 +0100)]
Revert "Bug 8230: Display acquisition details on the catalogue detail page"

This reverts commit 72aad868b2385d60ec59cab045aeda133a233435.

10 years agoRevert "Bug 8230: (follow-up) reflect the fact that order statuses are now alphabetic...
Fridolin SOMERS [Mon, 30 Dec 2013 08:48:52 +0000 (09:48 +0100)]
Revert "Bug 8230: (follow-up) reflect the fact that order statuses are now alphabetic codes"

This reverts commit a2a87e04e20e98374225de87a84c5db6043f1f55.

10 years agoRevert "Bug 8230: DBrev 3.14.01.002"
Fridolin SOMERS [Mon, 30 Dec 2013 08:48:42 +0000 (09:48 +0100)]
Revert "Bug 8230: DBrev 3.14.01.002"

This reverts commit 7870c0d8fe715fabc5dd7df87337f2300dedcc1b.

10 years agoRevert "Bug 8230: (follow-up) don't link to basket unless user has appropriate permis...
Fridolin SOMERS [Mon, 30 Dec 2013 08:48:33 +0000 (09:48 +0100)]
Revert "Bug 8230: (follow-up) don't link to basket unless user has appropriate permissions"

This reverts commit ca75ea2959988b2fbc831b77c0c9bdc7aadaea75.

10 years agoRevert "Bug 8230: (follow-up) fix detection of cancelled orders"
Fridolin SOMERS [Mon, 30 Dec 2013 08:48:21 +0000 (09:48 +0100)]
Revert "Bug 8230: (follow-up) fix detection of cancelled orders"

This reverts commit 0929a7e2b6625de40c560619a68ec91c1615852a.

10 years agoRevert "Bug 8230: (follow-up) repair regression on order search"
Fridolin SOMERS [Mon, 30 Dec 2013 08:48:11 +0000 (09:48 +0100)]
Revert "Bug 8230: (follow-up) repair regression on order search"

This reverts commit 896a62b43b3556e49fdff2fd941f122e75e85f28.

10 years agoRevert "Bug 8230: (follow-up) update POD for C4::Acquisition::GetHistory"
Fridolin SOMERS [Mon, 30 Dec 2013 08:47:58 +0000 (09:47 +0100)]
Revert "Bug 8230: (follow-up) update POD for C4::Acquisition::GetHistory"

This reverts commit 303cad8f1fa1fc633be0d0ae79e4f830462d343e.

10 years agoBug 11414: warn user about dangerous MARC modification rules
Jonathan Druart [Wed, 18 Dec 2013 11:18:52 +0000 (12:18 +0100)]
Bug 11414: warn user about dangerous MARC modification rules

Test plan:
On the MARC modification tool:

Add/edit a new action on a field and define a condition on the same
field.

Verify that you get a warning message in red.

See bug 11413 for more information

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested adding and editing a template with the same field in the
action and the condition.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7137ee91e0a9c5278d15c116612c62d2c2bd1926)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: (follow-up) update POD for C4::Acquisition::GetHistory
Galen Charlton [Fri, 13 Dec 2013 23:51:18 +0000 (23:51 +0000)]
Bug 8230: (follow-up) update POD for C4::Acquisition::GetHistory

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bfc0a2cb812636c5eb9cc10e3cf5bfba8eee8e61)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: (follow-up) repair regression on order search
Galen Charlton [Fri, 13 Dec 2013 23:42:26 +0000 (23:42 +0000)]
Bug 8230: (follow-up) repair regression on order search

This patch repairs a regression introduced by the main
patch where it became impossible to search for cancelled
orders from the advanced order search form.

This patch also tweaks the wording on the order status
drop-down on the order search form to clarify that the
default status filter is orders that have any status
except cancelled.

To test:

[1] Before applying this patch, perform an advanced
    order search (acqui/histsearch.pl) for orders
    with status cancelled.  Observe that no hits are returned.
[2] Apply the patch and run the search again.  This time,
    the cancelled orders should be returned.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 44eb83388928a020812d6fc375d565b0b2d6f9d3)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: (follow-up) fix detection of cancelled orders
Galen Charlton [Fri, 13 Dec 2013 23:19:55 +0000 (23:19 +0000)]
Bug 8230: (follow-up) fix detection of cancelled orders

This patch fixes a problem where the quantity / items column
in the acquisitions detail table would display ilnks to
items for cancelled orders.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit da3e33bff37a92caeb00f69db7e83b17e60eada6)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: (follow-up) don't link to basket unless user has appropriate permissions
Galen Charlton [Fri, 13 Dec 2013 23:04:59 +0000 (23:04 +0000)]
Bug 8230: (follow-up) don't link to basket unless user has appropriate permissions

With this patch, the basket number on the bib details page is linked
to the basket management page only if the staff user has the appropriate
permissions.

To test:

[1] Log in as a user with the acquisition/order_manage permission.
    Bring up a bib record that is attached to an order and verify
    that the basket number is an active link.
[2] Log in as a user that doesn't have the acquisition/order_manage
    permission.  Verify that the basket number displayed on the bib
    details page is not a hyperlink.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a050ca83b717c0212e4ae7d102ea1d1f13208edb)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: DBrev 3.14.01.002
Fridolin SOMERS [Tue, 24 Dec 2013 13:27:12 +0000 (14:27 +0100)]
Bug 8230: DBrev 3.14.01.002

Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: (follow-up) reflect the fact that order statuses are now alphabetic codes
Jonathan Druart [Fri, 18 Oct 2013 13:05:11 +0000 (15:05 +0200)]
Bug 8230: (follow-up) reflect the fact that order statuses are now alphabetic codes

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised. No regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ba3bb0a4f80bf565d784cb151a5623725ae4e3cf)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8230: Display acquisition details on the catalogue detail page
Jonathan Druart [Wed, 18 Sep 2013 12:30:05 +0000 (14:30 +0200)]
Bug 8230: Display acquisition details on the catalogue detail page

This patch adds a new tab "Acquitition details" on the catalogue detail
page. It provides a list of order made for this biblio.

New system preference:

AcquisitionDetails: Hide/Show the new tab.  The default for
new and upgraded installations is to display the new tab.

Test plan:
1/ Apply the patch.
2/ Select the "placing an order" value for the AcqCreateItem pref.
3/ Create a new order with X items.
4/ Go on the catalogue detail page for the selected biblio.
5/ Click on the "Acquisition details" tab and check that your order is
displayed. Itemnumbers are present in the last column. Check that links
are not broken.
6/ Close your basket.
7/ Status become "Ordered"
8/ Receive X-1 items.
9/ Come back on the catalogue detail page. There are 2 orders: 1
complete and 1 partial. The complete one has a receive date.
10/ Receive the last item.
11/ Now you have 2 orders with a complete status.
12/ Cancel the last receipt.
13/ You have 1 ordered and 1 complete (2 items).
14/ Cancel the first receipt.
15/ You have 1 ordered (3 items).
16/ Delete your order
17/ You have 1 deleted order.
18/ Switch the AcqCreateItem pref to "receiving an order"
19/ Do again steps 3 to 17.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7180eb1153cbb2849b0171014cf84eda0993b465)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
Conflicts:
installer/data/mysql/updatedatabase.pl

10 years agoBug 11124: QA Follow-up adding optional dependency HTTPD::Bench::ApacheBench
Marcel de Rooy [Fri, 6 Dec 2013 09:15:52 +0000 (10:15 +0100)]
Bug 11124: QA Follow-up adding optional dependency HTTPD::Bench::ApacheBench

This dependency is used in load testing (misc/load_testing/*)

Test plan:
Check if you see the dependency listed on About/Perl modules.
Verify if the version information is correct.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f90cca4831dc90c74f4b6c18e415b1cce361fdb2)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11124: QA Follow-up resolving a warning and three typos
Marcel de Rooy [Fri, 6 Dec 2013 10:13:41 +0000 (11:13 +0100)]
Bug 11124: QA Follow-up resolving a warning and three typos

Resolves warning on uninitialized author in split on line 128.
Just adds the same behavior for title on line 129 for completeness.
Fixes typo on occurrences and two other minor typos.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1219b3153ee3501d61f22a767b7b3e68c7c8933e)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11124: disallow trying to run the staff benchmark script as the DB account
Jonathan Druart [Wed, 23 Oct 2013 14:48:14 +0000 (16:48 +0200)]
Bug 11124: disallow trying to run the staff benchmark script as the DB account

On step 6 (at least), the circulation and return page redirect to the
select branch page and nothing is done.

The script should die if the user used is the sql administrator account.

Test plan:
Suppose that the sql admin account is root/root and koha/koha a
superlibrarian account.

1/
perl misc/load_testing/benchmark_staff.pl --steps=6
--url=http://admin.koha.local/cgi-bin/koha/
--password="koha" --user="koha"
should produce:
  ...
  Step 6
  ...

2/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.koha.local/cgi-bin/koha/
--password="root" --user="root"
should produce:
Authentication successful
You cannot use the database administrator account to launch this script

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4604f595d66f65ba15d6625b2366acb147797ffc)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11255: allow "relevance ascending" as a sort option
Jonathan Druart [Fri, 15 Nov 2013 10:10:04 +0000 (11:10 +0100)]
Bug 11255: allow "relevance ascending" as a sort option

This patch fixes a problem where if a staff member sets the
*defaultSortField/*defaultSortOrder system preferences to relevance
ascending while QueryParser is enabled, default keyword search
would break -- the query parser config did not declare relevance asc
as a possible "modifier".

Note that setting the sort order to relevance ascending does not
actually make catalog search return results with the least relevant
records showing up first; Zebra does not support such a mode.  In other
words, relevance ascending acts exactly the same as relevance descending.

Test plan:

0/ Create some biblio with "history" in the title and
   ensure that the QueryParser system preference is enabled.
1/ Define prefs defaultSortField = relevance and defaultSortOrder = asc
2/ Search "history" on the staff interface
3/ Note that no result is returned.
4/ Apply the patch
5/ Verify the queryparser config file in use takes the modification into
account (see the queryparser_config value in your $KOHA_CONF file).
6/ Relaunch the search and verify results are returned

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 54937c5eb34c511e00de8d0831141516422885c7)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11261: make sample serial frequencies mandatory during installation
Jonathan Druart [Fri, 6 Dec 2013 14:44:52 +0000 (15:44 +0100)]
Bug 11261: make sample serial frequencies mandatory during installation

Test plan:
Verify all sample_frequencies.* files have been moved from optional
to mandatory directories.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 97b270aa2e08089bfa888c191d32d0a9af075ffe)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11261: make sample serial numbering patterns mandatory during installation
Jonathan Druart [Tue, 19 Nov 2013 14:21:25 +0000 (15:21 +0100)]
Bug 11261: make sample serial numbering patterns mandatory during installation

Test plan:
Verify all sample_numberpatterns.* files have been moved from optional
to mandatory directories.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All sample files for numbering patterns are moved from optional
to mandatory.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3c2e45a05816d69965445509d5ecd9db7ab3b98d)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 9224: Make acqui/finishreceive.pl Plack-compatible
Jacek Ablewicz [Wed, 16 Oct 2013 15:31:04 +0000 (17:31 +0200)]
Bug 9224: Make acqui/finishreceive.pl Plack-compatible

Under Plack/mod_perl wrapping, sub update_item() will become a closure,
so after the 1st run it will retain its own private instances of the
following variables: $booksellerid, $datereceived, $unitprice, $rrp,
$biblionumber.

I.e., in case update_item() gets invoked 2nd+ time (inside
the same process, but for different-subsequent receives) it may
incorrectly flag the (old, wrong) biblionumber for Zebra reindexing,
and erronously modify the current item[s] with the previously
used (wrong) values.

This simple patch should make acqui/finishreceive.pl Plack-compatible.

Test plan:
Test patched acqui/finishreceive.pl script (create and receive some
orders w/ items, etc.). Ensure items are gettting added and/or modified
correctly during receiving process.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6dcc34c1b44f72a8602c4ee95540836e6cd1e7bd)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8334: (follow-up) remove commented JS code
Jonathan Druart [Fri, 13 Dec 2013 14:46:15 +0000 (15:46 +0100)]
Bug 8334: (follow-up) remove commented JS code

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4927140966844b88ef54dfc4d8e5f39d164ac8f3)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8334 - Authority UNIMARC 100 field plugin
Vitor FERNANDES [Wed, 18 Sep 2013 20:58:24 +0000 (17:58 -0300)]
Bug 8334 - Authority UNIMARC 100 field plugin

This patch adds a plugin for field 100 of UNIMARC
authorities.

To test on a UNIMARC site:
1) Apply the patch
2) Edit some authority framework, field 100
3) Link subfield 'a' to unimarc_field_100_authorities.pl
plugin, save
4) Edit or add auth record, click on '...' to bring plugin
5) Modify field 100a
6) Save record

Thanks to Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> for
converting Vitor's original patch to a Git patch and doing
some tidying.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Stephane Delaye <stephane.delaye@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 311c9278765f369f616dadab92a8179761f8ee7a)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11174: fix OPAC search links built from authority 5xx fields
Zeno Tajoli [Wed, 30 Oct 2013 18:36:41 +0000 (19:36 +0100)]
Bug 11174: fix OPAC search links built from authority 5xx fields

In the templates opac-authoritiessearchresultlist of prog and
bootstrap the incorrect parameter 'valuec' is changed to 'value'

To test:

1) Insert an authority record with a 5xx field  (on MARC21 or UNIMARC)
2) Index the record
3) Search for the record in using OPAC authorities search.
4) Click one of the "see also" links built from the 5xx field, the link
   doesn't work
5) Apply the patch
6) Close the browser
7) Open the opac and select the english interface
8) Redo the search
9) Now the link works
10) To use the patch in others languages you need to regenerate the
    templates.

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Following commit remove the use to valuec:
 commit 31f41e2c1db9d8dca82e0249050acb8f906c8164
    Bug 8206: Specify index in OPAC authority search

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 09fcd6980301bae3daad68f8cc27a2d5e7d488e4)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10983: Remove unused private subroutines from C4::Budgets
Colin Campbell [Wed, 2 Oct 2013 08:25:16 +0000 (09:25 +0100)]
Bug 10983: Remove unused private subroutines from C4::Budgets

The subroutine _filter_fields is not used by the module
and the sub _columns is only used by it

This patch removes the dead code.

To test:

[1] Verify that the following tests pass

    t/Budgets.t
    t/Budgets/CanUserModifyBudget.t
    t/Budgets/CanUserUseBudget.t
    t/db_dependent/Acquisition.t
    t/db_dependent/Acquisition/GetOrdersByBiblionumber.t
    t/db_dependent/Acquisition/Invoices.t
    t/db_dependent/Acquisition/OrderFromSubscription.t
    t/db_dependent/Acquisition/TransferOrder.t
    t/db_dependent/Acquisition/close_reopen_basket.t
    t/db_dependent/Bookseller.t
    t/db_dependent/Budgets.t
    t/db_dependent/Serials.t
    t/db_dependent/Serials_2.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Looks good to me.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit befc07c754eb4c2199c0063f15f9ffb3f3ea8cca)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11284: Packaging updates for master branch
Robin Sheat [Fri, 22 Nov 2013 00:18:10 +0000 (13:18 +1300)]
Bug 11284: Packaging updates for master branch

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11009: (follow-up) tweak wording and remove potential log noise
Galen Charlton [Tue, 10 Dec 2013 20:20:37 +0000 (20:20 +0000)]
Bug 11009: (follow-up) tweak wording and remove potential log noise

This patch makes the message that is displayed when attempting to
view circ history for the anonymous patron more informative.  It
also removes a potential source of log noise if the AnonymousPatron
system preference happens to be set to a blank value.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d92dbae6814fd2dfc36f7f46194f02a9c27994fa)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11009: Do not display circulation history of anonymous patron
Fridolyn SOMERS [Tue, 8 Oct 2013 07:34:42 +0000 (09:34 +0200)]
Bug 11009: Do not display circulation history of anonymous patron

When using an anonymous patron to anonymise issues history, this patron
may have a huge number of old issues. In this case, trying to display
the reading history of this patron will perform a huge SQL query.
It is not useful to have the reading history of this anonymous patron.

This patch adds an alert instead of old issues when displaying reading
records of anonymous patron.

Test plan :
- Set syspref AnonymousPatron to 0.
- Select a borrower with old issues. For example 123.
- Look at its reading records page : members/readingrec.pl
=> Old issues are displayed in a datatable
- Set syspref AnonymousPatron with this borrower number. For example 123.
- Look at its reading records page
=> Old issues are not displayed and an alert is displayed
- Using SQL query, remove old issues of this borrower :
    DELETE FROM old_issues WHERE borrowernumber=123.
- Look at its reading records page
=> A message is displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This works as advertised and seems like a reasonable thing to do. I
suspect that someone will object... Perhaps that person will implement a
solution which uses an AJAX DataTable.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2ad1faa63988b9dbf32cf8f8e35d59e7b584f2b)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11112: (follow-up) add FIXME
Galen Charlton [Tue, 10 Dec 2013 18:21:09 +0000 (18:21 +0000)]
Bug 11112: (follow-up) add FIXME

The caching introduced by the main patch is not ideal
as it won't work correctly if a persistance engine is used.

However, I have good reason to expect that bug 8089 will
be worked on (because I'm going to do it) so that Koha::Cache
can be used for this prior to the release of 3.16.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aca1f5f6a9c5fb58e62ab060c272eadc287bb167)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11112: (follow-up) repair Koha::Calendar->add_holiday()
Galen Charlton [Tue, 10 Dec 2013 18:11:37 +0000 (18:11 +0000)]
Bug 11112: (follow-up) repair Koha::Calendar->add_holiday()

This patch ensures that the package-level cache is updated
when add_holiday() is used.  Note that except for the test
case added by this patch, there doesn't seem to be anything
that actually calls ->add_holiday(); it may be better to remove it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 08c47cbfe2517ef36b15a16a94227b854be5eeb9)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11112: Koha::Calendar needs some caching
Jonathan Druart [Wed, 16 Oct 2013 13:36:30 +0000 (15:36 +0200)]
Bug 11112: Koha::Calendar needs some caching

Each time a Koha::Calendar object is created, its constructor retrieves
all holidays from the database and create a DateTime::Set object with
all holidays.

[RM note: I've observed that the time it takes DateTime::Set to be
 initialized with a set of dates increases faster than linearly with
 the number of dates.  I think this, more than just retrieving a bunch
 of holidays from the database, is what is most expensive.]

In one of our customer's DB, there are 11085 special_holidays and 598
repeatable_holidays. When a loan is returned, there are 3 calls to
Koha::Calendar->new.

This patch adds caching of the holiday list via package-level variables
as well as lazy fetching of the holidays. (RM note: this means that if
a persistance engine is in use, updates to the holiday list will not
be reflected during checkout.  I'm allowing this breakage for now on
the plan that bug 8089 will be fixed soon and we can switch to using
Koha::Cache).

Nytprof benchmarks (on a 3.8.x branch):
In DateTime::Set->from_datetimes:
3 times (5.49ms+4.90s) by Koha::Calendar::_init at line 80 of Koha/Calendar.pm, avg 1.63s/call
on a total of 7.67s (of 10.2s), executing 6353333 statements and 3031273 subroutine calls in 147 source files and 36 string evals.
for the circulation/return.pl page.

Comparing the access_log:

Without the patch:
checkout: time=2759838
checkin: time=1832751

Without the patch and with overdues:
checkout: time=1086727 + time=1144706
checkin: time=3928854 (x2)

With the patch and overdues:
checkout: time=1077839 + time=1060886
checkin: time=2420898

Test plan:
- checkout an item with a return date < today
- checkin the item and verify the suspension period is well calculated
  (depending on the holidays).
- prove t/db_dependent/Holidays.t
- t/Calendar.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a98b239dbfbf0d0e9c6f6593c3457c18c79584a9)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11032: Check a valid MARC::Record passed to Biblio
Colin Campbell [Thu, 10 Oct 2013 17:06:14 +0000 (18:06 +0100)]
Bug 11032: Check a valid MARC::Record passed to Biblio

Intermittently problems in the calling environment
cause a C4::Biblio routine to be called with an undefined
MARC::Record object. This results in the process
dying and returning to the end user a low level
message such as 'cannot call method x on an undefined
object'.

For exported subroutines taking a MARC::Record object,
check that object is defined otherwise return a logical
return value and log a stack trace to the error log.
A couple of cases were checking but dying, this may have
unwelcome results in a persistent environment so croak has
been downgraded to carp

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds lots of checks for $record in various places, should
not affect behaviour.
Passed all tests and QA script, including new unit tests.
Tested adding and saving a new record.
Also tested detail and result pages without XSLT.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2e0e15485ecae556b77037443af1077291fe3673)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10605: fix encoding issue on basket email (INTRANET)
Jonathan Druart [Thu, 14 Nov 2013 10:31:23 +0000 (11:31 +0100)]
Bug 10605: fix encoding issue on basket email (INTRANET)

Same fix for the staff interface.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Both patches tested with English and German, diacritics
now appear correctly if UTF-8 is selected as encoding.
Passes all tests and QA script.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 62fcbea10a0e7b3fbca74531ec5051704ab63f7c)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10605: fix encoding issue in basket email (OPAC)
Jonathan Druart [Thu, 14 Nov 2013 11:17:38 +0000 (12:17 +0100)]
Bug 10605: fix encoding issue in basket email (OPAC)

There is an encoding issue on the received mail.
Here, we have to keep the encode_qp in order not to break links (= is a
special char for email https://en.wikipedia.org/wiki/MIME#Encoded-Word).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4290fa60ef0fd93f1c0b51485f3b3ec74f316043)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10808: (follow-up) reformat auth_finder.pl
Fridolyn SOMERS [Fri, 30 Aug 2013 09:41:26 +0000 (11:41 +0200)]
Bug 10808: (follow-up) reformat auth_finder.pl

Perltidy and some format changes.

Most important : call to get_template_and_user must be at begining
of script because it checks authentification.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes:
- Tested various searches, selections now remain after
  submitting the search form.
Regression testing:
- Clearing the authority from the record still works.
- Creating a new authority from the plugin page
  still works.
- Autocomplete of entries still works.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ca29e0658c469abff1e54e8630fb989757d02f71)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10808: make authority search form retain drop-down selections
Fridolyn SOMERS [Fri, 30 Aug 2013 08:54:00 +0000 (10:54 +0200)]
Bug 10808: make authority search form retain drop-down selections

When cataloging a field defined with a thesaurus, an authority search
popup is displayed with a search from. Once operators, values and sort
selected in this form the search can be performed. The bug is that the
values entered are kept but not the selected operators and sort.

The same bug was existing in authorities module, solved by Bug 8692.

This patch corrects the bug.

Also uses in 'sort by' options the same text as search in authorities
module : Heading A-Z (default), Heading Z-A, None.

Also removes duplicated code in auth_finder.pl :
    value_mainstr => $query->param('value_mainstr') || "", ...

Test plan :
- Create a new biblio with a framework containing a field linked to a
  thesaurus. For example : 600
- Click on small icon of main entry. For example : 600$a
=> You get a search form with all operators to "contains" and sort by
   "Heading A-Z"
- Enter a value in each text box and perform search
=> You get a search form with values in text boxes and all operators
   to "contains"
- Select "starts with" in all operator comboboxes and perform search
=> You get a search form with all operators to "starts with"
- Select "is exactly" in all operator comboboxes and perform search
=> You get a search form with all operators to "is exactly"
- Select "Heading Z-A" in sort by and perform search
=> You get a search form with "Heading Z-A" in sort by
- Select "None" in sort by and perform search
=> You get a search form with "None" in sort by

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: With both patches applied no koha-qa errors

Test
1) Original behavior is whatever selection you do before patch,
search form returns to default options
2) After patch, selection remains

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass, further comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 857547c992ea2b548712583d09602eda3787556c)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10661: format mandatory item fields the same on all forms
Owen Leonard [Thu, 15 Aug 2013 14:06:29 +0000 (10:06 -0400)]
Bug 10661: format mandatory item fields the same on all forms

Mandatory item fields are not indicated the same way in all places. This
patch corrects two places where required fields were shown in bold
rather than using the standard "required" class: When adding an order
from a staged file and when adding an item for a new issue of a serial.

This patch also normalizes the text input size on item entry forms: In
some places it was 50, others 67. I have changed the latter to 50.

Unrelated changes: Added $KohaDates formatting of date and time and
corrected capitalization on a heading on the add order from staged file
page.

It would be nice to be able to use the same method for displaying the
item form as we use on neworderentry.tt -- pulling in the form from a
separate include. However that system is designed for handling multiple
items and would need to be adapted for these cases.

To test, you must have a staged file from which to add an order. Open an
existing basket or create a new one and choose to add an order "From a
staged file." Choose a staged file from which to order. The item entry
form under the "Import all" heading should show required fields in red.

To test in serials: Begin the process for receiving an item from an
existing subscription. On the serials-edit page, find the "Click to add
item" links and click to open the item edit forms. There should be one
under the numbered issue and the supplemental issue forms. In both cases
the item edit screen should show the mandatory item fields in red.

Confirm that the cataloging add item form looks correct and works
correctly.

Revision: Left out the "required" note which should appear after each
required field.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dcaa3ff70489adeedb8a7aead364203d633580bc)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 8683: ensure clear button clears all item fields on order form
Jonathan Druart [Wed, 13 Nov 2013 10:33:05 +0000 (11:33 +0100)]
Bug 8683: ensure clear button clears all item fields on order form

The clear js function parses input text, but input filled to a plugin
does not contain the type attribute.

Test plan:
- fill the barcode field to the barcode plugin
- go on the new order page
- verify the barcode plugin works as before
- verify the clear link clears the barcode field and all others fields.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes all tests and QA script.
Template change only.
Barcode and date acquired are now also cleared with the
'clear' link.

But: it only works when you enter a barcode manually currently,
because the AutoBarcode functionality is broken on master (bug 11273).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f3b28a5d8ad381bbe5b3edce994e0d45ee96f920)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10688: Don't prefix index inappropriately
Jared Camins-Esakov [Tue, 6 Aug 2013 04:48:20 +0000 (00:48 -0400)]
Bug 10688: Don't prefix index inappropriately

If you select an index in the search dropdown and then enter in a QP
query starting with the field, Koha will prepend the index you do not
want to use at the beginning of the search, resulting in a search that
probably does not match what you were hoping for.

To test:
1) Select an index in the search dropdown in the OPAC. Author is fine.
2) Enter a search term using manually entered indexes. For example:
    ti:cat in the hat
3) Note that the search fails.
4) Apply patch.
5) Repeat steps 1 and 2.
6) Note that the search succeeds.
7) Sign off.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 03f342aa67034a56876b9b45545c607b961587b7)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agobug_10781: Remove C4::ILSDI::Utility
Srdjan [Fri, 23 Aug 2013 07:59:17 +0000 (19:59 +1200)]
bug_10781: Remove C4::ILSDI::Utility

This patch removes C4::ILSDI::Utility on the basis
that one of its routines (BorrowerExists) was not used
and that the other routine can be (and is) moved to
C4/ILSDI/Services.pm.

Test:
This should be a noop. Regression testing required:
/cgi-bin/koha/ilsdi.pl functioanality, in particuler:
GetAvailability - ?service=Describe&verb=GetAvailability
AuthenticatePatron - ?service=Describe&verb=AuthenticatePatron

ILS-DI syspref must be turned on

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7675ede590936b7f32c665c3d597a9f34122f8ae)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10970: DBRev 3.14.01.001
Fridolin SOMERS [Tue, 24 Dec 2013 09:26:33 +0000 (10:26 +0100)]
Bug 10970: DBRev 3.14.01.001

Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10970: (follow-up) update framework only for MARC21 installations
Galen Charlton [Fri, 6 Dec 2013 15:44:46 +0000 (15:44 +0000)]
Bug 10970: (follow-up) update framework only for MARC21 installations

This patch ensures that the new MARC21 subfields don't accidentally
appear in the default MARC framework for UNIMARC or NORMARC Koha
catalogs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6203bbaa55acb2cae3af230a3bf616ae25b88e21)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 10970 - Update MARC21 frameworks to Update Nr. 17 - DB update
Bernardo Gonzalez Kriegel [Sun, 29 Sep 2013 17:14:21 +0000 (14:14 -0300)]
Bug 10970 - Update MARC21 frameworks to Update Nr. 17 - DB update

Database counterpart of Bug 10962. Updates existing MARC21
default frameworks to Update Nr. 17 (September 2013)

To test
1) Apply patch
2) run updatedatabase.pl
3) Verify new subtags

biblio
    015_q 020_q 024_q 027_q 800_7 810_7 811_7 830_7

authorities
    020_q 024_q

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f37a163e7573ac9dea46c0081ebe43bf37bf92c1)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
Conflicts:
installer/data/mysql/updatedatabase.pl

10 years agoBug 11225: remove \n from some strings to be translated
Jonathan Druart [Tue, 12 Nov 2013 14:31:56 +0000 (15:31 +0100)]
Bug 11225: remove \n from some strings to be translated

Some strings in the serials module contain linebreaks \n that cause
problems in translation.

Test plan:
- Update your po file
- Verify that strings in serials/subscription-add.tt and
  serials/subscription-numberpatterns.tt are present and don't contain
  "\n" character.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template only change, passes all tests and QA script.
Updated po files now contain only the strings and no line breaks.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No regressions found. Passes koha-qa.pl and xt.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 860b99594f8a11d9a9f9d2d7c9a77e4ac477ac7b)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.1 release v3.14.01
Fridolin SOMERS [Mon, 23 Dec 2013 16:29:08 +0000 (17:29 +0100)]
Increment version for 3.14.1 release

10 years agoTranslation updates for 3.14.1 release
Fridolin SOMERS [Mon, 23 Dec 2013 16:26:59 +0000 (17:26 +0100)]
Translation updates for 3.14.1 release

10 years agoUpdate release notes for 3.14.1 release
Fridolin SOMERS [Mon, 23 Dec 2013 16:19:42 +0000 (17:19 +0100)]
Update release notes for 3.14.1 release

10 years agoBug 11333: use jQuery validator plugin for CSV profiles forms
Galen Charlton [Tue, 3 Dec 2013 17:06:48 +0000 (17:06 +0000)]
Bug 11333: use jQuery validator plugin for CSV profiles forms

This patch adds the use of the jQuery validator plugin for
the two forms (new and edit) on the CSV profiles page.  Doing
this standardizes messages that gets displayed on validation
errors.

This patch, in the process, fixes a bug where if a page has
more than one validated form, only the first such form would
get the validator plugin applied to it -- it looks like $.validate()
does not do implicit iteration.

To test:

[1] Apply the patch, then go to Tools | CSV profiles.
[2] Create a new profile, but leave the name and the MARC/SQL
    fields blank.  When you click the submit button, the form
    should not be submitted; instead, text will be displayed
    to the right of each input that lacks required input.
[3] As above, but change the profile type and verify that the form
    is not submitted unless all of the required fields are filled in.
[4] Edit an existing form, then empty the MARC/SQL field.  Try
    submitting the form; it should refuse to submit the form
    and display text saying that the field is required.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed some tabs, works nicely and as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 31a3fe1537de393cad1e215bb43f6f1e659c6f72)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11265: ensure current locale is selected when editing a subscription
Jonathan Druart [Tue, 19 Nov 2013 10:27:52 +0000 (11:27 +0100)]
Bug 11265: ensure current locale is selected when editing a subscription

Test plan:
0/ you have to have some locales defined, run dpkg-reconfigure locales
to configure locales
1/ edit a subscription (or add a new one) and select a locale
2/ save
3/ edit again and verify the locale value is selected

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.

Tested creating a suscription, selecting locale (have many) and saving.
When editing suscription:
1) Without patch locale value is not showed on page, empty value
2) With patch correct value is displayed

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Template change only.
Works as expected - saved locale is now shown on editing the
subscription and will not be deleted upon saving.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ff0b85a0e0d86bc95ed78056f5225a3a1c14c6ea)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 2546: DBRev 3.14.00.003
Fridolin SOMERS [Tue, 17 Dec 2013 17:23:29 +0000 (18:23 +0100)]
Bug 2546: DBRev 3.14.00.003

Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 2546: make description of standard fine types translatable
Jonathan Druart [Wed, 23 Oct 2013 10:40:30 +0000 (12:40 +0200)]
Bug 2546: make description of standard fine types translatable

The descriptions for fines are stored in English in the DB
(accountlines.description). So they are not translatable.

This patch removes the descriptions automatically added and generates
the string in the template.

Test plan:
1/ Execute the updatedatabase entry.
2/ Verify in the following pages the description is consistent:
    - members/pay.pl?borrowernumber=XXXX
    - members/boraccount.pl?borrowernumber=XXXX
    - opac-account.pl
3/ Launch the translate script and update the po files in order to
translate the new strings.
4/ Verify the strings are translated in the interface.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Corrected few typos in the commit message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8aa0e6856dbd61bb61b1a2a0c88ec03adf65e3c7)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 2310: display tooltips explaining why patron menu items are disabled
Owen Leonard [Sun, 20 Oct 2013 15:12:29 +0000 (08:12 -0700)]
Bug 2310: display tooltips explaining why patron menu items are disabled

With some staff client menus options are displayed as disabled when the
logged in user doesn't have permission to perform that function. This
patch adds Bootstrap tooltips to patron menu items with text explaining
why they are disabled.

To test, log in as a user who lacks permission to modify patrons or set
permissions. Open a patron record in circulation or patrons. Hovering
over renew, delete, and set permissions links (in the patron toolbar
"More" menu) should trigger a tooltip with a brief explanation.

Test the "Update child to adult patron" link by viewing an adult patron.

A separate patch will address catalog menu items.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
New tooltip texts are translatable, patch passes all tests
and QA script.
Tested according to test plan in Chromium and Firefox.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 01c101a6b9b60b685abca58fddfccb1087b4dbce)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11101: add CSS selector to item types facet label in OPAC
Claire Stent [Tue, 22 Oct 2013 21:12:35 +0000 (10:12 +1300)]
Bug 11101: add CSS selector to item types facet label in OPAC

Note: prog-only patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds a CSS class to the Item types facet in OPAC.
Works as described.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b8a3933ca38ea36df73bd903835e9ed1db02bed7)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11091: (follow-up) perltidy on serials/subscription-bib-search.pl
Fridolyn SOMERS [Mon, 21 Oct 2013 10:13:17 +0000 (12:13 +0200)]
Bug 11091: (follow-up) perltidy on serials/subscription-bib-search.pl

Signed-off-by: David Noe <drnoe@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fd22187914afe5c806a98ea6eda0b2d0b455ab36)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11091: revamp search limit options for new subscription bib search form
Fridolyn SOMERS [Mon, 21 Oct 2013 09:54:16 +0000 (11:54 +0200)]
Bug 11091: revamp search limit options for new subscription bib search form

When creating a new subscription, you can click on "Search for Bilbio"
to search into catalog.

A popup opens with a text field for search terms and a combo-box to
limit search. This combo-box uses the syspref AdvancedSearchTypes to
know what list of values display.

The bug is that the code acts as if AdvancedSearchTypes has always one
value, but since Bug 7031, this syspref can have several values
(item types, collection codes and locations).

This patch removes the use of AdvancedSearchTypes syspref and defines
search form with 2 limits: item types and collection codes (from
authorised values CCODE).

One or both of this information can be on biblio. [RM note: this isn't a
true statement for the default configuration used by MARC21 libraries.]

Searching by location seems to be useless because this information is always
on item.  If CCODE authorised value does not exist or is empty, the collection
code filter is not displayed.

Test plan :
- Check CCODE authorised value exists with some values
- Choose a biblio indexed with both itemtype and ccode indexes
- Go to Serials module and click on "New subscription"
- In form, click on "Search for Biblio"
=> The popup "serials/subscription-bib-search.pl" appears with two limits
- Enter a word of biblio title, select its item type and select its collection code
- Click on "Search"
=> You get the biblio

Signed-off-by: David Noe <drnoe@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
While I am not sure how useful the collection code is for most libraries, where this
is an item level value, this fixes a broken feature and works as described.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e208386aaeaf31bd6f455077382ffd05b0b345b9)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11104: Wraps series label in a span for CSS selectability.
Tim Hannah [Tue, 22 Oct 2013 21:01:19 +0000 (10:01 +1300)]
Bug 11104: Wraps series label in a span for CSS selectability.

Note: patch is only for the prog theme.

Patch submitted as part of Librarian to Developer in 90 Minutes
at LIANZA 2013.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 396bbc758756637782cd463a8586f2ac15757f4e)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11111: (follow-up) fix column sorting on parcels page
Galen Charlton [Thu, 5 Dec 2013 15:53:23 +0000 (15:53 +0000)]
Bug 11111: (follow-up) fix column sorting on parcels page

This patch fixes issues with the column sorting on the
pending orders and already received tables introduced by
the main patch.

To test:
[1] Verify that the sort widgets on the appropriate columns
    of each table work correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d3ac02b7bd29d180979a8174e60e91506cc0b231)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11111: UT: SearchOrders returns keys basketgroupid and basketgroupname
Jonathan Druart [Mon, 4 Nov 2013 08:30:38 +0000 (09:30 +0100)]
Bug 11111: UT: SearchOrders returns keys basketgroupid and basketgroupname

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d2f975f3bc52f068ecee00ca427e03b8ad5b971)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11111: display the basket group name on the parcel page
Jonathan Druart [Tue, 22 Oct 2013 12:05:48 +0000 (14:05 +0200)]
Bug 11111: display the basket group name on the parcel page

Test plan:
Go on acqui/parcel.pl?invoiceid=XX page and verify the basket group name
is displayed into the 2nd column of the pending orders and already
received tables.

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changed basketgroup to basket group to match spelling on other
pages.
Works as described, passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 796281914491b5b77dcee405877ddfaa894d2c60)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11077: Correct more warnings in C4/Auth.pm
Srdjan [Fri, 1 Nov 2013 08:42:45 +0000 (21:42 +1300)]
Bug 11077: Correct more warnings in C4/Auth.pm

This gets rid of some more warnings.

It also corrects a noisy ne condition.
    $userid = $retuserid if ( $retuserid ne '');
became
    $userid = $retuserid if ( $retuserid );

It also integrates Srdjan Jankovic's patch with Petter Goksoyrsen's
patch, while correcting the problems found.

This includes:
    my $q_userid = $query->param('userid') // '';
along with:
    my $s_userid = '';
and:
    my $s_userid = $session->param('id') // '';
Indentation does not reflect actual scoping.

A missing system preference would have triggered a ubiquitous
undef compare check failure message. This makes the flooding
message more useful, so as to help correct it.
The change to accomplish this was:
        my $pki_field = C4::Context->preference('AllowPKIAuth');
        if (!defined($pki_field)) {
            print STDERR "Error: Missing AllowPKIAuth System Preference!\n";
            $pki_field = 'None';
        }

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a0b00e4c8bd75a0557e487520fff5e2e39e10803)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11077: remove uninitialized value $pki_field warning
Tomas Cohen Arazi [Fri, 18 Oct 2013 00:41:43 +0000 (17:41 -0700)]
Bug 11077: remove uninitialized value $pki_field warning

During login at the Staff interface you get warnings in the logs
regarding an uninitialized value for the $pki_field variable.

To test:
- tail -f /path/to/your-intranet-logs
- Point your browser to your staff login page
- Login
- Three warnings are showed
- Apply the patch
- Log out
- Log in
- No new warnings, and you can still log in.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Followed test plan; it works as advertised.
Also works when I deleted AllowPKIAuth system pref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ce5ab3b31457793815a2f49bc8287fdcbd0dd3c5)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11341: fix XSS bug in opac-search.pl (facets)
Chris Cormack [Wed, 4 Dec 2013 21:09:20 +0000 (10:09 +1300)]
Bug 11341: fix XSS bug in opac-search.pl (facets)

This patch fixes the prog theme; the bootstrap theme already
does the necessary filtering.

To test
1/ Craft a url like
 cgi-bin/koha/opac-search.pl?idx=kw&q=fish&offset=20" onmouseover%3dprompt(994000) bad%3d"
 (the search must return enough results to have a show more link in the facets)

2/ Check the source, or mouseover the Show more links in the facets
   Notice the code is executable

3/ Apply patch - notice it is no longer executable

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d2d365ca830345b9a519158f6d735d2abd125380)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 5031: (follow-up) correct tabs
Bernardo Gonzalez Kriegel [Sat, 21 Sep 2013 22:04:02 +0000 (19:04 -0300)]
Bug 5031: (follow-up) correct tabs

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny QA follow-up corrcting whitespace to match coding
guidelines.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1b695517a6b98720ee300ba21280ee2f8139a796)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 5031: CSV profiles: validate required content fields
Jonathan Druart [Tue, 10 Sep 2013 15:19:10 +0000 (17:19 +0200)]
Bug 5031: CSV profiles: validate required content fields

Some fields are required on editing/adding CSV profiles.  This
patch adds HTML5 validation so that required fields must be
filled in before the form is submitted.

Test plan:
- add a new CSV profile (tools/csv-profiles.pl) without any value.
- save => error on empty fields.
- fill the "marc" content, select type="sql", fill the CSV name input.
- save => error on sql content field.
- fill the sql content
- save => the CSV profile is saved.
- retry for the edit form.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: On top of both patches for Bug 10853

Works very well, now we get an alert with empty field
Saves correctly MARC and SQL profiles

Solved minor conflict introduced by tab followup on Bug 10853
Again small tab errors corrected in followup

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, looks a bit 'non standard' for Koha,
but improves usability of the form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8c5278270708724808b3585dc798e9300abeed31)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11035: (follow-up) update licenses section
Galen Charlton [Tue, 3 Dec 2013 15:54:26 +0000 (15:54 +0000)]
Bug 11035: (follow-up) update licenses section

The OpenJS keyboard shortcuts library by Binny V A is licensed under
the BSD license.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 097d5d5c8e9e4ba2ec3839f376bd81e4c2d915b5)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11035: (follow-up) move shortcut.js
Galen Charlton [Tue, 3 Dec 2013 15:35:15 +0000 (15:35 +0000)]
Bug 11035: (follow-up) move shortcut.js

shortcut.js is not a jQuery plugin, so this patch
moves it out of the jquery plugin directory.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e0dcb44ae169d22108b3636999cc1609a739cb94)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11035: (follow-up) update offline circ manifest
Blou [Wed, 23 Oct 2013 12:35:55 +0000 (08:35 -0400)]
Bug 11035: (follow-up) update offline circ manifest

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 58432bf777b1c50debd25479cfab5b2a141fab27)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11035: Replace shortcut plugin jquery.hotkeys.min.js
Blou [Thu, 10 Oct 2013 17:44:27 +0000 (13:44 -0400)]
Bug 11035: Replace shortcut plugin jquery.hotkeys.min.js

To old plugin prevents the upgrade to the latest jquery. By replacing
with openjs' shortcut.js, we have now one less hurdle in upgrading
Koha to latest.

Changes:
- removed jquery.hotkeys.min.js
- added shortcut.js
- modified the related includes (doc-head-close.inc and help-top.inc)
- modified the calls in staff-global.js

Regression test:
1) apply the patch
2) in the intranet, test the shortcuts alt-q, alt-r, alt-u.

These are the only affected functionalities.  There is no new functionality.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Tested existing
shortcuts for the search bar tabs on various circulation
related pages.

This uses a Javascript under BSD license, I wonder if it
should be listed in the About>licenses section that we
are using it. As Yui is also BSD I assume the license is
compatible.

+/**
+ * http://www.openjs.com/scripts/events/keyboard_shortcuts/
+ * Version : 2.01.B
+ * By Binny V A
+ * License : BSD
+ */

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 39830ac023fb2276ed2fee29913a4ba3fdff9feb)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11322: rscrub bad data before storing suggestions in the DB
Chris Cormack [Mon, 2 Dec 2013 23:01:23 +0000 (12:01 +1300)]
Bug 11322: rscrub bad data before storing suggestions in the DB

1/ In the public interface, add a suggestion containing html
2/ Save, notice the html is rendered (or if you have the other patches
is displayed)
3/ Apply this paget
4/ Add another suggestion
5/ Notice the html is stripped

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 48b339980e20bdefb21141d537c283d15e267d93)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11322: fix XSS bug in purchase suggestions - OPAC
Chris Cormack [Mon, 2 Dec 2013 22:46:24 +0000 (11:46 +1300)]
Bug 11322: fix XSS bug in purchase suggestions - OPAC

1/ Add a suggestion in the opac, with lots of html
2/ View that suggestion in the OPAC, note the html is rendering
3/ Apply the patch
4/ Test again, in prog and bootstrap, no more rendered html

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 90f3b84def924dcc76719c01d75aa09241c92f8e)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11322: fix XSS bug in purchase suggestions pages
Chris Cormack [Mon, 2 Dec 2013 22:34:48 +0000 (11:34 +1300)]
Bug 11322: fix XSS bug in purchase suggestions pages

To test
1/ Switch on purchase suggestions
2/ On the public interface (OPAC) add a suggestion, put html in every
field
3/ In the staff interface go to the suggestions page
/cgi-bin/koha/suggestion/suggestion.pl
4/ Notice the html is rendered
5/ Click on a suggestion, notice the html is rendered on the show page
also
6/ Apply the patch, check these two pages again, html should now be
escaped

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, thx Chris!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 368068c71597eaf61e4f9cc154002ea92dfd16c3)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 7791: (follow-up) adjust wording of basket deletion confirmation dialog
Galen Charlton [Mon, 2 Dec 2013 16:17:21 +0000 (16:17 +0000)]
Bug 7791: (follow-up) adjust wording of basket deletion confirmation dialog

This patch uses "bib" and "bibliographic record" rather than just
"record"; "record" is not quite specific enough in this context.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 15b86a38edd26eb03fb6d2d7b1b28f47df19370e)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 7791: (follow-up) add warning after deletion if some records were not deleted
Mathieu Saby [Fri, 18 Oct 2013 09:44:39 +0000 (11:44 +0200)]
Bug 7791: (follow-up) add warning after deletion if some records were not deleted

This followup add some warnings after deletion if some items were not
deleted.

4 types of messages are possible :
- x item(s) attached.
- x subscription(s) attached.
- x order(s) attached.
- Unknown error.

To test :
test a
1. create a basket with
- an order using a record A which has already an item, which is used in
   a subscription, and in other order (in an other basket)
- an order using a record B used nowhere elese
2. click on "Delete basket"
3. choose button "Delete basket, orders and records"
4. you should see a page anouncing basket deletion, and that record A was
   not deleted because of its item, subscription and order.
5. check the link around the title of record B takes you to the record
6. check the link under the warning box ("Click here to go back to
   booksellers page") takes you to booksellers page
5. check record B is deleted

test b
1. suppress the subscription linked with record A
2. create an other basket using record A
3. delete the basket on the same way as for test a
4. you should see a page anouncing basket deletion, and that record A was
   not deleted because of its item and order

test c
1. suppress the item attached under record A
2. create an other basket using record A
3. delete the basket on the same way as for test a
4. you should see a page anouncing basket deletion, and that record A
   was not deleted because of its orderBug 7791 Followup: add warning
    after deletion if some records were not deleted

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit de2bfb6799f718a75eb338490b1cee8f8145b6a8)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 7791: (follow-up) tidy up some cruft in the main patch
Mathieu Saby [Thu, 19 Sep 2013 08:57:44 +0000 (10:57 +0200)]
Bug 7791: (follow-up) tidy up some cruft in the main patch

This patch
- delete warns
- add a missing }
- add a condition in template of avoiding asking to delete orders or
  records if the basket is empty

To test :
1. Make the same tests as defined in test plan of main patch. It should
   behave the same way
2. Try to delete a basket with no records inside. You will only have a
   "Delete basket" button, with fewer warnings

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2c307f3e92d6e4051a37f19bb17f60f45fded9d9)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 7791: add ability to delete records when deleting a basket
Mathieu Saby [Thu, 19 Sep 2013 07:59:31 +0000 (09:59 +0200)]
Bug 7791: add ability to delete records when deleting a basket

Currently, when a basket is deleted, all the orders are deleted (there
is a foreign key in aqorders table on basketno).

This could be dangerous, and there is no warning.
After the deletion, unused biblios are left in the catalogue.

This patch
- adds a more detailed message describing the consequences of deletion
- give the choice of also deleting biblio records if possible

To test :
Test A :
1. create a basket with 4 orders:
- an order from a new record A
- an order from a record B which has already an item
- an order from a record C used in a subscription
- an order from a record D used in an other order
2. note the biblionumbers of the records used (or open them in other
   tabs in your browser)
3. click on "Delete basket"
4. choose button "Delete basket and orders"
5. check the catalogue : records A,B,C,D should still be there
Test B:
1. create a basket with 4 orders:
- an order from a new record A
- an order from a record B which has already an item
- an order from a record C used in a subscription
- an order from a record D used in an other order
2. note the biblionumbers of the records used (or open them in other
   tabs in your browser)
3. click on "Delete basket"
4. choose button "Delete basket, orders and records"
5. check the catalogue : records B,C,D should still be there. Record A
   should be deleted

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 09953f836de01a68a3117227965719b74f543844)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 2693: add ability to filter by reviewer name on tag review page
Owen Leonard [Wed, 21 Aug 2013 14:53:20 +0000 (10:53 -0400)]
Bug 2693: add ability to filter by reviewer name on tag review page

If you want to filter results on the tags management page by the
reviewer you have to know their borrowernumber. It would be better to be
able to search by name, but in the meantime this patch adds an
autocomplete widget to the form field so that you can do a name search
and populate the field with the borrowernumber.

To test you must have approved or rejected tags. From the tags review
page (tags/review.pl), view all, approved, or rejected tags. Type a name
in the "reviewer" form field in the left sidebar filter. You should get
an autocomplete dropdown with names matching your search. When you
select one the form field should be populated by the borrowernumber.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Patch works as described. I'm not sure whether or not it would be better
to be able to search by name, as that would involve either choosing
between names after applying the filter or showing any possible matches,
so this seems fine.

--

Owen and I did observe that we were able to cause AJAX errors while
using this autocomplete, but we are not 100% sure how we caused the error.
In my case, I was able to occasionally cause it by typing in a name
then backspacing rapidly. The ajaxError method is attached to every
element in the DOM (yikes) so it's tough to say what exactly is the
source of the error (which is signalled by a pop-up window that can be
cancelled).

The error is quite rare so I don't think it's necessarily a problem
for us.

One idea that Owen had was to remove the current error message, which
is very unhelpful and replace it with an error like "Something went
wrong. Try again."

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d536ed92fa6488a37a5e6325acb2b9b12f89ddaf)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11059: (follow-up) restore time in staged dates in addorderiso2709.tt
Fridolyn SOMERS [Tue, 12 Nov 2013 16:19:09 +0000 (17:19 +0100)]
Bug 11059: (follow-up) restore time in staged dates in addorderiso2709.tt

Follow-up patch to restore the display of time in
acqui/addorderiso2709.tt in staged date.
Simply uses an option of KohaDates TT plugin.
This time may be useful if there where several imports in the same day.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cfa0dc1aedf3a280f98b9a1728853a6041f59af5)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11059: fix date sorting of import batches in basket add form
Lyon3 Team [Tue, 12 Nov 2013 19:32:34 +0000 (15:32 -0400)]
Bug 11059: fix date sorting of import batches in basket add form

This patch improves the sorting of staged import batches by date,
particularly when the dateformat system preference is set to anything
other than YYYY-MM-DD.

Adds title-string sorting type to enable this.

To test:

[1] Ensure that there are at least three staged
    bib import batches, with upload timestamps such that
    date sorting errors would be apparent.
[2] Set the dateformat system preference to either DD/MM/YYYY
    or MM/DD/YYYY.
[3] Create a new basket in acquisitions, then chose to add
    a new order line from a staged record batch.
[4] In the list of batches, click on the 'staged' column
    heading to sort by date.
[5] Observe that dates are sorted in alphanumeric order, not date
    order.
[6] Apply the patch and refresh.  This time, dates should sort
    correctly.

Signed-off-by: Fridolyn SOMERS <fridolyn.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 097a92b3188d62e9797d18313715c35d9dc186b4)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11242: fix opac-MARCdetail.pl display and warnings
Mark Tompsett [Wed, 13 Nov 2013 20:55:24 +0000 (15:55 -0500)]
Bug 11242: fix opac-MARCdetail.pl display and warnings

This patch improves the public catalog MARC view display
of records that contain subfields that are not defined in
the framework used by the bib record.

To test:

(RM note: it may be easier to find or create a MARC record that
 contains a subfield not present in the default framework, then
 load it, rather than fiddle with the MARC frameworks in your
 test database.)

BACK UP YOUR DATABASE!
 1) Search for an item in OPAC
 2) Open OPAC detail
 3) Click 'MARC View' link
 4) Look for something with multiple lines (e.g. 260 or 942)
 5) In another tab, Go to staff client and log in
 6) Go to the staff client URL similar to:
     /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page
    where ##### is the biblionumber.
 7) Edit -> record
 8) Note the framework used.
 9) More -> Administration
10) MARC bibliographic frameworks
11) Click 'MARC structure' for the framework used by the item
     shown in OPAC.
12) Find the tag (e.g. 260 or 942) and click 'Subfields'
13) Delete of the matching subfields (e.g. 260$b) shown in the
     OPAC tab
14) Clear your opac error log.
15) Refresh OPAC tab. The tag subfields are split.
16) There are opac-MARCdetail.pl warnings.
17) Apply patch
18) Clear your opac error log.
19) Refresh OPAC tab. The tag subfields are no longer split strangely.
20) There are no opac-MARCdetail.pl warnings.
RESTORE YOUR DATABASE.

This also silences a series of warnings triggered by catching
undef hash references.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 38503e18a38116646c9746b13f013b3c11fe55c1)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11183: get rid of some log noise from the OPAC
Srdjan [Fri, 1 Nov 2013 08:05:09 +0000 (21:05 +1300)]
Bug 11183: get rid of some log noise from the OPAC

To test in OPAC:
* With the OPAC System Preference EnableOpacSearchHistory set
  to Keep, a simple search triggers the warning patched on
  line 626 of opac-search.pl
* Selecting a search result item with no Collection Code
  set triggers the warning patched on line 576 of opac-detail.pl
* Have an item with Collection Code. Check that the Collection
  Code shows.
* Collection Code is set by editing an item in the staff client
  (952$8)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ec206d18980b2438cfe3da9e89455eda319dd8d7)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 7484: keep selected values when changing search type on authority search form
Fridolyn SOMERS [Wed, 17 Jul 2013 15:26:34 +0000 (17:26 +0200)]
Bug 7484: keep selected values when changing search type on authority search form

1) I'm on the "Search authorities" tab. I select an authority type,
   then change the active tab. The type change is lost.
2) I'm on a tab and type a search pattern, then change tab, the string
   is lost.

This behaviour is logical, given the fact that we're using tabs, but it
would be more practical to keep the typed informations when the user
changes the search mode.

This patch add a few JQuery code to synchronise inputs between all
tabbed authorities search forms.

Test plan :
- Go to Authorities home page : cgi-bin/koha/authorities/authorities-home.pl
- In toolbar, "Search main heading" is selected
- Change all inputs : authotity type, operator, term, and sort order
- Click on "Search all headings" tab
=>  Inputs are the same has previous tab
- Click on "Keyword search" tab
=>  Inputs are the same has previous tab

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Explicitly declare 2 new variables used.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described, Firebug doesn't show any problems with
the Javascript.
Could be useful for other tabbed searches like the start page
as well.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 85642ededaf71b0a67805151937014f42deea2dd)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11214: improve create/edit routing list links in serial collection page
Fridolyn SOMERS [Thu, 7 Nov 2013 09:22:49 +0000 (10:22 +0100)]
Bug 11214: improve create/edit routing list links in serial collection page

When a subscription has no routing list yet, the page
serials/subscription-detail.pl shows in left menu : "Create routing list".
In serials/serials-collection.pl page, the link in table is always
"Edit routing list", even when there is no routing list.

This patch adds a conditionnal link "Edit routing list"/"Create routing
list" into serials/serials-collection.pl page.

Test plan :
- Create a subscription no. 1 without routing list and a subscription
  no. 2 with a routing list
- Go to serials/serials-collection.pl of subscription no. 1
=> You see "Create routing list" link
- Click on link
=> You see "Create routing list for"
- Go to serials/serials-collection.pl of subscription no. 2
=> You see "Edit routing list" link
- Click on link
=> You see "Edit routing list for ..."

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Functional and automated tests pass. Passes koha-qa.pl.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
With the patch applied the serial collection page shows the
right link depending on the existance of a routing list.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0c631934de5adf5c8d9d35aaaf94a19134f4a166)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11286: fix bug preventing adding a new subfield to an authority framework
Jonathan Druart [Fri, 22 Nov 2013 09:42:42 +0000 (10:42 +0100)]
Bug 11286: fix bug preventing adding a new subfield to an authority framework

Bug 10602 introduces a bug when adding a new subfield to an authority
framework. A new parameter is added in a sql query but the placeholder
is missing.

Test plan:
- edit an authority framework
- add a new subfield
- save
- boom!
DBD::mysql::st execute failed: called with 16 bind variables when 15 are
needed at
/home/home/src/admin/auth_subfields_structure.pl line 454.
- apply the patch and try again

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Tested trying to add subfield to 100, 2 for example.
Without patch silently fails (but error is logged)
With patch subfield creation or elimination is fine

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line fix for a bad bug. Confirmed the bug on master and
the fix. Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3c50683e0d6412b29144962e7f5d539fec28da04)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11171: (follow-up) fix a javascript error
Jonathan Druart [Mon, 25 Nov 2013 08:35:28 +0000 (09:35 +0100)]
Bug 11171: (follow-up) fix a javascript error

The previous patch adds an error on booksellers.pl:

TypeError: a.aoColumns[c] is undefined

It was caused by the add of the new column. The aoColumns DT parameter
should manage it.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d5281fd41ec4b2f0c497d75550e2c865d96183d8)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>
10 years agoBug 11171: Display basket group name on the supplier list page
Jonathan Druart [Wed, 30 Oct 2013 14:48:10 +0000 (15:48 +0100)]
Bug 11171: Display basket group name on the supplier list page

Test plan:

Search supplier and verify the basket group column is filled.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c9b873ff10694a9f36d15734bd2bb22e17c604c6)
Signed-off-by: Fridolin SOMERS <fridolin.somers@biblibre.com>