koha.git
10 years agoBug 11793 - Use validation plugin when creating new item type
Owen Leonard [Wed, 19 Feb 2014 17:29:34 +0000 (12:29 -0500)]
Bug 11793 - Use validation plugin when creating new item type

The page for adding a new item type includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> Item types -> New
item type. Try submitting the form with the following error conditions:

- Missing item type
- Missing description
- A non-number in the "rental charge" field

These errors should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing item type should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1d9b86aabccf1bc916b6b27e568ad984caf081f6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11795 - Use validation plugin when creating new Z39.50 server
Owen Leonard [Wed, 19 Feb 2014 18:05:19 +0000 (13:05 -0500)]
Bug 11795 - Use validation plugin when creating new Z39.50 server

The page for adding a new Z39.50 server includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> Z39.50 client
targets -> New Z39.50 server. Try submitting the form with any of the
following error conditions:

- Missing Z39.50 server name
- Missing hostname
- Missing port
- Non-numeric port
- Missing database
- Non-numeric rank
- Non-numeric timeout

These errors should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing
an existing Z39.50 server should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: replace tabs with spaces

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 19bf1e9a40ab5a8f3c86fb07dd6429bfc44f703b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11788 - Use validation plugin when creating new course
Owen Leonard [Tue, 18 Feb 2014 20:26:30 +0000 (15:26 -0500)]
Bug 11788 - Use validation plugin when creating new course

The page for adding a new course includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Course reserves -> New course. Try
submitting the form without entering a department, course number,
and/or course name. This should trigger validation warnings.

Submission of the form with valid data should work correctly. Editing an
existing course should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4e9b5110d90c3ac60c61f710ff5892b9720e643e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11787 - Use validation plugin when adding new vendor
Owen Leonard [Tue, 18 Feb 2014 19:52:26 +0000 (14:52 -0500)]
Bug 11787 - Use validation plugin when adding new vendor

The vendor entry form uses some custom JavaScript which can be removed
in favor of HTML5 validation attributes and Koha's built-in validation
plugin. This patch does so.

Also corrected: Minor validation issue.

To test, apply the patch and go to Acquisitions -> New vendor. Try
submitting the form without entering a vendor name. This should trigger
a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing vendor should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 03675fd55320f3a9bc3d4c7475bc3b9696920bd9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11785 - Use validation plugin when uploading local cover images
Owen Leonard [Tue, 18 Feb 2014 17:13:39 +0000 (12:13 -0500)]
Bug 11785 - Use validation plugin when uploading local cover images

When uploading local cover images the form should not be submitted if
no file has been selected. The existing form validation script doesn't
work. This patch adds HTML5 validation attributes and use of Koha's
built-in form validation plugin.

To test, apply the patch and go to Tools -> Upload local cover image.
Try to submit the form without selecting a file to upload. You should be
prevented from doing so. Choose a file and confirm that the upload
completes correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7faff33c8b9bd670cf7813f4cefb7aee38709ebb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10714 [Follow-up] Redirect to list contents view upon cancel after initiating...
Owen Leonard [Wed, 19 Feb 2014 20:06:36 +0000 (15:06 -0500)]
Bug 10714 [Follow-up] Redirect to list contents view upon cancel after initiating edit from list contents view (staff)

This follow-up corrects the "cancel" action on list edit actions based
on whether the edit was initiated from the list of lists or the list
contents view.

To test, view the list of lists and click the edit link next to one of
them. Click the cancel link. You should return to the list of lists you
were just viewing.

View the contents of a list. Choose "Edit list" from the edit menu.
Click the cancel link on the edit screen. You should return to the list
contents view from which you initiated the edit action.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6a323ce4ce914e757d5c1c999237ad2c0efc15e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10714: Redirect to list contents view upon save after initiating edit from list...
Owen Leonard [Mon, 12 Aug 2013 19:30:16 +0000 (15:30 -0400)]
Bug 10714: Redirect to list contents view upon save after initiating edit from list contents view (staff)

In the staff client, if you initiate a list edit from the list contents
view you should be redirected to that same view after saving your
changes. The OPAC already works this way.

To test, view the contents of an existing list. Click the "Edit list"
item under the "Edit" menu. Click save on the list edit form and you
should be redirected back to the contents view of that list.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit daa98e73f8baf178f2b0f32b4988d2414519ea4b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11479: Remove experimental given/when keywords
Colin Campbell [Mon, 6 Jan 2014 12:06:29 +0000 (12:06 +0000)]
Bug 11479: Remove experimental given/when keywords

Replace constructs using given and when by if/else
feature now generates compilation warnings in 5.18
and is liable to change behaviour.

This patch:

* replaces the construct with if/else
* reformats the if branching using perltidy
  to remove the now redundant indent

To test:

[1] Verify that prove -v t/db_dependent/MarcModificationTemplates.t
    passes.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 11faf9fde8da48c58e853d5538a8e3bbd2ae41c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11478: Replace experimental given/when keywords
Colin Campbell [Mon, 6 Jan 2014 11:53:29 +0000 (11:53 +0000)]
Bug 11478: Replace experimental given/when keywords

The keywords given and when are flagged experimental
in perl 5.18 and subject to change. This patch
replaces the construct by an if/elsif

To test:

[1] Verify that prove -v t/SimpleMARC.t passes.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 08d15a6fd1b51435b92f1056f6735c8317636068)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12271: (follow-up) fix minor errors in Bootstrap theme
Galen Charlton [Mon, 19 May 2014 16:25:53 +0000 (16:25 +0000)]
Bug 12271: (follow-up) fix minor errors in Bootstrap theme

To test:

[1] Verify that prove -v xt/author/valid-templates.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bafeb881c99142fd3abf507a3c5bcddd2c12932a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12271: (follow-up) teach valid-templates.t how to include specified templates
Galen Charlton [Mon, 19 May 2014 16:14:28 +0000 (16:14 +0000)]
Bug 12271: (follow-up) teach valid-templates.t how to include specified templates

Two of the template includes in the Bootstrap theme cannot be tested
all by themselves because they require that the template that includes
them define BLOCKs.  This patch ensures that they are excluded
from individual testing; they will get exercised sufficiently by being
including by all of the other Bootstrap templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b97e691ef87bf3fd89f38ba0b1772d8fcac44b33)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12271: add Bootstrap templates to valid-templates.t tests
Fridolin Somers [Fri, 16 May 2014 09:25:19 +0000 (11:25 +0200)]
Bug 12271: add Bootstrap templates to valid-templates.t tests

valid-templates.t actually tests the templates and includes of only
the "prog" theme at opac and intranet.  It does not test the opac
templates and includes of bootstrap theme, nor ccsr.  This is critical
since this test is used for patch integrations in release maintenance.

This patch adds the test of bootstrap opac theme.
I did not manage to add the ccsr theme since it is not a real theme,
meaning it has no templates and not all includes.

Test by runnning perl xt/author/valid-templates.t and looking at the
logs.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Now there are 902 lines, bootstrap tested (1 error detected!)
No koha-qa errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8bc2fb4df6e14a97c3aa7a62fbacc4bc7cf5772d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11732: Eliminate warning on undefined branchcode
Marcel de Rooy [Mon, 10 Feb 2014 12:28:16 +0000 (13:28 +0100)]
Bug 11732: Eliminate warning on undefined branchcode

When you run the Reserves test, you have the warnings:
Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 138.
Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 148.
This patch removes that warning.

Test plan:
Run the Reserves.t again.

Revised Test Plan
-----------------
Run the following on the command line prompt before and after
applying the patch:
    perl -e "use C4::Letters; *C4::Context::userenv= sub { return {} }; my \$blah=C4::Letters::getletter('circulation','DUE', 'BRA');"
Before the patch there will be errors (as above), after there will not.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
IndependentBranches must be on.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 518870223669e8d4e3893401d18da0610ac1f6c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11202: (follow-up) update number of expected tests for t/QueryParser.t
Galen Charlton [Wed, 19 Feb 2014 21:00:32 +0000 (21:00 +0000)]
Bug 11202: (follow-up) update number of expected tests for t/QueryParser.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c9dd8b8bc3d07d1f4fc132759758f337e3d23196)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11202: FIX UT for QueryParser.t
Jonathan Druart [Mon, 3 Feb 2014 12:17:17 +0000 (13:17 +0100)]
Bug 11202: FIX UT for QueryParser.t

Test plan:
prove t/QueryParser.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0e92d21d0ed8683e2905812377e7f4dcf2a0a882)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11202: Improve UNIMARC biblio indexing
Mathieu Saby [Tue, 5 Nov 2013 11:33:04 +0000 (12:33 +0100)]
Bug 11202: Improve UNIMARC biblio indexing

This patch makes the following changes to UNIMARC biblio indexing :
A. Changes to UNIMARC conf files
1. add comments to biblio-koha-indexdefs.xml
2. make biblio-koha-indexdefs.xml more compact by grouping some
   declarations
   Ex : 200$f and 200$g => one declaration for 200$fg
