Commit graph

20813 commits

Author SHA1 Message Date
Jonathan Druart
7a2dec05ed 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>
2014-02-21 19:41:07 +00:00
Galen Charlton
827c7e8ece Bug 11256: (follow-up) tweak description of the OpacMaxItemsToDisplay syspref
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 18:44:01 +00:00
Galen Charlton
e0e56963fb Bug 11256: DBRev 3.15.00.019
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 18:36:06 +00:00
Jonathan Druart
11fbcafa8f Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap
This patch adds the changes for the bootstrap theme.
See test plan in the previous patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2014-02-21 18:34:31 +00:00
Jonathan Druart
31b732b830 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>
2014-02-21 18:34:27 +00:00
36eac129f7 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 18:29:15 +00:00
5e0d450875 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>
2014-02-21 18:24:11 +00:00
Galen Charlton
1d276d5809 Bug 10580: (follow-up) tweak wording about looking for zebrasrv & zebraidx
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 17:38:42 +00:00
0b989fe0b2 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>
2014-02-21 17:38:15 +00:00
Jonathan Druart
988dc3b64a 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.
2014-02-21 17:15:33 +00:00
Galen Charlton
2be50eba0f 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 16:11:28 +00:00
Galen Charlton
67653c8d5f Bug 7372: DBRev 3.15.00.018
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-21 16:02:33 +00:00
Jonathan Druart
a691ebc3f1 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>
2014-02-21 16:00:53 +00:00
Nicole C. Engard
40ba1763af 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>
2014-02-20 19:35:05 +00:00
Ketan Kulkarni
65ae7a950d 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 19:31:13 +00:00
Galen Charlton
3f6ecd4f59 Bug 11611: DBRev 3.15.00.017
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 19:09:11 +00:00
Mathieu Saby
68a7f7f445 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>
2014-02-20 19:08:11 +00:00
e7286e0513 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 18:57:35 +00:00
d95ad086a3 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 16:59:01 +00:00
5dc093b30e 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>
2014-02-20 16:58:49 +00:00
1d9b86aabc 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>
2014-02-20 16:58:32 +00:00
19bf1e9a40 Bug 11795 - Use validation plugin when creating new Z39.50 server
The page for adding a new Z39.50 server includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

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

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

These errors should trigger a validation warning.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 16:58:11 +00:00
4e9b5110d9 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>
2014-02-20 16:56:56 +00:00
03675fd553 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>
2014-02-20 16:56:41 +00:00
7faff33c8b 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>
2014-02-20 16:56:21 +00:00
6a323ce4ce 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>
2014-02-20 16:54:17 +00:00
daa98e73f8 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>
2014-02-20 16:53:32 +00:00
Colin Campbell
11faf9fde8 Bug 11479: Remove experimental given/when keywords
Replace constructs using given and when by if/else
feature now generates compilation warnings in 5.18
and is liable to change behaviour.

This patch:

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

To test:

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 15:55:21 +00:00
Colin Campbell
08d15a6fd1 Bug 11478: Replace experimental given/when keywords
The keywords given and when are flagged experimental
in perl 5.18 and subject to change. This patch
replaces the construct by an if/elsif

To test:

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-20 15:52:57 +00:00
48298fe494 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.

Signed-off-by: Holger Meißner <h.meissner.82@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 21:32:07 +00:00
5188702236 Bug 11732: Eliminate warning on undefined branchcode
When you run the Reserves test, you have the warnings:
Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 138.
Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 148.
This patch removes that warning.

Test plan:
Run the Reserves.t again.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 21:20:51 +00:00
Galen Charlton
c9dd8b8bc3 Bug 11202: (follow-up) update number of expected tests for t/QueryParser.t
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 21:04:26 +00:00
Jonathan Druart
0e92d21d0e Bug 11202: FIX UT for QueryParser.t
Test plan:
prove t/QueryParser.t

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

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

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

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

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

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

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

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 21:01:15 +00:00
Galen Charlton
aaff735269 Bug 10544: (follow-up) update MARC21 DOM index definitions
This patch updates the MARC21 DOM index definitions to
index the 952$i as 'Number-local-acquisition' rather than
'stocknumber'.

To test (for a MARC21/DOM setup):

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 20:41:37 +00:00
Fridolyn SOMERS
f62e45dc92 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>
2014-02-19 20:40:30 +00:00
Fridolyn SOMERS
b0f39cee0d 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>
2014-02-19 20:39:58 +00:00
Fridolyn SOMERS
10e1cbeb14 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>
2014-02-19 20:39:10 +00:00
Galen Charlton
7efc10542b Bug 11644: (follow-up) add FIXME
Arithmetic with monetary amounts is a *hard* problem -- or if
not hard, at least super-fiddly, particularly since in theory
a Koha database could have to deal with dozens of currencies
if used by a large research library.  This patch adds a FIXME
implicitly commenting on the poor state of affairs of available
monetary calculation modules on CPAN.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 20:04:22 +00:00
ba689152e4 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>
2014-02-19 20:04:19 +00:00
Galen Charlton
a97f21ad3b Bug 11777: add regression test
This patch adds a regression test for ensuring that the
authorisedby field is returned by SearchOrders().

To test:

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 17:14:25 +00:00
Amit Gupta
ed6e2b57a1 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>
2014-02-19 17:13:26 +00:00
37a0e88819 Bug 11783: ensure CD field in SIP patron information response is populated
If a patron has a record-level hold that is unavailable, any patron
information request will send back an empty CD field when this field
should have an item barcode in it [RM note: this actually isn't
universally true -- the SIP2 standard is silent as to what is supposed
to go in the CD field. Some SIP2 devices do indeed want an item
barcode, but others are known to just want a display of the title
and author of the request in question.  Providing an option is the
topic of a new enhancement request, however.]

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

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

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

displays:

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

$VAR1 = '23168';

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 16:55:13 +00:00
Galen Charlton
065a3a5efa Bug 11779: (follow-up) improve GetLoggedInBranchcode() and add test cases
This patch adjusts the new GetLoggedInBranchcode() template function so
that it returns the empty string rather than undef if there is no
active user environment.  That way, there won't be lots of undefined
value warnings if/when this function gets used in the OPAC.

This patch also adds test cases.

To test:

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 16:40:06 +00:00
858083c8e9 Bug 11779: fix unexpected change in logged-in library when changing overdue notice triggers
Steps to reproduce:
1) Log into staff intranet
2) Set logged in branch
3) Browse to tools/overdue notice triggers
4) Select a branch from the pulldown that is not your logged in branch
5) use the "Check out" bar at the top of the page to search for a patron
to check out to
6) Once you have landed here, click the "check out" tab link again, or
   the Edit button ( any action really )
7) Note your logged in branch has now changed to the once selected
   when editing the notice/status triggers

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

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 16:07:10 +00:00
Marc Véron
9d5fadb983 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>
2014-02-19 15:56:09 +00:00
7d05394ff2 Bug 11740 - Use new DataTables include in quotes upload template
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
quotes upload page.

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

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 15:54:51 +00:00
5ee8268a8d 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>
2014-02-19 15:51:12 +00:00
ac9d872fef 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>
2014-02-19 15:47:57 +00:00
6fd2655889 Bug 11749 - Remove unused jQuery plugin jquery.hoverIntent.minified.js from the staff client
The jQuery plugin jquery.hoverIntent.minified.js is used only in the
OPAC, not the staff client. This patch removes it from the staff client.

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

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 15:39:05 +00:00