Bug 23736 - Advanced Editor: Search by Control Number not working
Summary: Advanced Editor: Search by Control Number not working
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 19.05
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-03 15:45 UTC by Cori Lynn Arnold
Modified: 2019-10-18 18:05 UTC (History)
2 users (show)

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


Attachments
Sample bib record with control number field (2.46 KB, text/plain)
2019-10-03 15:45 UTC, Cori Lynn Arnold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cori Lynn Arnold 2019-10-03 15:45:07 UTC
Created attachment 93659 [details]
Sample bib record with control number field

The "Advanced Search" in the Advanced Editor is not returning searches by Control Number

Steps to reproduce:
1. Import a bibliographic record with the 001 field populated (attached is the sample record I used, with Control Number "faw00039489")
2. Go to More -> Cataloging 
3. Click on the Advanced Editor button
4. Click "Advanced" from the left side menu
5. Enter the control number from step 1 (faw00039489 from my example) ; verify that "Local Catalog" is checked
6. Click "Search" button

Result: 
zero results

Expected results:
Bibliographic record from step 1 is returned
Comment 1 Cori Lynn Arnold 2019-10-17 19:23:10 UTC
While digging into this bug it appears that the control number is working for Z39.5 servers (like Library of Congress), but not for the local catalog. Perhaps there is a setting one needs to update?
Comment 2 Nick Clemens 2019-10-18 16:57:35 UTC
For the 'Control number' field in rancor advanced search we actually map it to "attr 1=12" which is Local-number

In Unimarc we map 001 into Local-number, but in MARC21 we map it to Contorl-number

to test, try a search for:
Local-number: faw00039489
vs
Control-number: faw00039489

koha-tmpl/intranet-tmpl/lib/koha/cateditor/search.js:
 25     var _pqfMapping = {
 26         author: '1=1003', // s=al',
 27         cn_dewey: '1=13',
 28         cn_lc: '1=16',
 29         date: '1=30', // r=r',
 30         isbn: '1=7',
 31         issn: '1=8',
 32         lccn: '1=9',
 33         local_number: '1=12',
 34         music_identifier: '1=51',
 35         standard_identifier: '1=1007',
 36         subject: '1=21', // s=al',
 37         term: '1=1016', // t=l,r s=al',
 38         title: '1=4', // s=al',
 39     }
Comment 3 Cori Lynn Arnold 2019-10-18 17:17:52 UTC
Nick, thanks for looking into this, but I am not seeing anyway to search "Local-number" in the Advanced Editor? Am I missing something?

https://paste.pics/b86b3bb78a94487d57cb9623c649dd0e
Comment 4 Nick Clemens 2019-10-18 17:28:30 UTC
(In reply to Cori Lynn Arnold from comment #3)
> Nick, thanks for looking into this, but I am not seeing anyway to search
> "Local-number" in the Advanced Editor? Am I missing something?
> 
> https://paste.pics/b86b3bb78a94487d57cb9623c649dd0e

You can search that in the general koha search bar, just enter:
Local-number: faw00039489
it shoudl have no results
Control-number should find the correct record
Comment 5 Cori Lynn Arnold 2019-10-18 18:05:35 UTC
Okay, great workaround, but we'd love to see this working in the "Advanced Search" area as well.