3. suppress unneeded declarations (indexing of some 4XX fields and 6XX
   fields not in unimarc format)
4. unindex some (sub)fields unneeded by most users (318, 207,230,210a,
   215, 4XXd)
5. change the way 308 field is indexed (no visible changes)
6. replace Title-host with Host-item -- see bug 11119
7. index 208 in Material-Type -- see bug 11119
8. index 100 pos 8-9 and 9-12 in pubdate:y and pubdate:n
9. index 100 pos 8-9 in pubdate:s instead of 210$d
10. Index all subfields of note 334 and 327 in note index
11. Index 304 and 327 in title index as well as note index
    327 can contain a list of titles included in a work
    304 can contain the title of the original work in case of a
    translation
12. Index 314 in author index as well as note index
    314 can contain authors not mentionned in 200$f/g (the 4th, 5th etc.
    author)
13. Index 328 note in Dissertation-information as well as note
14. Index 328$t in Title

B. Changes to ccl.properties :
1. add a new index Dissertation-information (1056)
2. fix EAN, pubdate and acqdate (they were not linked with bib1 attributes)

C. Changes to Search.pm
1. add Dissertation-information and suppress Title-host and UPC

D. Changes to QP config file queryparser.yaml
1. add Dissertation-information
2 fix EAN, pubdate and acqdate

Test plan :
If you cannot test in GRS1, test only in DOM, as GRS will be deprecated.

1. Apply the patch in a UNIMARC Koha running with DOM and ICU
2. copy src/etc/searchengine/queryparser.yaml into the main config
   directory of QP
3. copy src/etc/zebradb/ccl.properties into the main config directory
   of Zebra
