Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin
Julian Maurice 7c2ff7940e Bug 11425: Add item search form in staff interface
Item search is available at catalogue/itemsearch.pl (link is in
catalogue/search.pl)
It only uses SQL (not Zebra)
* Use DataTables and server-side processing to be able to filter on
  individual columns after the first search is done.
* Allow to export results in CSV
* With Javascript disabled, search form still works (and CSV export too)

There is the possibility to define "Custom search fields" in a new admin
page admin/items_search_fields.pl (link is in admin/admin-home.pl)
A custom item search field is defined by:
* a name: its unique identifier
* a label: the text displayed to the user
* a MARC field/subfield: the field/subfield to query (it uses
  ExtractValue)
* an authorised values list (optional): if defined the list is displayed
  in the search form

New Perl dependency: Template::Plugin::JSON::Escape

Test plan:
1/ Apply the patch and run updatedatabase.pl
2/ Go to advanced search (staff interface), then click on "Go to item
search"
3/ Play with the search form! :)
In the 3rd fieldset you can add as many fields as you want and combine them with
boolean operators (AND, OR). You can use SQL jokers characters (%, _)
You can output to screen (in a DataTables table) or to a CSV file.
4/ In the DataTables table, play with filters and try sorting columns.
5/ Disable Javascript (with Firefox: extensions NoScript or YesScript,
or in about:config 'javascript.enabled' = false
6/ Reload the search page and do some searches on screen output. (there
is no sorting or filtering features, but there is still pagination)
7/ Try again CSV output.
8/ You can re-enable Javascript.
9/ Go to Administration > Items search fields
10/ Add a new field. Example for title (in UNIMARC):
  Name: title
  Label: Title
  MARC field: 200
  MARC subfield: a
  Authorised values category: None
(add another field with an authorised values category to see the
difference).
11/ As you are there try to update and delete some fields.
12/ Go back to items search form. You can see in the 3rd fieldset that
your fields have appeared in the selects.
13/ Try searching on them.
14/ I think you're done :)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2014-11-04 19:08:12 -03:00
..
preferences Bug 11126 - Make the holds system optionally give precedence to local holds 2014-11-04 18:53:37 -03:00
admin-home.tt Bug 11425: Add item search form in staff interface 2014-11-04 19:08:12 -03:00
aqbudget_user_search.tt
aqbudgetperiods.tt Bug 12844: Use Koha::Number::Price where it can be useful 2014-10-27 12:56:21 -03:00
aqbudgets.tt Bug 11714 - GetBudgetHierarchy needs optimization 2014-10-31 16:41:46 -03:00
aqcontract.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
aqplan.tt Bug 12844: Use Koha::Number::Price where it can be useful 2014-10-27 12:56:21 -03:00
auth_subfields_structure.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
auth_tag_structure.tt Bug 11812 - Add missing "required" indicator to fields which are required 2014-10-22 14:04:43 -03:00
authorised_values.tt Bug 766: Remove CGI::scrollinglist from authorised_values.pl 2014-08-13 10:11:11 -03:00
authtypes.tt Bug 11812 - Add missing "required" indicator to fields which are required 2014-10-22 14:04:43 -03:00
biblio_framework.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
branch_transfer_limits.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
branches.tt Bug 9350: Making changes so that you can add the new fields to branches 2014-10-27 10:38:16 -03:00
categorie.tt Bug 11812 - Add missing "required" indicator to fields which are required 2014-10-22 14:04:43 -03:00
checkmarc.tt Bug 7817: (followup) add test on MARC bibliographic framework test 2014-09-08 12:29:38 -03:00
cities.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
classsources.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
clone-rules.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
columns_settings.tt Bug 10212: (qa followup) accordion collapsed by default 2014-08-26 10:26:50 -03:00
currency.tt Bug 13071: format_date should not be called in currency.pl 2014-10-24 09:46:05 -03:00
didyoumean.tt
fieldmapping.tt
item_circulation_alerts.tt Bug 12138 - Use placeholders in translatable Javascript strings 2014-04-27 21:24:04 +00:00
items_search_field.tt Bug 11425: Add item search form in staff interface 2014-11-04 19:08:12 -03:00
items_search_fields.tt Bug 11425: Add item search form in staff interface 2014-11-04 19:08:12 -03:00
itemtypes.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
koha2marclinks.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
marc_subfields_structure.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
marctagstructure.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
matching-rules.tt
oai_set_mappings.tt Bug 12686: Make more selected option XHTML compliant 2014-08-07 10:58:39 -03:00
oai_sets.tt Bug 11806 - Use validation plugin when creating new OAI set 2014-03-26 19:21:14 +00:00
patron-attr-types.tt Bug 6254: make it possible to set default privacy setting for new patrons 2014-05-26 01:17:37 +00:00
preferences.tt Bug 12150 - Use more javascript string formatting in intranet for translated strings. 2014-07-03 09:52:48 -03:00
printers.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
smart-rules.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
sru_modmapping.tt Bug 6536: Add a form for SRU Field mapping 2014-09-01 10:08:50 -03:00
stopwords.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
systempreferences.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00
transport-cost-matrix.tt Bug 8938: Transport cost matrix script and template contain untranslatable strings 2014-08-14 20:37:37 -03:00
z3950servers.tt Bug 2889 - templates should use [% IF ( loop.odd ) %] - Administration 2014-10-15 17:59:12 -03:00