Bug 21666

Summary: Advanced editor search- error is given for 'Unsupported Use attribute' when searching on title + author
Product: Koha Reporter: Cori Lynn Arnold <carnold>
Component: CatalogingAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: normal    
Priority: P5 - low CC: dcook, fridolin.somers, josef.moravec, katrin.fischer, m.de.rooy, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Error is given for “Unsupported Use attribute”
Bug 21666: Replace unsupported use attribute with more widely supported attribute
Bug 21666: Replace unsupported use attribute with more widely supported attribute
Bug 21666: Replace unsupported use attribute with more widely supported attribute
Bug 21666: Replace unsupported use attribute with more widely supported attribute
Bug 21666: Replace unsupported use attribute with more widely supported attribute

Description Cori Lynn Arnold 2018-10-25 15:01:00 UTC
Created attachment 81168 [details]
Error is given for “Unsupported Use attribute”

In the advanced cataloging interface, searching LOC and Seattle Public Library for author "Feeney" and title "Sometimes I Lie" results in a record from LOC and "Unsupported Use attribute" error from SPL. (see figure 1 in attached doc)

However, the same search using the button "New from Z39.50/SRU" from the basic cataloging interface results in records from LOC and SPL. (see figure 2 in attached doc)
Comment 1 David Cook 2018-10-25 23:47:22 UTC
Let's see...

The Advanced Editor in cataloguing defines its search attributes in "./koha-tmpl/intranet-tmpl/lib/koha/cateditor/search.js".

Title = 1=4
Author = 1=1004

The "New from Z39.50/SRU" defines its attributes in "C4/Breeding.pm".

Title = @attr 1=4
Author = @attr 1=1003

We can see the full list of attributes at https://www.loc.gov/z3950/agency/defns/bib1.html#use

We can see LOC's supported attributes at http://www.loc.gov/z3950/lcserver.html (which includes 1003 and 1004).

I don't see any information about SPL's supported attributes or Z39.50 set up.

However, it seems to me that 1004 is an odd choice. I think 1003 tends to be more widely supported.
Comment 2 David Cook 2018-10-26 00:00:36 UTC
Created attachment 81249 [details] [review]
Bug 21666: Replace unsupported use attribute with more widely supported attribute

search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records
Comment 3 David Cook 2018-10-26 00:02:09 UTC
Created attachment 81250 [details] [review]
Bug 21666: Replace unsupported use attribute with more widely supported attribute

search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records
Comment 4 Katrin Fischer 2018-10-28 17:29:10 UTC
Switching to Needs Signoff.
Comment 5 David Cook 2018-10-28 23:19:12 UTC
(In reply to Katrin Fischer from comment #4)
> Switching to Needs Signoff.

Thanks, Katrin. I usually use git-bz but the title of this bug used to have non-ASCII characters in it which caused the git-bz editor to fail. Thanks for following that up.
Comment 6 ByWater Sandboxes 2018-10-29 13:56:07 UTC
Created attachment 81502 [details] [review]
Bug 21666: Replace unsupported use attribute with more widely supported attribute

search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Comment 7 Josef Moravec 2018-10-29 19:49:03 UTC
Created attachment 81532 [details] [review]
Bug 21666: Replace unsupported use attribute with more widely supported attribute

search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Katrin Fischer 2018-10-29 19:49:59 UTC
Addming my sign-off too - seeing now why my git-bz attach just failed :)
Comment 9 Katrin Fischer 2018-10-29 19:51:00 UTC
Created attachment 81533 [details] [review]
Bug 21666: Replace unsupported use attribute with more widely supported attribute

search.js uses the 1=1004
author personal attribute which isn't supported by libraries like
Seattle Public Library.

This patch aligns search.js
with C4/Breeding.pm which uses the more widely supported 1=1003
author attribute.

To test:
1. Set up Seattle Public Library as a Z39.50 target
2. Try to search author using the Advanced Editor advanced search
3. Observe failure
4. Apply the patch
5. Try to search again
6. Observe successful retrieval of records

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Josef Moravec 2018-10-29 20:05:41 UTC
(In reply to Katrin Fischer from comment #8)
> Addming my sign-off too - seeing now why my git-bz attach just failed :)

Sorry Katrin ;)
Comment 11 Nick Clemens 2018-11-08 02:27:48 UTC
Awesome work all!

Pushed to master for 18.11
Comment 12 Martin Renvoize 2018-11-16 12:54:31 UTC
Pushed to 18.05.x for 18.05.06
Comment 13 Fridolin Somers 2018-11-28 14:31:05 UTC
Pushed to 17.11.x for 17.11.13