4. copy src/etc/zebradb/marc_defs/unimarc/biblio/* into the main config
   directory of Zebra
5. reindex biblios (rebuild_zebra.pl -r -b -x -v)
6. test note index : make some searches on 334$b or 327$b
7. test author index : make some searches on 314 field
8. test title index : make some searches on 304 and 327 field, make a
   search on 328$t subfield
9. test dissertation-information index : make some searches on 328 field
10. In a record, put in the dates of 100 fields the values "1000" (1st
    date) and "1001" (2d date) ; try to search a book written in year
    1000, you should find the record ; idem for year 1001
11. make some searches and sort by date. It should work better as before,
    especially if you have values like "c2009" or "impr. 2010" in 210
    field
12. Regression test : make some searches on several indexes, like EAN,
    etc. It should work as before

Test 10-12 with and without Queryparser activated.
Be careful: with Queryparser activated, the index names (title,
dissertation-information...) must be entered in lowercase only.
Of course, to test search and sort by dates, you need to have full
records, with dates in 100 field as well as 210 field.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b6118db2f595cec027dc9c809dcfb639ec4a320b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10544: (follow-up) update MARC21 DOM index definitions
Galen Charlton [Wed, 19 Feb 2014 20:35:08 +0000 (20:35 +0000)]
Bug 10544: (follow-up) update MARC21 DOM index definitions

This patch updates the MARC21 DOM index definitions to
index the 952$i as 'Number-local-acquisition' rather than
'stocknumber'.

To test (for a MARC21/DOM setup):

[1] Copy the MARC21 biblio-zebra-indexdefs.xsl over to the
    active Zebra configuration directory.
[2] Reindex the bib records.
[3] Verify that 'stocknumber', 'inv', and 'number-local-acquisition'
    searches work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aaff735269bc2df1df030727ee85a12e7a28db11)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10544 - add Number-local-acquisition in QueryParser config
Fridolyn SOMERS [Wed, 24 Jul 2013 10:39:59 +0000 (12:39 +0200)]
Bug 10544 - add Number-local-acquisition in QueryParser config

This patch adds the Number-local-acquisition into QueryParser
configuration file.
Like in ccl.properties, "Number-local-acquisition" is the main index
name and "stocknumber" and "inv" are aliases.

Test plan :
Enable QueryParser :
- Enable UseQueryParser syspref
- Edit your koha-conf.xml
- Add to "config" node : <queryparser_config>[your path]/etc/searchengine/queryparser.yaml</queryparser_config>,
  adapt [your patch] to your install configuration folder
- If needed copy from sources "etc/searchengine/queryparser.yaml" into
  your install configuration folder
Test search :
- Add Number-local-acquisition on an existing subfield in records.abs.
  For example on item barcode field
- Reindex Zebra database
- Choose a value of this field that will match some results. For
  example : "0*" will match all barcodes beginning with zero
- In intranet, enter this URL : <your server>/cgi-bin/koha/catalogue/search.pl?idx=stocknumber&q=0*&sort_by=relevance
=> You get some results
- In intranet, enter this URL : <your server>/cgi-bin/koha/catalogue/search.pl?idx=inv&q=0*&sort_by=relevance
=> You get the same results
- In intranet, enter this URL : <your server>/cgi-bin/koha/catalogue/search.pl?idx=number-local-acquisition&q=0*&sort_by=relevance
=> You get the same results

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comments on case sensitivity of index names in QueryParser, see Bugzilla.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f62e45dc92d0209e17c798a39f3425e9a2332586)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10544: add Number-local-acquisition in known indexes
Fridolyn SOMERS [Wed, 24 Jul 2013 10:37:00 +0000 (12:37 +0200)]
Bug 10544: add Number-local-acquisition in known indexes

Adding Number-local-acquisition in C4::Search known indexes allows to
search without using "ccl=" prefix.

Also corrects in ccl.properties : inv must be an alias of
Number-local-acquisition.

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 b0f39cee0de80568d78903b1926fa6eeefb6f16e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10544: ensure that stocknumber searches work for MARC21
Fridolyn SOMERS [Fri, 5 Jul 2013 14:35:45 +0000 (16:35 +0200)]
Bug 10544: ensure that stocknumber searches work for MARC21

Bug 6256 replaced in bib1.att stocknumber by Number-local-acquisition
for number 1062.

In this case, Number-local-acquisition must be used in record.abs and
stocknumber can be an alias of it in ccl.properties.

Test plan (for MARC21/GRS1):
- drop zebra database (rebuild_zebra.pl -r ...)
- reindex
- test in simple search : ccl=Number-local-acquisition,alwaysmatches=''
=> you get all records with a stocknumber
- test in simple search : ccl=stocknumber,alwaysmatches=''
=> you get the same results

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>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 10e1cbeb1421a6351ac0df4d0c76a8ae79d4dd9d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11644: (follow-up) add FIXME
Galen Charlton [Wed, 19 Feb 2014 20:04:22 +0000 (20:04 +0000)]
Bug 11644: (follow-up) add FIXME

Arithmetic with monetary amounts is a *hard* problem -- or if
not hard, at least super-fiddly, particularly since in theory
a Koha database could have to deal with dozens of currencies
if used by a large research library.  This patch adds a FIXME
implicitly commenting on the poor state of affairs of available
monetary calculation modules on CPAN.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7efc10542be6d836c52cf598174e28f84a9d6470)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11644: fix occasional failure to update fund amount due to floating-point math
Kyle M Hall [Thu, 30 Jan 2014 17:39:19 +0000 (12:39 -0500)]
Bug 11644: fix occasional failure to update fund amount due to floating-point math

When attempting to update a fund, if the amount unalloccated for the
fund is equal to the total, you can be prevented from saving. This is
due to imprecise floating point number comparison in
check_parent_total.pl

Test Plan:
1) Create a fund where the amount unallocated is equal to the amount
   unallocated for the budget period
2) Edit the fund, attempt to change the name of the fund
3) Note you recieve an error and cannot save
4) Apply this patch
5) Repeat step 2
6) Note you can now update the fund

Signed-off-by: Sean McGarvey <smcgarvey@pascocountyfl.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ba689152e431217c8dd02d6ce0b8d14ae8d9f5da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11777: add regression test
Galen Charlton [Wed, 19 Feb 2014 17:09:34 +0000 (17:09 +0000)]
Bug 11777: add regression test

This patch adds a regression test for ensuring that the
authorisedby field is returned by SearchOrders().

To test:

[1] Upon applying the main patch, verify that
    prove -v t/db_dependent/Acquisition.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a97f21ad3ba53ecd30089c7f802ab9b3ad430806)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11777: ensure "created by" is displayed by the order receiving page
Amit Gupta [Tue, 18 Feb 2014 09:27:44 +0000 (14:57 +0530)]
Bug 11777: ensure "created by" is displayed by the order receiving page

This fixes a regression introduced by the patches for bug 10723.

To Test:
1) Create budget and fund under budget administration.
2) Create Vendor in acquisitons module.
3) Create basket under vendor.
4) Create order and choose budget while creating order.
5) Click on Receive shipment button.
6) Click on receive link on the right hand side you
   will be able to see a staff user name in the "created by"
   field.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ed6e2b57a1d47f413aa4f5f691e82b849daa8468)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11783: ensure CD field in SIP patron information response is populated
Kyle M Hall [Tue, 18 Feb 2014 14:47:32 +0000 (09:47 -0500)]
Bug 11783: ensure CD field in SIP patron information response is populated

If a patron has a record-level hold that is unavailable, any patron
information request will send back an empty CD field when this field
should have an item barcode in it [RM note: this actually isn't
universally true -- the SIP2 standard is silent as to what is supposed
to go in the CD field. Some SIP2 devices do indeed want an item
barcode, but others are known to just want a display of the title
and author of the request in question.  Providing an option is the
topic of a new enhancement request, however.]

This is due to a minor error in ILS::Patron::_get_outstanding_holds
where GetItemnumbersForBiblio is assumed to return an array but in
reality returns an arrayref.

Test Plan:
1) Create a record level hold for a patron and record
2) Using SIP2, make a patron information request
3) Note the empty CD fields
4) Apply this patch, restart SIP server
5) Repeat step 2
6) Note the CD field now has a barcode

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I did not test this patch but the following code shows me it is correct:
  use C4::Items;
  use Data::Dumper;
  my $biblionumber = 5035;
  my $itemnumber = (GetItemnumbersForBiblio($biblionumber))[0];
  say Dumper $itemnumber;
  $itemnumber = (GetItemnumbersForBiblio($biblionumber))->[0];
  say Dumper $itemnumber;

displays:

$VAR1 = [
          '23168',
          '23169',
          '23170',
          '23171',
          '23172'
        ];

$VAR1 = '23168';

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 37a0e888199f1a1f8eefd38ad6ada786403fe034)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases
Galen Charlton [Wed, 19 Feb 2014 16:40:06 +0000 (16:40 +0000)]
Bug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases

This patch adjusts the new GetLoggedInBranchcode() template function so
that it returns the empty string rather than undef if there is no
active user environment.  That way, there won't be lots of undefined
value warnings if/when this function gets used in the OPAC.

This patch also adds test cases.

To test:

[1] Verify that there are no regressions in the main test
    plan for this bug.
[2] Verify that prove -v t/db_dependent/Koha_template_plugin_Branches.t
    passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 065a3a5efa9b90723460a607ac85591c17945b00)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11779: fix unexpected change in logged-in library when changing overdue notice...
Kyle M Hall [Tue, 18 Feb 2014 12:43:44 +0000 (07:43 -0500)]
Bug 11779: fix unexpected change in logged-in library when changing overdue notice triggers

Steps to reproduce:
1) Log into staff intranet
2) Set logged in branch
3) Browse to tools/overdue notice triggers
4) Select a branch from the pulldown that is not your logged in branch
5) use the "Check out" bar at the top of the page to search for a patron
to check out to
6) Once you have landed here, click the "check out" tab link again, or
   the Edit button ( any action really )
7) Note your logged in branch has now changed to the once selected
   when editing the notice/status triggers

This is due to the way the patron search passes the branchcode to be
used via the form. This form assumes the branchcode variable is
always the currently logged in branch, which may not and is not
always the case.

Test Plan:
1) Apply this patch
2) Repeat the steps to reproduce above
3) Note your logged in branch does not change

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Funny bug :) This patch fixes the described issue and should not
introduce regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 858083c8e907bde4efa6842cd45ff91bf1f6e24f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11784 - fix displaying patron images in self checkout
Marc Véron [Tue, 18 Feb 2014 00:18:23 +0000 (01:18 +0100)]
Bug 11784 - fix displaying patron images in self checkout

I suppose this bug was introduced with Bug 10636 (patronimage should
have borrowernumber as PK, not cardnumber)

To test:
- Have a Patron with image. Configure everything to show image in SCO.
- Go to SCO and log in patron
- Image does not show up (broken link)
- Apply patch
- Test with prog, ccsr and bootstrap themes
- Image should display

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9d5fadb9831f03ab80489f9f18467a1796fc9447)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11740 - Use new DataTables include in quotes upload template
Owen Leonard [Mon, 10 Feb 2014 20:29:06 +0000 (15:29 -0500)]
Bug 11740 - Use new DataTables include in quotes upload template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
quotes upload page.

To test you need a CSV file of quotes to upload ( "source","text" ).
Go to Tools -> Quote editor and click the "Import quotes" button. Upload
the CSV file and confirm that the table which previews the import
results loads correctly. Sorting is not enabled, but pagination and
searching should work.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
No regression found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d05394ff2b27f7e08e41b908b445a33414edc0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11767 - Use validation plugin when creating new authority framework tag
Owen Leonard [Fri, 14 Feb 2014 19:29:47 +0000 (14:29 -0500)]
Bug 11767 - Use validation plugin when creating new authority framework tag

The page for adding a new tag to an authority framework includes some
custom form validation JavaScript which can be removed in favor of HTML5
validation attributes and Koha's built-in validation plugin. This patch
does so.

The patch also moves some tag markup out of the script and into the
template where it belongs.

To test, apply the patch and go to Administration -> Authority types ->
MARC structure -> New tag. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing tag should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5ee8268a8df6ac193aa0500f4b801a3d359c1838)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11766 - Use validation plugin when creating new authority type
Owen Leonard [Fri, 14 Feb 2014 18:11:04 +0000 (13:11 -0500)]
Bug 11766 - Use validation plugin when creating new authority type

The new authority type entry form uses custom form validation
JavaScript. This patch removes it in favor of using HTML5 validation
attributes and Koha's built-in validation plugin.

To test, go to Administration -> Authority types and click "New
authority type." Try submitting the form without entering any data. You
should see a warning about required fields. Upon entering text in those
fields the warning should disappear.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ac9d872fefc867d4f068d425bcfcb929435809bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11749 - Remove unused jQuery plugin jquery.hoverIntent.minified.js from the staff...
Owen Leonard [Wed, 12 Feb 2014 15:12:58 +0000 (10:12 -0500)]
Bug 11749 - Remove unused jQuery plugin jquery.hoverIntent.minified.js from the staff client

The jQuery plugin jquery.hoverIntent.minified.js is used only in the
OPAC, not the staff client. This patch removes it from the staff client.

To test, apply the patch and search for instances of "hoverIntent." Only
references in OPAC templates should be returned.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6fd26558894869c0e80666007cab3b9edb090008)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11771 - Use validation plugin when creating new MARC framework tag
Owen Leonard [Fri, 14 Feb 2014 21:24:10 +0000 (16:24 -0500)]
Bug 11771 - Use validation plugin when creating new MARC framework tag

The page for adding a new tag to a MARC framework includes some
custom form validation JavaScript which can be removed in favor of HTML5
validation attributes and Koha's built-in validation plugin. This patch
does so.

The patch also moves some tag markup creation out of the script and into
the template where it belongs.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> MARC structure -> New tag. Try submitting the form without
entering a tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing tag should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Great improvement! Before this patch, I got a JS alert but the form was
submitted anyway.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d90b4b6a08aa946fd40d1c1a45d1cc4ad64c30e5)

10 years agoBug 11756: improve default sorting on hold ratios report
Owen Leonard [Fri, 14 Feb 2014 13:48:46 +0000 (08:48 -0500)]
Bug 11756: improve default sorting on hold ratios report

The DataTables plugin doesn't by default take multiple columns into
account when sorting. The hold ratios report presents a situation where
it makes sense to sort by default based on two columns: hold count and
title, since there are likely to be many titles with the same hold
count.

This patch adds sorting by default on holds (descending) and title
(ascending). It also modifies the configuration of the title sort to
exclude articles when sorting.

To test, view the hold ratios report. If necessary use the filter form
to reduce the minimum hold ratio and generate more results. Confirm that
the correct columns can be sorted.

Note that by default one can manually trigger sorting on two columns by
shift-clicking the second column header.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7514dc897cc49683915112229667ec1f654873ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11730: ensure that C4::Charset loads C4::Context
Stéphane Delaune [Mon, 10 Feb 2014 09:52:59 +0000 (10:52 +0100)]
Bug 11730: ensure that C4::Charset loads C4::Context

C4::Charset::SetMarcUnicodeFlag() fetches system preference
values, so since it invokes routines in C4::Context, it should
load the module.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b9d2a832db6d2a75d6466a349b769e8285d1f0c8)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10789: Follow-up: restored second SQL parameter in GetLastOrderReceivedFromSubscr...
Marcel de Rooy [Tue, 18 Feb 2014 15:26:07 +0000 (16:26 +0100)]
Bug 10789: Follow-up: restored second SQL parameter in GetLastOrderReceivedFromSubscriptionid

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e27ea08887a0332692c37b05b15021b14b1bef78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10789: Follow-up: Fix typo "infermation"
Marcel de Rooy [Tue, 18 Feb 2014 15:04:46 +0000 (16:04 +0100)]
Bug 10789: Follow-up: Fix typo "infermation"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 201af593f885ecb11c76d02baa6e27ef5e744e30)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10789: Remove unnecessary calls to $sth->finish in C4::Acquisitions
Colin Campbell [Sun, 8 Dec 2013 22:26:18 +0000 (22:26 +0000)]
Bug 10789: Remove unnecessary calls to $sth->finish in C4::Acquisitions

C4::Acquisitions contained a number of unnecessary calls to
$sth->finish. Removed these and the associated variables introduced to
cache query results between fetch and the return

Where finish was the end of the routine I have added an
explicit return to document that no data is returned.

A number of places made query calls and fetched a single
row. Such a case could require an explicit finish.
These assume that they are looking up with a unique key.
To remove assumptions and isolate the code from future changes
I've switched these to fetching all and returning the
first row. I have commented these cases.

For fuller explanation see perldoc DBI

What I tested:
Edit existing basket, chnged name
Modify order line, change vendor price
Create new basket and add order
Delet this order
Delte this basket
New Basket, new order, user added, user removed
Add contract to vendor, change details, delete contract
Search order biblio
Create basket group, add basket to group, remove basket from group
Delete basket group
Receive order

Everything behaved as I expected

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2fac9a76450835337b015956a6f3150586aa5a17)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11743 - Remove unused DataTables plugin from OPAC theme directories
Owen Leonard [Tue, 11 Feb 2014 18:02:03 +0000 (13:02 -0500)]
Bug 11743 - Remove unused DataTables plugin from OPAC theme directories

The Bootstrap and CCSR theme directories contain older copies of the
DataTables plugin which is no longer in use. This patch removes them
both.

To test, apply the patch and confirm that DataTables still work on the
following pages in both the Bootstrap and CCSR OPAC themes:

- The Cart. Add items to the Cart, open it and confirm that the table is
  sorted correctly.

- The detail page: View the detail page for a title (opac-detail.pl)
  with multiple items and confirm that the table of items is sorted
  correctly.

- A subscription's "full history" page: Navigate to the detail page of a
  subscription in your catalog which has received multiple issues. From
  the subscriptions tab click the "More details" link, then the "Full
  history" link. Confirm that the table of issues is sorted correctly.

- Search history: Enable the EnableOpacSearchHistory system
  preference. Perform a few searches so that your current session
  will record them. View the search history page and confirm that the
  tables of current and past searches are sorted correctly.

- Suggestions (enable 'suggestion' system pref if necessary)
- Tags (enable TagsEnabled if necessary)
- Most popular (enable OpacTopissue if necessary)

- User summary (opac-user.pl): Checkouts, overdues, and holds tables
  should all sort correctly.
- Self checkout: Enable WebBasedSelfCheck if necessary. Check out as a
  patron who has multiple existing checkouts. Confirm that the table is
  sorted correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Existing uses of datatables.min.js don't point to the theme directory.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d3c565f12c5c9136588a17e6497d860f6c5e95ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11773: fix crash in sco-main.pl if no active currency is set
Marc Véron [Sat, 15 Feb 2014 16:07:55 +0000 (17:07 +0100)]
Bug 11773: fix crash in sco-main.pl if no active currency is set

If no currency is defined as active and a patron with debts tries to
check out in welf checkout moduel, sco-main.pl crashes with:

Software error:
Can't use an undefined value as a HASH reference at /usr/share/kohaclone/opac/sco/sco-main.pl line 190.

This patch tests for active currency and simply does not display a
currency symbol if appropriate.

Test plan:

1) Make sure you have a patron with debts and no currency defined as
   active.  (Home › Administration › Currencies & Exchange rates
   › Currencies )
2) Go to Self checkout module and try to checkout an item to this patron
   Result: Crash with error message "Can't use an undefined value as a
   HASH..."
3) Apply patch
4) Reload and try to checkout again
   Expected result: Message "You owe the library..." without currency
   symbol
5) Define a currency as active and try to checkout again
   Expected result: Message "You owe..." with currency symbol

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1db56c834b297eb7fd968691f66ef3517771cba5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11765 - Remove unused function isDate from templates
Owen Leonard [Fri, 14 Feb 2014 17:52:34 +0000 (12:52 -0500)]
Bug 11765 - Remove unused function isDate from templates

Several administration templates declare but do not use the JavaScript
function isDate(). This patch removes the declarations.

To test, apply the patch and search for instances of "isDate" in Koha
templates, includes, and JavaScript files. There should be no results.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I'm not sure this function has ever been used.
This patch removes the toUC in tools/letter.tt too.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1aeb1d7e0b4c027b0277f5f5878a3b047abd4b82)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11764 - Move repeatedly redefined function toUC() into staff-global.js
Owen Leonard [Fri, 14 Feb 2014 17:22:19 +0000 (12:22 -0500)]
Bug 11764 - Move repeatedly redefined function toUC() into staff-global.js

toUC() is repeatedly declared on many administration templates. This
function, used to transform user input to uppercase, can be added to
staff-global.js to prevent repetition.

To test, confirm that transformation to uppercase is working on the
following Administration pages when text is entered in a form field and
focus is moved to the next field:

- Authority types -> New: Test the "Authority type" field.
- MARC bibliographic framework -> New framework: Test the "Framework
  code" field.
- Patron types and categories -> New category: Test the "Category code"
  field.
- Currencies and exchange rates -> New currency: Test the "Currency"
  field.
- Item types -> New item type: Test the "Item type" field.
- Z39.50 client targets -> New Z39.50 server: Test the "Z39.50 server"
  field.

The following pages do not call the toUC function despite the fact that
they included it:

auth_tag_structure.tt
printers.tt
roadtype.tt
stopwords.tt
systempreferences.tt

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
tools/letter.tt declares this js function and don't use it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3c7edd1cbef811de89d6ee0b54cd690dd36d6ff4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11628: add missing staffaccess permission to French userflags.sql file
Sophie Meynieux [Tue, 28 Jan 2014 16:16:18 +0000 (17:16 +0100)]
Bug 11628: add missing staffaccess permission to French userflags.sql file

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This permission exists in other installer files (for all other languages).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1b08f924513daadaff1258659e17d5caf0a53ea4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11748 - Remove unused jquery.uitablefilter.js plugin
Owen Leonard [Wed, 12 Feb 2014 14:49:57 +0000 (09:49 -0500)]
Bug 11748 - Remove unused jquery.uitablefilter.js plugin

This patch removes a jQuery plugin which was added for use with the old
tablesorter plugin. Since the tablesorter plugin has been removed and
replaced with DataTables this plugin can also be removed.

To test, apply the patch and search for instances of the plugin:

grep -r -l "jquery.uitablefilter.js" *

There should be no results.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 42b71b87cc21ff69072116c7e42b02ad1f85932b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11757: remove dependency on POE
Galen Charlton [Fri, 14 Feb 2014 00:24:56 +0000 (00:24 +0000)]
Bug 11757: remove dependency on POE

The last use of the POE family of Perl modules went away with
the removal of zebraqueue_daemon.pl per bug 9001.  Consequently,
this patch removes POE as a dependency.

To test:

[1] Verify that "git grep POE" and "git grep libpoe" report
    nothing.
[2] Verify that koha_perl_deps.pl -a does not report POE
    as a dependency.
[3] (extra credit) verify that Debian packages can be built
    that do not list libpoe-perl as a dependency.

This patch also updates some distro-specific installation
instructions and scripts, but makes no representations about
whether those instructions currently work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b67dac81cceaab356486001292cff40977682fff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11735 - Use new DataTables include in calendar template
Owen Leonard [Mon, 10 Feb 2014 17:59:07 +0000 (12:59 -0500)]
Bug 11735 - Use new DataTables include in calendar template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
calendar template and corrects some table sorting configuration errors.

To test you should have multiple calendar entries in various categories
of holiday: Unique holidays, repeating yearly holidays, repeating weekly
holidays, and exceptions. Sorting of date columns should work regardless
of your dateformat system preference.

Signed-off-by: merlissia <manuelimel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: Day of week is not correctly sorted: Sundays, Mondays, Thursdays.
But it is not a regression. It is caused by the ugly way to display
weekdays (document.write).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ef65eee25e2946adf20650d61781363f735058b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11739 - Use new DataTables include in notices template
Owen Leonard [Mon, 10 Feb 2014 20:07:52 +0000 (15:07 -0500)]
Bug 11739 - Use new DataTables include in notices template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
Notices & Slips page.

To test, view the Notices & Slips page (tools/letter.pl). Confirm that
the table of notices is sorted correctly.

Signed-off-by: merlissia <manuelimel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 26696e3b299ff9ca96d7a834a172f6534ef952d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11737: (follow-up) remove extra fnReloadAjax.js
Jonathan Druart [Tue, 11 Feb 2014 09:28:23 +0000 (10:28 +0100)]
Bug 11737: (follow-up) remove extra fnReloadAjax.js

the file dataTables.fnReloadAjax.js exists in the interface and
themelang directories.
It is only used in quotes.tt.
So the unused one can be removed.

test plan:
git grep fnReloadAjax.js
should return only 1 ref (quotes.tt)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e0d7d998c2025fdb8ed1caf4303f754e05164c97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11737 - Use new DataTables include in quotes management template
Owen Leonard [Mon, 10 Feb 2014 19:30:26 +0000 (14:30 -0500)]
Bug 11737 - Use new DataTables include in quotes management template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
quotes management page.

To test you should have a multiple quotes in your database. Apply the
patch and view the quotes manager page (tools/quotes.pl). Confirm that
table sorting works correctly.

Signed-off-by: merlissia <manuelimel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 326ccb57ce8c537630b117bc92bd49ca4947c52b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11652: ensure that merging authority records corrects biblios
Janusz Kaczmarek [Fri, 31 Jan 2014 15:12:10 +0000 (16:12 +0100)]
Bug 11652: ensure that merging authority records corrects biblios

When merging authority records in librarian interface biblio records
linked to deleted authority are not being corrected (i.e. have still
old heading and orpaned link in $9).

Test plan:
1. Have two authorities in the catalogue, linked to biblio records.
2. Merge them with the new merge facility (cf. Bug 5202).
3. Have a look a the biblio record(s) previously linked to the removed
   authority. It should still have the old heading AND orpaned authority
   link in $9.

4. Apply the patch.
5. Refresh the test records (or use another set).
6. Repeat 1-3. Headings should be refreshed and the correct authid link
   should be in $9 now.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Note: new record count on the authority record will show
      after reindexing.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0070a7f6afb30b6f7ae8bc0eb073a4c39e0f783a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11704: Make */svc/report print the correct headers
