Bug 37127 - Authorized values select not working on authority forms
Summary: Authorized values select not working on authority forms
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 24.05
Hardware: All All
: P5 - low major
Assignee: Phil Ringnalda
QA Contact: Emily Lamancusa
URL:
Keywords:
Depends on:
Blocks: 36192
  Show dependency treegraph
 
Reported: 2024-06-19 11:02 UTC by Kdask
Modified: 2024-09-10 23:44 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the add and edit forms for authority records that use authorized values for subfields - values for these subfields can now be selected using a dropdown list. After the CSRF changes in 24.05 to improve form security, no dropdown list for selecting the subfield value was displayed.
Version(s) released in:
24.11.00,24.05.02
Circulation function:


Attachments
Bug 37127: Authorized value select not working on authority forms (1.64 KB, patch)
2024-06-19 17:13 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 37127: Authorized value select not working on authority forms (1.68 KB, patch)
2024-06-19 18:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 37127: Authorized value select not working on authority forms (1.75 KB, patch)
2024-06-20 20:43 UTC, Emily Lamancusa
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kdask 2024-06-19 11:02:47 UTC
When connecting an authorized value on a subfield on Authority Type framework configuration (Example: 040$b - Authorized value: LANG) the Select widget (Select2?) on the cataloging form (Edit/New) is not working.

This seems to happen for any connection on any authorized values/subfields only on authorities cataloging.
Tried creating new authorized value category etc, but the behavior is the same.

Thanks
Comment 1 Phil Ringnalda 2024-06-19 17:13:27 UTC
Created attachment 167884 [details] [review]
Bug 37127: Authorized value select not working on authority forms

Linking an authority subfield to an authorized value just leaves a blank
in the form rather than creating a <select>, because there's a stray cud-
in the type returned from build_authorized_values_list.

Test plan:
 1. Without the patch, Administration - Authority types - Actions menu for
    Default - MARC Structure
 2. Actions menu for 040 - Subfields
 3. Edit subfields - Tab b - Authorized value - set to LANG - Save changes
 4. Authorities - New authority - Default
 5. In 040 tag, click CATALOGING SOURCE to expand the tag
 6. Note that subfield b has a blank space rather than a dropdown menu
 7. Apply patch, restart_all
 8. Authorities - New authority - Default
 9. In 040 tag, click CATALOGING SOURCE to expand the tag
10. Note that subfield b has a dropdown menu listing language names
Comment 2 David Nind 2024-06-19 18:50:18 UTC
Created attachment 167892 [details] [review]
Bug 37127: Authorized value select not working on authority forms

Linking an authority subfield to an authorized value just leaves a blank
in the form rather than creating a <select>, because there's a stray cud-
in the type returned from build_authorized_values_list.

Test plan:
 1. Without the patch, Administration - Authority types - Actions menu for
    Default - MARC Structure
 2. Actions menu for 040 - Subfields
 3. Edit subfields - Tab b - Authorized value - set to LANG - Save changes
 4. Authorities - New authority - Default
 5. In 040 tag, click CATALOGING SOURCE to expand the tag
 6. Note that subfield b has a blank space rather than a dropdown menu
 7. Apply patch, restart_all
 8. Authorities - New authority - Default
 9. In 040 tag, click CATALOGING SOURCE to expand the tag
10. Note that subfield b has a dropdown menu listing language names

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Emily Lamancusa 2024-06-20 20:43:19 UTC
Created attachment 167942 [details] [review]
Bug 37127: Authorized value select not working on authority forms

Linking an authority subfield to an authorized value just leaves a blank
in the form rather than creating a <select>, because there's a stray cud-
in the type returned from build_authorized_values_list.

Test plan:
 1. Without the patch, Administration - Authority types - Actions menu for
    Default - MARC Structure
 2. Actions menu for 040 - Subfields
 3. Edit subfields - Tab b - Authorized value - set to LANG - Save changes
 4. Authorities - New authority - Default
 5. In 040 tag, click CATALOGING SOURCE to expand the tag
 6. Note that subfield b has a blank space rather than a dropdown menu
 7. Apply patch, restart_all
 8. Authorities - New authority - Default
 9. In 040 tag, click CATALOGING SOURCE to expand the tag
10. Note that subfield b has a dropdown menu listing language names

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Katrin Fischer 2024-06-21 13:04:46 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass 2024-07-18 19:25:58 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 6 Fridolin Somers 2024-07-19 08:36:03 UTC
Full CSRF not in 23.11.x
Comment 7 Phil Ringnalda 2024-09-10 23:44:10 UTC
Just a temporary bug, nothing to document.