Bug 28160

Summary: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record
Product: Koha Reporter: Phil Ringnalda <phil>
Component: MARC Authority data supportAssignee: Phil Ringnalda <phil>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06
Bug Depends on: 11961    
Bug Blocks:    
Attachments: Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record

Description Phil Ringnalda 2021-04-16 17:38:29 UTC
For name authorities, when you do a z39.50 search the value of 100$a (or 110$a) is prefilled in the search form, but from a topic/subject authority, the value of 150$a is not prefilled.

That's because topic/subject: authorities.tt puts it into the search URL as "&topic=goats" (because GetMandatoryFieldZ3950 in authorities/authorities.pl told it to), but cataloguing/z3950_auth_search.pl expects to find it in &subject=goats.
Comment 1 Phil Ringnalda 2021-04-16 17:51:06 UTC
Well, that and the way the template doesn't actually put the subject value into the input, once there is a subject value.
Comment 2 Phil Ringnalda 2021-04-16 18:52:46 UTC
Created attachment 119781 [details] [review]
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record

For names and uniform titles, when you do a z39.50 search from an authority
record, we prefill what's in the relevant tag's subfield a in the search
form, but for subjects, we don't, both because GetMandatoryFieldZ3950 thinks
the param is topic when it's actually subject, and because
z3950_auth_search.tt doesn't bother putting the value of &subject into the
form.

Test plan:

1) Authorities - New authority - Topical Term
2) Tab 1, click on HEADING-TOPICAL TERM to expand subfields
3) In subfield a, type goats
4) Click Z39.50/SRU search and verify that the Subject heading search field
   has goats prefilled
Comment 3 Owen Leonard 2021-04-21 13:35:37 UTC
Created attachment 119948 [details] [review]
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record

For names and uniform titles, when you do a z39.50 search from an authority
record, we prefill what's in the relevant tag's subfield a in the search
form, but for subjects, we don't, both because GetMandatoryFieldZ3950 thinks
the param is topic when it's actually subject, and because
z3950_auth_search.tt doesn't bother putting the value of &subject into the
form.

Test plan:

1) Authorities - New authority - Topical Term
2) Tab 1, click on HEADING-TOPICAL TERM to expand subfields
3) In subfield a, type goats
4) Click Z39.50/SRU search and verify that the Subject heading search field
   has goats prefilled

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Nick Clemens 2021-05-07 18:44:36 UTC
Created attachment 120714 [details] [review]
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record

For names and uniform titles, when you do a z39.50 search from an authority
record, we prefill what's in the relevant tag's subfield a in the search
form, but for subjects, we don't, both because GetMandatoryFieldZ3950 thinks
the param is topic when it's actually subject, and because
z3950_auth_search.tt doesn't bother putting the value of &subject into the
form.

Test plan:

1) Authorities - New authority - Topical Term
2) Tab 1, click on HEADING-TOPICAL TERM to expand subfields
3) In subfield a, type goats
4) Click Z39.50/SRU search and verify that the Subject heading search field
   has goats prefilled

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-05-10 14:18:45 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-05-12 14:56:05 UTC
Pushed to 20.11.x for 20.11.06