Tomas Cohen Arazi [Thu, 6 Feb 2014 20:30:24 +0000 (17:30 -0300)]
Bug 11704: Make */svc/report print the correct headers

To test:
1 - Go through the first comments instructions to reproduce
    and verify the bug is present (OPAC and STAFF)
2 - Apply the patch
3 - Repeat step 1 and notice
   * characters are not broken anymore
   * the header is correct
4 - 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 aace5d436dbab1f13e2e1c06d0b4ed5f1ec13ced)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11670 - Remove sorting from patron lists action columns
Owen Leonard [Mon, 3 Feb 2014 17:03:14 +0000 (12:03 -0500)]
Bug 11670 - Remove sorting from patron lists action columns

The list of patron lists has sortable columns for the add, edit, and
delete buttons. These columns should not be sortable. This patch removes
sorting.

This patch also adds the "btn-mini" class to the in-table buttons to
make the table more compact.

To test you must have existing patron lists. Apply the patch and
navigate to Tools -> Patron lists. The columns containing the add, edit,
and delete buttons should not be sortable. Other columns should sort
correctly.

---------------------------------------------------------------------

Created to patron lists and confirmed the collums 'add patrons', 'edit'
and 'delete' are no longer sortable. Column 'Name' and 'Patrons in list'
are still sortable. The size of buttons are smaller.
I also agree this is an improvement.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9ac83cdaafb267e1a76aa957b86b7e7b8955d819)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11721 - Use new DataTables include in suggestions template
Owen Leonard [Fri, 7 Feb 2014 21:02:06 +0000 (16:02 -0500)]
Bug 11721 - Use new DataTables include in suggestions template

