Fridolin Somers [Fri, 7 Feb 2014 09:13:39 +0000 (10:13 +0100)]
Bug 11707: fix editing additional attributes for patron whose category code includes a space
When editing additional attributes of a patron of a category with a
code with space (ie "CAT 3"), the Javascript is broken and Additional
attributes are not displayed.
This patch corrects by adding simple quotes around category code in JS
code.
Test plan :
- Create an patron additional attribute
- Create a new patron category with a space in code. ie "CAT 3"
- Create a new patron of this category : /cgi-bin/koha/members/memberentry.pl?op=add&categorycode=CAT 3
=> Without patch the JS is broken (Syntax error, unrecognized expression:
[data-category_code=CAT 3]) and additional attributes are not
displayed.
=> With patch the JS is not broken and additional attributes are
displayed and can be edited.
Signed-off-by: Marc Véron <veron@veron.ch>
In current Koha version it is not possible to create category codes
with blanks.
To test, I changed an existing category code directly in the database.
Then I followed the Test plan.
Without patch, attribute types were not displayed.
With patch, they were displayed as expected.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I recommend not using codes with spaces and fix existing ones.
Koha doesn't allow you to add category codes with spaces, so the only way
to do it is via SQL.
This patch fixes a problem and passes all tests.
Owen Leonard [Fri, 21 Feb 2014 14:22:50 +0000 (09:22 -0500)]
Bug 10751: standardize validation of title in staff purchase suggestions form
The form for adding a new purchase suggestion in the staff client
indicates that the title field is required but does nothing to enforce
this rule. This can be handled client-side with HTML5 validation
attributes and Koha's built-in validation plugin. This patch implements
this.
To test, apply the patch and go to Acquisitions ->
Suggestions -> New purchase suggestion. Try submitting the form without
entering a title. Doing so should trigger a validation warning.
Submission of the form with valid data should work correctly. Editing an
existing suggestion should also work correctly.
The patch displays a message 'Required' near the title field.
After submitting a empty title it changes to 'This field is required' Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The title field is required since commit d565fb02e9fca2ac9c506e4e7d44fd8b0d66f06a
This one makes it more consistent with formatting. It makes sense.
Kyle M Hall [Wed, 12 Feb 2014 12:47:46 +0000 (07:47 -0500)]
Bug 11746 - Add edit item links to record details page
In order to edit a specific item right now, one must select the edit
pulldown, then choose edit items, the click the edit link for the
particular item the librarian wishes to edit. It would be much more
convenient to have an edit link for each specific item in the items
table on the record details page.
Test Plan:
1) Apply this patch
2) View the record details for a record with items
3) Click the edit link for a particular item
4) Note that you are taken immediately to the item editor
for this particular item
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Havilah Lyon <havilah@aflibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Thu, 20 Feb 2014 18:39:10 +0000 (19:39 +0100)]
Bug 11803: use $dbh consistently in _koha_modify_item
This is just some code cleanup, no behavior change expected.
Also replacing errstr with err in testing the results. (See DBI.)
Test plan:
Modify an item and save it.
Followed test plan. No problems found. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Tue, 18 Feb 2014 20:37:31 +0000 (15:37 -0500)]
Bug 11789 - Use validation plugin when creating new list
The page for adding a new list 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.
Other edits: Minor validation fixes.
To test, apply the patch and go to Lists -> New list. Try submitting the
form without entering a list name. This should trigger a validation
warning.
Submission of the form with valid data should work correctly. Editing an
existing list 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>
Jonathan Druart [Tue, 18 Feb 2014 14:07:38 +0000 (15:07 +0100)]
Bug 11471: Display the currency for baskets in a basketgroup
On editing a basketgroup, the currency for baskets in a basketgroup is
always '0'.
With this patch, the currency is correctly displayed.
TEST PLAN
=========
1) Log into staff client
2) Acquisitions
3) Click 'Search' in the 'Manage orders' box
4) Click '+ New basket' because a vendor name
5) Type 'Test Basket' into basket name
6) Click 'Save'
7) Click 'Add to basket'
8) Click 'From an external source'
9) Type 'Green Eggs and Ham' into the Title text box
10) Click 'Search'
11) Click 'Order' on any one of the results
12) Click 'Add Item' in the 'Item' box
13) Select a Fund from the dropdown in the
'Accounting details' box
14) Click 'Save'
15) Click 'Close the basket'
16) Click 'Yes, close (Y)' without checking attach to a
basket group
17) Click the 'Basket groups' tab
18) Click '+ New basket group'
19) Notice the listing in the 'Ungrouped baskets'.
20) Drag and drop the entry into the 'Baskets in this group'
text area
21) Click 'Save'
22) Click 'Edit'
23) Notice it displays incorrectly. (e.g. Total: 0 0)
24) Apply the patch (git bz apply 11471)
25) Refresh the page
26) Notice it displays the currency correctly. (e.g. Total: 0 USD)
NOTE: If there is a space issue, see Bug 9654.
This can be applied separately from that bug.
27) Run the Koha QA Tool: (~/qa-test-tools/koha-qa.pl -v 2 -c 1)
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>
Jonathan Druart [Fri, 15 Nov 2013 11:02:53 +0000 (12:02 +0100)]
Bug 11256: Opac: Set a number of items to display on a biblio detail page.
Currently, the number of items to display is hardcoded (50).
But the perl script loads all items before to check if the number of
items is oversized.
This patch adds a new pref OpacMaxItemsToDisplay (default to 50). If the
*total* number of items for a biblio is greater, no item is displayed
and a link allows to display all items.
Test plan:
1/ search a biblio with many items
2/ set the pref according the number of items you want to display
3/ verify the items are not displayed if the number of items is greater
the pref value
4/ enable the OpacSeparateHoldings pref and verify the items are
displayed in different tabs (if items have different locations).
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Owen Leonard [Wed, 19 Feb 2014 20:53:13 +0000 (15:53 -0500)]
Bug 9677 - Style button on notices and slips page with Bootstrap
The toolbar button on the Notices & Slips page isn't styled with
Bootstrap as other toolbar buttons are. This patch corrects this.
The patch also removes some obsolete CSS.
To test go to Tools -> Notices and Slips. The toolbar button should look
correct and work correctly.
Patch works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
"yui-menu-button" is not contained in tt files.
Marcel de Rooy [Thu, 20 Feb 2014 11:54:32 +0000 (12:54 +0100)]
Bug 11799: Housekeeping: Remove _biblionumber_sth from VirtualShelves.pm
This routine is no longer used.
Test plan:
Do a grep on the name.
(Bonus points:) Verify if you can perform some actions on lists.
No more occurences of _biblionumber_sth found Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10580: adjust Makefile.PL to reflect that Zebra no longer optional in Koha setup
Running Makefile.PL asks the user whether to install the Zebra
configuration files and different texts relate to the user having
chosen to use Zebra.
This patch removes references to choosing to use Zebra and removes
the related variables from the code.
To test:
- Apply the patch
- Go through the different install modes
- Verify that nothing nothing is broken
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 15 Jan 2014 15:24:00 +0000 (16:24 +0100)]
Bug 11562: re-sort sysprefs.sql
The QA tools does not manage to catch error sorting on the sysprefs.sql
file if it is already badly sorted.
This patch tidies up the sysprefs file.
TEST PLAN
---------
[1] Verify that loading sysprefs.sql into an empty Koha
database (or one whose system preferences table is
is empty) works.
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>
RM note: I must point out that there ZERO functionality associated
with the order that system preferences occur in that SQL script; they are
sorted solely in an attempt to reduce the likelihood of merge conflicts
during the development process. Consequently, I dislike language that
suggests it is an "error" if sysprefs.sql happens to not be perfectly
sorted; it is at most an inconvenience.
Galen Charlton [Fri, 21 Feb 2014 16:08:01 +0000 (16:08 +0000)]
Bug 7372: (follow-up) remove last traces of roadtype table and admin pages
This patch removes the DBIC schema class for the 'roadtype' table
and staff interface templates that are no longer reachable with
the removal of the road type administration page. It also removes
the creation of the table during installation.
Jonathan Druart [Wed, 23 Oct 2013 12:27:45 +0000 (14:27 +0200)]
Bug 7372: Move road types from the roadtype table to the ROADTYPE AV
Currently road types are stored in a specific table in DB. Moreover, an
admin page is present in order to manage them.
This patch proposes to remove this table and this page in favour of a
new authorised value category 'ROADTYPE'.
This patch:
- adds a new AV category 'ROADTYPE' (created from the roadtype table
content).
- remove the roadtype table.
- remove the .pl and .tt file admin/roadtype
- remove the 2 routines C4::Members::GetRoadTypes and
C4::Members::GetRoadTypeDetails
Test plan:
1/ Execute the updatedatabase entry and verify existing roadtypes are
now stored in the AV 'ROADTYPE'.
2/ Verify you can add/update a streettype for patrons.
3/ Verify on following pages the streettype is displayed in patron
information (top left):
circ/circulation.pl
members/memberentry.pl
members/moremember.pl
members/routing-lists.pl
Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Owen Leonard [Thu, 30 Jan 2014 19:17:10 +0000 (14:17 -0500)]
Bug 11411 - Bootstrap theme (enhancement) for (right to left)
This patch improves Koha's layout when a right-to-left language is being
displayed by correcting a float set by the right-to-left version of
Bootstrap CSS.
The patch modifies the right-to-left Less file and includes a
now-minified version of the compiled CSS.
To test, install a right-to-left language like ar-Arab. Apply the patch
and view the OPAC under the Bootstrap theme. When logged in, the log out
link is now aligned to the left.
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>
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>
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>
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>
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>
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>
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>
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>
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.
Fridolin Somers [Fri, 31 Jan 2014 13:47:09 +0000 (14:47 +0100)]
Bug 11649 - Always use words "copy number" - opac prog
In most cases, the value of items.copynumber is displayed using the
words "Copy number". But in some cases, it is just "Copy".
It would be better to always use "Copy number" because in translation
the word "Copy" means the action of coping.
This patch manages templates of opac prog theme.
To test, display an item containing a value in items.copynumber.
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>
Fridolin Somers [Fri, 31 Jan 2014 13:46:20 +0000 (14:46 +0100)]
Bug 11649 - Always use words "copy number" - opac bootstrap
In most cases, the value of items.copynumber is displayed using the
ords "Copy number". But in some cases, it is just "Copy".
It would be better to always use "Copy number" because in translation
the word "Copy" means the action of coping.
This patch manages templates of opac bootstrap theme.
To test, display an item containing a value in items.copynumber.
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>
Fridolin Somers [Fri, 31 Jan 2014 13:44:26 +0000 (14:44 +0100)]
Bug 11649 - Always use words "copy number" - intranet
In most cases, the value of items.copynumber is displayed using the
words "Copy number". But in some cases, it is just "Copy".
It would be better to always use "Copy number" because in translation
the word "Copy" means the action of coping.
This patch manages templates of intranet.
To test, display an item containing a value in items.copynumber.
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>
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>
Owen Leonard [Fri, 7 Feb 2014 15:30:19 +0000 (10:30 -0500)]
Bug 11709: revisions to Bootstrap OPAC lists interface
This patch makes some revisions to the lists template:
- Removed the old prog theme breadcrumbs from the List edit screen.
- Added New/Edit/Delete controls to the list view in cases where the
list is empty.
- Corrected some breadcrumb logic.
To test, apply the patch and edit an existing list. You should see a
heading "Editing [list name]".
If necessary create a list with zero items on it. View the list. You
should see New/Edit/Delete links above the message about the list being
empty.
Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.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>
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.
Owen Leonard [Mon, 27 Jan 2014 14:21:15 +0000 (09:21 -0500)]
Bug 11618: ensure jQuery timepicker is picked up by the i18n toolchain
We handle internationalization of the jQuery datepicker by adding
language configuration strings to calendar.inc which can be processed by
the translation script. This patch adds a similar configuration file for
the timepicker.
This patch also upgrades the timepicker plugin to the latest version,
minified, and places it outside the prog template directory for global
use. The path in templates has been updated accordingly.
CSS has been added to more completely hide the controls for seconds,
milliseconds, and microseconds.
To test, apply the patch and clear your cache so that the browser
loads the new version of the jQuery plugin. Confirm that date and time
selection still function correctly on the circulation page, the patron
detail page, and the offline circulation page (circ/offline.pl).
Test at least one datepicker instance which does not use the
timepicker.
Run translate update on a po file and confirm that the timepicker
strings are now present.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Works as expected, no regression found.
Owen Leonard [Wed, 12 Feb 2014 17:19:02 +0000 (12:19 -0500)]
Bug 11753 - Replace jQuery qTip plugin with Bootstrap tooltip on patron search form
The qTip plugin is out of date and incompatible with recent versions of
jQuery. This patch replaces use of qTip on the patron search form with a
Bootstrap tooltip implementation.
To test, apply the patch and view /cgi-bin/koha/members/members-home.pl
- Expand the patron search form by clicking the [+]
- Change 'search fields' from 'Standard' to 'Date of birth'
- A tooltip should appear giving details about the date format required
- Change the 'search fields' to something else. The tooltip should not
appear.
Revision: Removed inclusion of qTip plugin from global header include.
The other instance of qTip usage occurs on a page which loads the plugin
separately.
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>
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>
Galen Charlton [Tue, 18 Feb 2014 20:59:56 +0000 (20:59 +0000)]
Bug 11772: (follow-up) make warning about no active currency a link to currency setup page
This patch standardizes the name of the currency and exchange rates
administration page (although I note that the breadcrumbs on that
page are inconsistent) and makes it a link.
Marc Véron [Sat, 15 Feb 2014 15:19:04 +0000 (16:19 +0100)]
Bug 11772: Show warning on About page:System information if no active currency is defined
This patch displays a warning on the About page when no active currency
is defined.
Test plan:
1)
Make sure that no currency is defined as active
(Home › Administration › Currencies & Exchange rates › Currencies)
2)
Go to Home › About Koha > System information
Result: No warning issued.
3)
Apply patch and reload About page
Result: Warning issued.
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>
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>
Galen Charlton [Mon, 6 Jan 2014 16:54:19 +0000 (16:54 +0000)]
Bug 11310: update the XSLT for the Bootstrap theme
When the Bootstrap theme was started, the XSLT directory
was copied over from the prog theme. However, it was not
kept up to date with respect to changes to prog's XSLT.
This patch rectifies the problem by copying over the
current state of prog/en/xslt to bootstrap/en/xslt. As
a consequence, the following bugs or enhancements should
now be reflected in the Bootstrap theme:
[1] Apply the patch and ensure that OPACXSLTDetailsDisplay
and OPACXSLTResultsDisplay are set to 'default' and that
OPAC theme is set to 'bootstrap'.
[2] Ensure that OPAC results and bib details look OK.
[3] To be really thorough, run through the test plans for the
other bugs referenced by this patch.
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>
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>
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.
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.
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>
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>
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>
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.
While adding the --help and -h switches I forgot to change to arguments
count validation so that one can actually use those parameters (i.e.
koha-create should accept being invoked with only one parameter).
This patch just changes the minimum parateres required from 2 to 1.
To reproduce:
- Run 'koha-create --help' from master
=> Usage information is printed BUT ALSO an "Error: wrong parameters"
message
- Apply the patch and
- Run 'koha-create --help'
=> Usage informatio it printed and no error message.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Wed, 5 Feb 2014 17:16:10 +0000 (12:16 -0500)]
Bug 11692: fix display of additional bib information in OPAC "most popular" pag
The template for the OPAC's "most popular" page includes several
variables which are not passed by the script, including
biblioitems.size. This patch adds the right columns to the query and
standardizes the output somewhat based on non-XSLT opac-detail.
To test, apply the patch and view the "most popular" page in both prog
and bootstrap. You should see correct publisher, copyright, pages, and
size information.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested in all three themes and works lovely
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Improves the bibliographic display on the 'Most popular' page
in the OPAC. Passes all tests and QA script.
To test you must have existing holds on your account. Log into the OPAC
and view the holds tab on the "your summary" page (opac-user.pl).
Resize the browser window until the table switches from a regular table
layout to a vertical column. Only when the view is narrow enough does
the affected label appear:
Pick up location: [library name]
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>
Galen Charlton [Tue, 4 Feb 2014 23:03:08 +0000 (23:03 +0000)]
Bug 11666: remove SQL as an option for MARC framework exports and imports
The SQL option for MARC framework imports was subject to a bug whereby
somebody could use it to gain access to arbitrary information in the
database by uploading an SQL file containing unexpected statements.
As it is difficult to securely sanitize SQL, this patch removes the
option to use SQL as an import or export format.
To test:
[1] Verify that SQL no longer appears as an import or export option
for the MARC frameworks.
[2] Verify that exports and imports in CSV, Excel XML, and ODS formats
still work.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as advertised. The UI doesn't offer exporting/importing in the SQL format.
Crafting the URL to export SQL fallbacks to a spreadsheet format (ODS).
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Galen Charlton [Tue, 4 Feb 2014 15:54:33 +0000 (15:54 +0000)]
Bug 11666: add permission check for MARC framework import/export
This patch makes the MARC framework import/export script require
that the staff user be logged in with appropriate permissions for
managing the MARC frameworks.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can confirm the bug and the solution. After applying the patch
downloading the file without logging in first is no longer possible.
Also passes tests and QA script.
Galen Charlton [Sat, 1 Feb 2014 02:11:38 +0000 (02:11 +0000)]
Bug 11662: remove disused member-picupload.pl
This script is no longer used, and in addition has problematic
handling of its parameters that could lead to writing to
arbitrary files on the server.
To test:
[1] Verify that member-picupload.pl is no longer referred
to in the codebase after applying this patch.
[2] Verify that there are no regressions in patron
photo management.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Found no regressions in removing this script.
Chris Cormack [Sat, 1 Feb 2014 02:06:58 +0000 (15:06 +1300)]
Bug 11661: sanitize file names supplied to edithelp.pl
This patch corrects an issue whereby edithelp.pl could
be used to create or modify arbitrary files on the server
with the permissions of the Apache user.
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.
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.
“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.
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.