Bug 28160 - Values from 150$a aren't prefilled in z39.50 search form from an existing authority record
Summary: Values from 150$a aren't prefilled in z39.50 search form from an existing aut...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Phil Ringnalda
QA Contact: Testopia
URL:
Keywords:
Depends on: 11961
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-16 17:38 UTC by Phil Ringnalda
Modified: 2021-12-13 21:11 UTC (History)
1 user (show)

See Also:
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


Attachments
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record (2.75 KB, patch)
2021-04-16 18:52 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record (2.82 KB, patch)
2021-04-21 13:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28160: Values from 150$a aren't prefilled in z39.50 search form from an existing authority record (2.87 KB, patch)
2021-05-07 18:44 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (kidclamp) 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