This patch modifies the template for the suggestions page to use
the new DataTables include. This simplifies the inclusion of assets and
updates to the latest DataTables version.

Sorting is now configured to exclude articles when sorting the title
column.

To test, apply the patch and view the suggestions page (Acquisitions ->
Suggestions). Sorting of suggestions should work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Note: the columsn fund and status are not sortable/searchable
before and after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2f379f3fa78ea12c3955addfa733fb8d8cdb0c2b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11687: remove disused script statecollection.pl
Jonathan Druart [Wed, 5 Feb 2014 09:39:26 +0000 (10:39 +0100)]
Bug 11687: remove disused script statecollection.pl

It can be removed.

Test plan:
  git grep statecollection
returns no occurrence.

Signed-off-by: Holger Meissner <h.meissner.82@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b2d08f8359c187f92e1df46ad29b83852fb03079)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11631: Make i18n toolchain ignore useless strings
Pasi Kallinen [Thu, 24 Apr 2014 08:01:52 +0000 (11:01 +0300)]
Bug 11631: Make i18n toolchain ignore useless strings

This patch removes several types of strings from the
PO files that cannot be usefully translated, including
ones that consist entirely of punctuation and/or HTML entities.

Test:
1) Update PO files of some lang, xx-YY-*po
cd misc/translator
perl translate update xx-YY
2) Do it again, just in case
3) rm po/xx-YY*po~
4) Extract all msgid's, sorted
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-pre
5) Apply the patch
6) Repeat 1-3
7) Repeat 4 again, other file
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-post
8) Do a diff, inspect results, only strings with %s and \s
diff xx-YY-pre xx-YY-post | less

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, 380 strings less to 'translate'
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c2295530401f53653386ff07a43c668a6a574d65)

10 years agoBug 11616: (follow-up) remove tablesorter CSS
Galen Charlton [Fri, 31 Jan 2014 15:30:29 +0000 (15:30 +0000)]
Bug 11616: (follow-up) remove tablesorter CSS

This patch removes CSS rules that applied only to use of the
jQuery tablesorter plugin, which is now gone.

To test:

[1] Verify that git grep -l headerSort does not turn up
    any results.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1a5da08342182c739f2f5b790038c6ff04c748ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11616: remove jQuery tablesorter plugin
Jonathan Druart [Mon, 27 Jan 2014 11:22:21 +0000 (12:22 +0100)]
Bug 11616: remove jQuery tablesorter plugin

DataTables has replaced the tablesorter plugin for client-side sorting
of tables in Koha.  There is no table using this plugin, so this patch
removes it and remaining references to it.

REVISED TEST PLAN
-----------------
1) Apply the patch
2) Home -> Koha administration -> Authorized values
3) Change the 'Show category:' drop down value, and play with
    the sorting of columns.
   -- should sort as expected.
4) Search the catalogue -> look for a biblio with high circulation
5) Click one of the name links.
6) Click the Items tab on the left.
7) Scroll down and click the (View item's checkout history)
    link in the History area.
   -- There was no sorting prior to the patch, so afterwards
      it should display the same.
8) git grep -i tablesorter
   -- Only a reference in staff-global.css and release texts.

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 166720982e59a929aac9191d89af57a57545ff15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11415: DBRev 3.14.06.001
Fridolin Somers [Fri, 16 May 2014 10:36:16 +0000 (12:36 +0200)]
Bug 11415: DBRev 3.14.06.001

10 years agoBug 11415 (QA Followup) fix whitespace
Kyle M Hall [Fri, 10 Jan 2014 14:15:25 +0000 (09:15 -0500)]
Bug 11415 (QA Followup) fix whitespace

This patch also fixes a JavaScript syntax error if the
SelfCheckReceiptPrompt system preference is off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6254f5f07ab84ef7d6b6518d8f39bde9987a92e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11415: Add syspref to toggle SCO receipt printing
JaTara Barnes [Sun, 5 Jan 2014 06:33:31 +0000 (00:33 -0600)]
Bug 11415: Add syspref to toggle SCO receipt printing

This patch adds the SelfCheckReceiptPrompt to control
whether receipts are automatically printed when a patron
finishes a SCO session.  This is on by default during
new installations and upgrades.

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 9cc3b69a0cf1adfc7c50c25ef6d57c2e027e8950)

Conflicts:
installer/data/mysql/updatedatabase.pl

10 years agoBug 10611: (follow-up) cache DBMS driver code in context object
Galen Charlton [Mon, 10 Mar 2014 22:48:03 +0000 (22:48 +0000)]
Bug 10611: (follow-up) cache DBMS driver code in context object

Rather than use a package-level variable, use an object-level
one.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d39b3c72ea2422b09e3411bef974d87aecdabf9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Context.pm

10 years agoBug 10611: Use mysql_auto_reconnect instead of ping
Jonathan Druart [Tue, 16 Jul 2013 09:53:47 +0000 (11:53 +0200)]
Bug 10611: Use mysql_auto_reconnect instead of ping

DBD::Mysql provides a mysql_auto_reconnect flag. Using it avoids
the time required to do a $dbh->ping().

Benchmarks:

use Modern::Perl;
use C4::Context;
for ( 1 .. 1000 ) {
    $dbh = C4::Context->dbh;
}

