Bug 9968 - Incorrect index used for 'Standard number' in advanced search
Summary: Incorrect index used for 'Standard number' in advanced search
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 10:01 UTC by Silvia Rus
Modified: 2019-10-14 19:58 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9968: Fix wrong index for Standard number in advanced and label search (3.90 KB, patch)
2018-05-16 01:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 9968: Fix wrong index for Standard number in advanced and label search (3.96 KB, patch)
2018-10-03 09:07 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 9968: Fix wrong index for Standard number in advanced and label search (4.05 KB, patch)
2018-10-05 10:21 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Silvia Rus 2013-04-02 10:01:06 UTC
In file "etc\zebradb\ccl.properties" the label  "Local-number" is being abbreviated by "sn", it seems an error because "sn" should be the abbreviation of "standard number".

The label of standard number is "Identifier-standard" abbreviated by "ident".

The standard numbers sholud be the 020, 022 and 024 MARC fields and not the in 001 and 035 fields.

For this reason searching in Advanced Search is wrong in "search-indexes.inc" it find the following code:

[% IF (numbersphr) %]
    <option value="sn,phr">Standard number</option>
[% ELSE %]
    <option value="sn">Standard number</option>
[% END %]

Should be:

[% IF (numbersphr) %]
    <option value="ident,phr">Standard number</option>
[% ELSE %]
    <option value="ident">Standard number</option>
[% END %]
Comment 1 Katrin Fischer 2018-05-16 01:13:17 UTC
Created attachment 75351 [details] [review]
Bug 9968: Fix wrong index for Standard number in advanced and label search

'Standard number' indicates that you can search ISBN, ISSN and other
standard numbers, but we are using the wrong index and only get a
very limited search for biblionumber instead.

This patch changes the index from sn to ident.

To test:
- Check both staff and OPAC advanced search:
  - Search for Standard number = ISBN
  - Search for Standard number = ISSN
  Both should work.
  Toggle [Intranet|OPAC]NumbersPreferPhrase system preferences
- Check the label creator
  - Add a new batch
  - Use 'add items' option and search for Standard number
Comment 2 Cab Vinton 2018-07-21 17:18:20 UTC
Not sure if related, but no searches of any kind work in Sandbox 14, on either the staff or OPAC side (database 1, w/ 450 records).

Unable to test :-(
Comment 3 Katrin Fischer 2018-07-22 18:37:58 UTC
This only touches some template files so should not be related. Could you try another box? Maybe take a look and switch the searchengine preference to Zebra.
Comment 4 Cab Vinton 2018-07-23 10:11:08 UTC
It's unclear to me from the test plan what the expected results should be when the [Intranet|OPAC]NumbersPreferPhrase system preferences are toggled.

*General* Standard number searches work in Sandbox 05 when these are set to Use (the operator "phr" in the callnumber and standard number staff client searches).

They fail when set to Don't use. (Searches using the specific ISBN & ISSN fields work with both settings.)

Label creation works fine with either setting as long as ISBN or ISSN is set as the search field. No results, however, with either setting when searching by the general Standard number field.
Comment 5 Michal Denar 2018-10-03 09:07:18 UTC
Created attachment 79862 [details] [review]
Bug 9968: Fix wrong index for Standard number in advanced and label search

'Standard number' indicates that you can search ISBN, ISSN and other
standard numbers, but we are using the wrong index and only get a
very limited search for biblionumber instead.

This patch changes the index from sn to ident.

To test:
- Check both staff and OPAC advanced search:
  - Search for Standard number = ISBN
  - Search for Standard number = ISSN
  Both should work.
  Toggle [Intranet|OPAC]NumbersPreferPhrase system preferences
- Check the label creator
  - Add a new batch
  - Use 'add items' option and search for Standard number

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 6 Katrin Fischer 2018-10-03 12:22:14 UTC
Thx Michal!
Comment 7 Marcel de Rooy 2018-10-05 10:21:31 UTC
Created attachment 80020 [details] [review]
Bug 9968: Fix wrong index for Standard number in advanced and label search

'Standard number' indicates that you can search ISBN, ISSN and other
standard numbers, but we are using the wrong index and only get a
very limited search for biblionumber instead.

This patch changes the index from sn to ident.

To test:
- Check both staff and OPAC advanced search:
  - Search for Standard number = ISBN
  - Search for Standard number = ISSN
  Both should work.
  Toggle [Intranet|OPAC]NumbersPreferPhrase system preferences
- Check the label creator
  - Add a new batch
  - Use 'add items' option and search for Standard number

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Nick Clemens 2018-10-09 16:18:22 UTC
Awesome work all!

Pushed to master for 18.11
Comment 9 Martin Renvoize 2018-10-15 11:27:59 UTC
Pushed to 18.05.x for 18.05.05
Comment 10 Fridolin Somers 2018-11-08 15:19:19 UTC
Pushed to 17.11.x for 17.11.12