Nicole C. Engard [Fri, 24 Jan 2014 15:47:53 +0000 (09:47 -0600)]
Bug 11272 - add second submit button to inventory form
The inventory tool allows for 2 ways of processing files. The first
is to upload a file. The second is to generate the shelf list.
Most libraries think they have to fill in all fields because the
submit button is at the bottom of the second option. They do not.
This patch adds a second submit button under the first method to
make this clearer.
To test:
* Generate a file of barcodes for inventorying
* Before applying the patch use the file upload method to mark as seen
* Apply the patch
* Use the file upload method to mark as seen using the new submit
* Repeat the above for the shelf list method
* Confirm that inventory still works as expected with 2 buttons
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 40ba1763afc40cd47b23892a3248fd877dc8edce) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Ketan Kulkarni [Thu, 21 Nov 2013 09:07:58 +0000 (14:37 +0530)]
Bug 11087: Make the Pay Fines tab the default tab
Since paying fines is the most likely action when clicking on
the Fines tab, the pay fines tab should be the default rather
than the account summary.
http://bugs.koha-community.org/show_bug.cgi?id=11087 Signed-off-by: Holger Meißner <h.meissner.82@web.de> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified by accessing the fines pages from the various
patron account pages.
Mathieu Saby [Sun, 26 Jan 2014 18:55:46 +0000 (19:55 +0100)]
Bug 11611: Rephrase description and examples of 5 MARC related sysprefs
This patch rephrases the description or examples of 5 sysprefs:
1/ MARCAuthorityControlField008: "MARC" -> "MARC21"
2/ itemcallnumber: "Examples" -> "Examples (for MARC21 records)"
3/ DefaultLanguageField008: "Range 35-37" -> "Range 35-37 of MARC21 records"
4/ MARCOrgCode: "new MARC records" -> "new MARC21 records"
5/ UNIMARCAuthorityField100 description: "Do NOT include the date
(position 00-05)." -> "position 08-35. Do NOT include the date
(position 00-07)."
It also adds description in SQL systempreferences table for
UNIMARCAuthorityField100, MARCAuthorityControlField008 and MARCOrgCode.
Test plan:
- Apply and run updatedatabase.pl
- Check the changes are taken into account in syspref administration
page
- Check the changes are taken into account in systempreferences table
(for UNIMARCAuthorityField100, MARCAuthorityControlField008 and
MARCOrgCode)
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 68a7f7f4456078b1b9dc6fd1ba16f11ba45267fc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Wed, 19 Feb 2014 20:26:24 +0000 (15:26 -0500)]
Bug 11796: fix display of search result facets if facet happens to have exactly six entries
If a search gives results with 6 facets, one of those facets won't be
displayed. This is due to a bug in the code that only considers great
than 6 facets in one area, and less than 6 in another.
Test Plan:
1) Perform a search that should give results for 6 different libraries
2) Note you only see 5 libraries in the facets with no option to expand
3) Apply this patch
4) Repeat step 1
5) Note you now have the option to expand the facets list
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch should provide a regression test but I really don't know how
to write it.
Owen Leonard [Wed, 19 Feb 2014 16:36:30 +0000 (11:36 -0500)]
Bug 11791 - Use validation plugin when creating new city
The page for adding a new city 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 -> Cities -> New city.
Try submitting the form without entering a city or zip code. This should
trigger a validation warning.
Submission of the form with valid data should work correctly. Editing an
existing city should also work correctly.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: This patch changes the behavior. Before the patch, only 1 out of city
and zip was required. Now both are. Since the 2 inputs were marked as
required, I think they should be.
Owen Leonard [Wed, 19 Feb 2014 16:59:33 +0000 (11:59 -0500)]
Bug 11792 - Use validation plugin when creating new currency
The page for adding a new currency 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 -> Currencies &
Exchange rates -> New currency. Try submitting the form without entering
a currency, rate, and/or symbol. This should trigger a validation warning.
Submission of the form with valid data should work correctly. Editing an
existing currency 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 5dc093b30e8d949f39a67bf2ac40f219f6167d0a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
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
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>
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>
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>
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>
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>
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.
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
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.
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.
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.
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>
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>
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.
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>
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>
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;
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.
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.
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>
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.
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>
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>
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.
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>
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>
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.
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>
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.
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:
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.
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).
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>
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>
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).
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>
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>
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>
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>
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>
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.
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.
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>
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)
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.
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.
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.
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.
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.
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.
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>
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.
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.
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>
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>
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>
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]
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.
“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.
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.
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>
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>
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.
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.