* without this patch on a local DB:
perl t.pl  0,49s user 0,02s system 98% cpu 0,525 total
* without this patch on a remote DB:
perl t.pl  0,52s user 0,05s system 1% cpu 37,358 total
* with this patch on a local DB:
perl t.pl  0,46s user 0,04s system 99% cpu 0,509 total
* with this patch on a remote DB:
perl t.pl  0,49s user 0,02s system 56% cpu 0,892 total

Testing the auto reconnect:
use Modern::Perl;
use C4::Context;
my $ping = $dbh->ping;
say $ping;
$dbh->disconnect;
$ping = $dbh->ping;
say $ping;

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Real improvement. No koha-qa errors

prove t/db_dependent/Circulation_issuingrules.t produces no error
prove t/db_dependent/Context.t produces no error

Test
1) dumped Koha DB, load it on a non-local server
2) run sample script whit and without patch, local and remote

use Modern::Perl;
use C4::Context;
for ( 1 .. 100000 ) {
    my $dbh = C4::Context->dbh;
}

Main difference I note is with remote server
a) without patch
real    0m16.357s
user    0m2.592s
sys     0m2.132s

b) with patch
real    0m0.259s
user    0m0.240s
sys     0m0.012s

I think this could be good for DBs placed on
remote servers

Bug 10611: add a "new" parameter to C4::Context->dbh

When dbh->disconnect is called and the mysql_auto_reconnect flag is set,
the dbh is not recreated: the old one is used.

Adding a new flag, we can now force the C4::Context->dbh method to
return a new dbh.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 10611: Followup: remove useless calls to dbh->disconnect

These 3 calls to disconnect are done at the end of the script, they are
useless.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4ae3665ad8afb5d283d989c4622a91690e1c4f8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Context.pm

10 years agoBug 11636 - make it possible to remove patrons from patron list during add process
Owen Leonard [Wed, 29 Jan 2014 17:17:09 +0000 (12:17 -0500)]
Bug 11636 - make it possible to remove patrons from patron list during add process

If your patrons have card numbers with leading zeroes this causes
problems removing patron entries during the process of adding patrons to
an existing list. This patch refactors the relevant JavaScript to
correct the problem and to remove inline "onclick" from generated HTML.

This patch also includes a fix for Bug 11632 - Untranslatable string
"Remove" in patron lists.

To test:

1. If necessary, create or modify a patron to have a card number
   with leading zeroes.
2. Go to Tools -> Patron lists.
3. Click "Add patrons" on an existing list.
4. Perform a patron search and choose one of the results.
5. Click the "remove" link next to the patron name which was just added.
   Nothing will happen.
6. Apply the patch and test again. The "remove" link should now work.

To test the fix for Bug 11632, after applying the patch run "translate
update [language code]" and confirm that the "Remove" string is listed
in the updated po file for patron_lists/list.tt.

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, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f3d5887870bad581e312b40bd474b38b5788122d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is...
Frédéric Demians [Sat, 1 Feb 2014 08:49:38 +0000 (09:49 +0100)]
Bug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is disabled

Bootstap theme opac holding tab is improperly displayed when opacbookbag
syspref is disabled, and virtualshelf is enabled. This is due to the
fact that in this situation basket.js is loaded (for virtual shelves),
but some JS variables are not defined in template since opacbookbag is
disabled.

To reproduce this bug:

- Choose bootstrap OPAC theme
- Enable virtualsheves syspref
- Disable opacbookbag syspref
- Open a biblio record in OPAC detail page
- You will observe that items holding tabs are not displayed as tabs but
  as a bulleted list

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Confirmed display problem exists without the patch and is solved by it.
Ideally we would avoid having the cart messages in the template when
the feature is deactivated, but this is ok for now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e3c203aebb939af63aefc81f77474adc0234ca4c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11493: Revert "Bug 6869 Batch item modification fails whit accented characters"
Jonathan Druart [Wed, 5 Mar 2014 12:44:49 +0000 (13:44 +0100)]
Bug 11493: Revert "Bug 6869 Batch item modification fails whit accented characters"

This reverts commit c9905750e53e2e1615842ac696d5eeb0a8ac07fc.

Test plan:
1/ Open a bib record with more than 1 item ,
2/ Select all items
3/ Chose Modify selected items
4/ put you "ق ك و" in notes
5/ Verify the items have been updated correctly
6/ put you "éàç" in notes
7/ Verify the items have been updated correctly
8/ put you "ق ك و éàç" in notes
9/ Verify the items have been updated correctly

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug on master and that the patch fixes it.
Passes all tests and the QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e55d89be20acb58deb45a30c113bf0f07170fd33)

10 years agoBug 11608: Delete unused commented lines in template
Jonathan Druart [Fri, 24 Jan 2014 15:07:08 +0000 (16:07 +0100)]
Bug 11608: Delete unused commented lines in template

On the way, these lines are commented and can be deleted safely.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removes an HTML comment with unused code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb8e159daad8556832d45c9581e32b76aee02e1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11608: Remove the word 'library' from funds list
Nicole C. Engard [Fri, 24 Jan 2014 14:34:27 +0000 (08:34 -0600)]
Bug 11608: Remove the word 'library' from funds list

The list of funds on the main acq page shows the library's name
followed by the word 'library'. I don't think this word is necessary
as most libraries have the word 'library' in their names. Even
if they don't they probably just want their library name to show
without extra words.

To test:

* Visit the acquisitions module before applying
* See the library's name + 'library' above the funds list
* Apply patch
* Look again at funds list and 'library' should be gone

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove a space

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b865e1a024331fbbb76570f84afc9302a7340f7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) remove some tabs
Galen Charlton [Fri, 11 Apr 2014 17:51:50 +0000 (17:51 +0000)]
Bug 11563: (follow-up) remove some tabs

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c16cadf21656e6c1796c7eac28db33ead02cf59d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) improve selector for adding noEnterSubmit to select elements
Jonathan Druart [Tue, 25 Mar 2014 08:30:14 +0000 (09:30 +0100)]
Bug 11563: (follow-up) improve selector for adding noEnterSubmit to select elements

Test plan:
To test on modified pages:
- Press enter when cursor is on input or select and verify the form is not
submitted.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2aafa78f08c60797e47cbe790cef1f1899a5297d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) add noEnterSubmit class to pulldowns
Kyle M Hall [Fri, 7 Mar 2014 14:05:31 +0000 (09:05 -0500)]
Bug 11563: (follow-up) add noEnterSubmit class to pulldowns

When using Chrome on Mac OS X, form submits are triggered by hitting
enter when focused on a select. This is not an issue with any other
combination of browser and operating system that I am aware of.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit db3d4a0d7d2b97a021be1464a99b8084c31b62cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) change .live() to .on()
Kyle M Hall [Wed, 26 Feb 2014 17:51:11 +0000 (12:51 -0500)]
Bug 11563: (follow-up) change .live() to .on()

The jquery event handler .live() has been deprecated. It is recommended
that .on() be used instead.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1226f901cef989915ee68e7ac7d1b1acf9fba91c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: restore preventing the enter key from submitting several forms
Fridolin Somers [Tue, 25 Feb 2014 11:13:13 +0000 (12:13 +0100)]
Bug 11563: restore preventing the enter key from submitting several forms

Several forms that take patron or item barcodes as input stopped
preventing the enter key (which is often sent by barcode scanners)
from submitting the form.

The code binding the CSS class noEnterSubmit to the handler preventing
submission when hitting the enter key was no longer triggered.  This is
because this class is added using JavaScript in $(document).ready() and
the keypress event listerning is also set using $(document).ready().

This patch corrects by using JQuery live() with will set event handlers
for HTML generated with JavaScript.

Also sets noEnterSubmit to use the checkEnter(e) function, as that has
broader browser compatibility.  Also corrects a small bug, for IE,
window.event must be used, not event alone.

Test plan :
- Flush browser cache (Crtl+F5) to update js files
- Go to patron creation : members/memberentrygen.tt
- Type a text in all mandatory inputs
- Type some caracters in a non mandatory input
- Press Enter key
=> Without patch : the form is submitted
=> With patch : the form is not submitted
- Try to set several lines in a textarea
=> It works (checks that in this case enter key is allowed)
- Test other pages usign noEnterSubmit class :
cataloguing/additem.tt
course_reserves/course.tt
members/mancredit.tt
members/maninvoice.tt
patron_lists/list.tt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested in Firefox and Chromium.
Passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e5ab2203745d7c70e1c4d2f54cea967710a88b96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369: (follow-up) generate searchid in browser.js
Fridolin Somers [Wed, 26 Feb 2014 16:14:04 +0000 (17:14 +0100)]
Bug 11369: (follow-up) generate searchid in browser.js

The search browser feature uses nearly only the browser.js file.
That is why I propose to move the searchid generation from search.pl
to browser.js.
We then use Date.getTime() to use current timestamp as searchid,
prefixed by 'scs_' like before.

Test by using test plan of main patch :
Too many search cursor cookies overflow HTTP-header size, when
making multiple searches in the staff client

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Tested the browse functionality in staff by using the different
options (back to results, next, previous, etc) and the batch
modifications for items. An old cookie can cause a Javascript error,
but after restarting the browser/deleting cookies it all works
correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c4f17650132c9b74aa56c40a3a2bec2bdbc4477e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369: (follow-up) Correct usage of me.searchid in browser.js
Fridolin Somers [Wed, 26 Feb 2014 16:03:13 +0000 (17:03 +0100)]
Bug 11369: (follow-up) Correct usage of me.searchid in browser.js

In browser.js, at creation of browser, the searchid is transmited to
JS object into me.searchid.
To be consistant, me.searchid should always be use, never searchid alone.
In browseRecords function, setting searchid as parameter is useless
because it is defined in me.searchid.

Test with test plan of Bug 10404

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 98edbf00cc10c908820eb1126a176ed12a04300d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369: fix issue that can cause staff client searches to stop working
Olli-Antti Kivilahti [Wed, 11 Dec 2013 12:28:53 +0000 (14:28 +0200)]
Bug 11369: fix issue that can cause staff client searches to stop working

This patch fixes an issue where too many search cursor cookies overflow
the HTTP-header size after making multiple searches in the staff client.

To replicate this issue, make multiple searches in catalogue/search.pl.
50+ Should be enough to cause the HTTP-request header to overgrow.
One can verify this issue by observing the searchCookie growth in
browser's stored cookies.

-------------
- TEST PLAN -
-------------

Keep making searches.
One should never have more than 10 searchCookies. Browser might display
only 9, because for some reason the newest js-generated cookie is not
included in Firefox's cookies listing.

------------
- DRAWBACK -
------------

Removing these cookies disables the search cursor for traversing search
results (next/previous) for the removed cookie. This maybe be problematic
in some cases,
(for ex when multiple search tabs need to be open and they need to be
 traversed)
One easy solution is to grow the amount of stored searchCookies from 10 to
20, but 10 is chosen so there will be plenty of room for other cookies as
well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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 0cada7a323db7f9871b67a07e3343642543b64e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369 - Updating the jquery.cookie.js-plugin
Olli-Antti Kivilahti [Tue, 10 Dec 2013 17:12:01 +0000 (19:12 +0200)]
Bug 11369 - Updating the jquery.cookie.js-plugin

The current jquery.cookie-plugin crashes when trying to fetch
all cookies using $.cookie();
Downloaded the newest plugin version and minified it.
Now works as intended.

Encountered an issue with the plugin now returning null when
no cookies are found, and applied a fix in browser.js.

-------------
- Test plan -
-------------
Plugin is used in browser.js and batchMod.js so testing both

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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 35bec75d66637bd3c4cff499ed7fb534b8d09f35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11290: fix display of patron home page for certain translations
Chris Cormack [Fri, 22 Nov 2013 22:04:00 +0000 (11:04 +1300)]
Bug 11290: fix display of patron home page for certain translations

To test
1) In a fresh Koha, generate translation into XX
2) Select XX for the staff interface (i.e. enable it, and choose it)
3) Go to the Patrons page
4) Everything looks fine
5) In the admin page, create a patron category with any non-ASCII
   character.
6) Go back to the Patrons page, everything is broken
7) Apply patch
8) regenerate translation
9) Go back to the Patrons page, everything looks fine
10) Switch to english it still looks fine

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Tried with ru-RU and fixes the problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Problem is also visible on untranslated templates changing
one of the sample category descriptions to include diacritics.

[RM note: I wasn't able to reproduce this on an unstranslated
 template -- I tried using Arabic, Cyrllic, and Spanish characters]

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3e1b781adc253722209e46385fb3248ae8d668f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.6 release v3.14.06
Fridolin Somers [Wed, 30 Apr 2014 15:19:33 +0000 (17:19 +0200)]
Increment version for 3.14.6 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.06-release' into 3.14.x
Fridolin Somers [Wed, 30 Apr 2014 15:15:54 +0000 (17:15 +0200)]
Merge remote-tracking branch 'translator/3.14.06-release' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.6 release
Fridolin Somers [Wed, 30 Apr 2014 15:13:52 +0000 (17:13 +0200)]
Update release notes for 3.14.6 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11619: (follow-up) fix QueryParser.t
Galen Charlton [Tue, 4 Feb 2014 18:44:07 +0000 (18:44 +0000)]
Bug 11619: (follow-up) fix QueryParser.t

The previous patch did not account for the change
in the number of indexes, and thus caused one
of the tests to fail.

To test:

[1] Verify that prove -v t/QueryParser.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 547ebaece0bcd24857cecd6c95d8a5c1c41ce222)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11619: remove duplicate key in QueryParser config
Marcel de Rooy [Mon, 27 Jan 2014 12:50:01 +0000 (13:50 +0100)]
Bug 11619: remove duplicate key in QueryParser config

Corrects a double entry for language in yaml file.
Language should have been language-original.

Test plan:
Check that you have language-original in your zebra install.
Specifically, this index should cover MARC21 041$h.
Enable QueryParser and search for a record with this index.
Note that this patch does not enable searching on this
index without QueryParser. This is true for many more indexes
in record.abs that are not included in the getIndexes routine.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - make sure you are testing with a current
indexing configuration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3424f0d84a1622c502aeb376450cad5b74f0cea1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11572: ensure that running Z39.50 search from staff search results detects ISBN
“ByWater [Thu, 16 Jan 2014 20:00:40 +0000 (15:00 -0500)]
Bug 11572: ensure that running Z39.50 search from staff search results detects ISBN

In Koha 3.8, if a standard catalog search was performed and the user
clicked the Z39.50 search button, the search string would automatically
be placed in the isbn field for the Z39.50 search form.
Changes to the code have since broken this functionality.

Test Plan:
1) From mainpage.pl, use "Search the catalog" to search for the string
   "9781570672835"
2) Click the Z39.50 Search button
3) Note the string is placed in the title field
4) Apply this patch
5) Repeat steps 1-2
6) Note the string is placed in the isbn field

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested old and new ISBN with and without hyphens.
Also tested some other keyword searches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Note that the behavior will be a bit odd if you do a 'replace via
Z39.50' from a bib record whose title happens to be an ISBN, but
this scenario seems unlikely enough to ignore.

(cherry picked from commit 7f6f3b924e5bc9343bb475a1add714923a025913)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11246: remove reference to fields 780 and 785 in UNIMARC XSLT files for Bootstrap...
Mathieu Saby [Wed, 13 Nov 2013 18:56:10 +0000 (19:56 +0100)]
Bug 11246: remove reference to fields 780 and 785 in UNIMARC XSLT files for Bootstrap OPAC

Another fix, 10465, removed fields 780 and 785 from a unimarc xslt file.
This cleanup is needed for bootstrap too

To test : in a UNIMARC Koha, with Bootstrap theme OPAC
1. Be sure that OPACXSLTDetailsDisplay , OPACXSLTResultsDisplay sysprefs
   are set to "default"
2. Apply the patch
3. Search some records in OPAC : the list view and the detail view
   should be exacty the same as before you apply the patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes are consistent with changes done earlier on the prog theme.
Checked that the detail pages and results still display correctly
for UNIMARC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 684143a529cb556236f46d1d2a8ef05908c0b2f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11655: koha-translate --list no longer shows 'en'
Tomas Cohen Arazi [Fri, 31 Jan 2014 19:52:15 +0000 (16:52 -0300)]
Bug 11655: koha-translate --list no longer shows 'en'

'en' is not a translation and it doesn't make any sense to return it as
part of the installed translations or the available ones.

It becomes relevant to remove it as users upgrading their installed
translations end up grepping the output to remove 'en' like in:

for lang in $(koha-translate --list | grep -v -x -e 'en') ; do
  koha-translate --update $lang
done

instead of simply issuing the koha-translate --list command.

To test:
- Run
  ./koha-translate --list
  ./koha-translate --list --available
=> It shouldn't return 'en' in the result list.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6aa021896827e846e58f88a8c5387df122688c53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: ensure that patrons are not restricted even when the last restriction...
Kyle M Hall [Thu, 24 Apr 2014 15:23:05 +0000 (11:23 -0400)]
Bug 12134: ensure that patrons are not restricted even when the last restriction has expired

Test Plan:
1) Add a manual restriction to a patron and wait until the
   expiration date of the restriction has passed.  This can be
   simulated by modifying borrowers.debarred for a borrower and
   setting the date in the past.
2) Try to check out an item to that patron
3) Note you cannot
4) Apply this patch
5) Repeat step 2
6) Note you can now check out items the patron

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35a94f6423ee851668047075dbc153dc3aa13606)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: (follow-up) fix one of the IsDebarred() tests
Galen Charlton [Mon, 28 Apr 2014 17:05:19 +0000 (17:05 +0000)]
Bug 12134: (follow-up) fix one of the IsDebarred() tests

- pass valid ISO date to the debar-date-in-future test
- correctly verify that patron is restricted

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2f5e9df121508fe32e5109621224d1ebbc8c388c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: (follow-up) add more unit tests to reflect the change in IsDebarred
Jonathan Druart [Fri, 25 Apr 2014 10:48:42 +0000 (12:48 +0200)]
Bug 12134: (follow-up) add more unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c2d0a49defbc739469be61c33061d6819feb7b69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: Add unit tests to reflect the change in IsDebarred
Jonathan Druart [Thu, 24 Apr 2014 15:36:44 +0000 (17:36 +0200)]
Bug 12134: Add unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9f1f7da8ac205b2d642aa7986a9ac26b1a8614e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for 3.14.06 release
Bernardo Gonzalez Kriegel [Wed, 30 Apr 2014 11:35:44 +0000 (08:35 -0300)]
Translation updates for 3.14.06 release

New languages:
    Kinyarwanda from Rwanda - rw-RW
    Swahili from Kenya - sw-KY

Renames:
    Thai from th-THA to th-TH

10 years agoBug 11513: (follow-up) format enrollment end date consistently
Galen Charlton [Fri, 31 Jan 2014 16:21:05 +0000 (16:21 +0000)]
Bug 11513: (follow-up) format enrollment end date consistently

The previous patch added use of the KohaDates TT plugin, so this
patch makes sure that it gets used to format the display of all
occurrences of the enrollment end date.

To test:

[1] Create a patron category with a fixed end date.
[2] Bring up the list of all categories and verify that the date
    is displayed based on the dateformat value.
[3] Delete the category, and verify that the confirmation dialog
    formats the date correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6b6377316eb49d94476e9442728389cc4c9297ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11513: fix log warning noise in patron category editor
Mark Tompsett [Fri, 10 Jan 2014 05:06:21 +0000 (00:06 -0500)]
Bug 11513: fix log warning noise in patron category editor

Just going to the patron categories page triggered errors.
Running through all the plain options also triggered other
warnings. This fix silences them.

Discovered tabs I had not corrected by running qa test tool.

Some errors which I could not trigger were also fixed, such
as line 248 shown by Merllissia Manueli.

TEST PLAN
---------
 1) Log in to staff client
 2) Click 'Administration'
 3) Click 'Patron categories'
 4) Click '+ New category'
 5) Enter a dummy category and click 'Save'
 6) Click 'Edit' for the dummy category.
 7) Change a value and click 'Save'
 8) Click 'Delete' for the dummy category.
 9) Confirm to delete.
10) Review error log, several new warnings
11) Apply patch
12) Run the koha qa test tool.
13) Click 'Home'
14) Click 'Administration'
15) Click 'Patron categories'
16) Click '+ New category'
17) Enter a dummy category and click 'Save'
18) Click 'Edit' for the dummy category.
19) Change a value and click 'Save'
20) Click 'Delete' for the dummy category.
21) Confirm to delete.
22) Review error log, no new warnings

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan, saw no errors in the log after applying the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested various dates and enrollment periods with different settings of
dateformat pref. Works as advertised. No warnings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2870c6bd851e967d08d9e4613095ebdfdb8a4c01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11314: (follow-up) make another "All" translatable
Galen Charlton [Sun, 26 Jan 2014 15:39:27 +0000 (15:39 +0000)]
Bug 11314: (follow-up) make another "All" translatable

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 23e05042357a9c4fbceb15f0e07c3316b7ff6d86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11314: (follow-up) make "All" translatable
Jonathan Druart [Fri, 24 Jan 2014 14:24:20 +0000 (15:24 +0100)]
Bug 11314: (follow-up) make "All" translatable

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb9f7afc77769a9ecb55aae6e74fa8f6600fe2a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11314: restore ability to see only 5 entries on parcel.pl
Kyle M Hall [Wed, 27 Nov 2013 17:40:11 +0000 (12:40 -0500)]
Bug 11314: restore ability to see only 5 entries on parcel.pl

Bug 9130 removed the ability to limit the tables on parcel.pl to 5 rows,
as well as the "sticky" feature. It is trivial to restore this
functionality. These datatables are already using bStateSave, so are
they are "sticky" already. The only part left is to enable the
ability to limit the table to 5 rows at a time.

Test Plan:
1) Apply this patch
2) Browse to parcel.pl
3) Note the default rows count is still 10
4) Note the option to limit the row count to 5

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

Double-checked that the "sticky" feature is still in place thanks
to bStateSave.

I didn't notice a difference due to iDisplayLength being added, but
the extra option of "5" to the list is there.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2bb4f4b42b3e3dfc7bc4233d16888d953625025b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11313: supply empty value in mandatory comboboxs in MARC record editors
Fridolyn SOMERS [Wed, 27 Nov 2013 15:40:09 +0000 (16:40 +0100)]
Bug 11313: supply empty value in mandatory comboboxs in MARC record editors

In biblio (or authority) record editing or creation, Bug 3727 added
an empty value to combobox for subfields using itemtype authorized values,
which is mandatory and does not have a default value. This to avoid
selecting arbitrarily the first value of the combobox.

This patch extends this behavior to normal authorized values like CCODE,
COUNTRY ...

Also, when record already exists and has a defined value for the subfield
this value will be selected in combobox so there is no need for an empty
value.

Test plan :
- In a biblio framework, set a subfield mandatory and using itemtypes
  authorised values
- Set a default value for this subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the first empty value is selected
- Go to biblio framework and set a default value for the subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the default value is selected
   and there is no empty value
- Select an other value and save the record
- Edit this record
=> You see the subfield with a combobox, the saved value is selected and
   there is no empty value

Perform same tests with a normal authorized values categorie (instead of
  itemtypes).
Perform same tests with with authority creation/edition
Perform same tests with a normal authorized values categorie and authority
  creation/edition

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

Fridolyn: I had a lot of difficulty understanding your test plan,
especially since the second line should not be in the test plan
(since if there is a default value, no empty value should appear).

Perhaps it would be useful to use more whitespace to separate
steps and the things for which a tester should check.

Also, it might be useful to specify what testers should check for
before and after applying the patch, so that they're sure that the
behaviour has been corrected.

In any case, the patch works! Certainly a helpful addition.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

1) Adding a bibliographic record
Subfield is mandatory, no default value:
- adding record: no value is preselected, empty value exists
- editing record: saved value is shown,  empty value exists
Subfield is mandatory, defined default value:
- adding record: default is preselected, no empty value
- editing record: saved value is shown, no empty value exists
Subfield is not mandatory, defined default value:
- adding record: default is preselected, empty value exists
- editing record: saved value is shown, emtpy value exists
Subfield is not mandatory, no default value:
- adding record: empty value is preselected
- editing record: saved value is shown, empty value exists

2) Adding an authority record
Repeating tests from above.
- Subfield is mandatory, no default value: OK
- Subfield is mandatory, defined default value: OK
- Subfield is not mandatory, defined default value: OK
- Subfield is not mandatory, no default value: OK

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fc698eed06ec9a7335c4b94362917d2b364b44c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11138: add auto_unsuspend_holds to daily crontab (Debian package)
Liz Rea [Fri, 25 Oct 2013 03:40:03 +0000 (16:40 +1300)]
Bug 11138: add auto_unsuspend_holds to daily crontab (Debian package)

To test:

Install the packages with this patch, observe the /etc/cron.daily/koha-common
file - auto_unsuspend_holds should now be in the default list.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ebe92b97ea3082da4de7901971f681b09d3eb265)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11138 - Add auto_unsuspend_reserves to crontab.example
Liz Rea [Thu, 14 Nov 2013 01:52:28 +0000 (14:52 +1300)]
Bug 11138 - Add auto_unsuspend_reserves to crontab.example

To test:

Set up and run the cronjobs from crontab.example with a hold set to
unsuspend today. The hold should be unsuspended.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e6da56acb174c56a746dde44e5d247afc7ff0ed6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11549: [follow-up] Make NewOrder calculate new parent_ordernumber
Julian Maurice [Fri, 17 Jan 2014 10:21:05 +0000 (11:21 +0100)]
Bug 11549: [follow-up] Make NewOrder calculate new parent_ordernumber

If parent_ordernumber is not set in NewOrder parameter, it is
automatically set to ordernumber.

This patch only avoid code duplication.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This solution is better!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also all tests in
t/db_dependent/Acquisitions/.

Confirmed bug and that the patch fixes it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9cb6174653185e8ea37871245c8d25092d8e4a81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11549: (follow-up) interpolated variables into SQL statements should not be allowed
Jonathan Druart [Tue, 14 Jan 2014 11:13:31 +0000 (12:13 +0100)]
Bug 11549: (follow-up) interpolated variables into SQL statements should not be allowed

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6e861c5563ddd807088e31a11776fb49014de27e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>