Bug 41948

Summary: Links to subfields on "View subfields" page don't go to the correct tab
Product: Koha Reporter: David Cook <dcook>
Component: MARC Bibliographic data supportAssignee: David Cook <dcook>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: lari.taskula, phil
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41948: Fix links to subfield tabs in MARC bibliographic frameworks

Description David Cook 2026-02-27 04:27:03 UTC
If you go to a MARC bibliographic framework page like http://localhost:8081/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=&searchfield=100 and click "View subfields", you'll be taken to a list of subfields where the subfield code is linked like this:

http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=100&frameworkcode=#subafield

If you click that, it'll take you to the "Edit subfield constraints" page but it'll have the 0 tab selected instead of the "a" subfield.
Comment 1 David Cook 2026-02-27 04:27:11 UTC
I am sure this used to work properly...
Comment 2 David Cook 2026-02-27 04:39:43 UTC
Created attachment 194044 [details] [review]
Bug 41948: Fix links to subfield tabs in MARC bibliographic frameworks

This patch fixes the URL fragment used to activate/select the
appropriate tab in the tabs in the "Edit subfield constraints" tabs in
the MARC bibliographic frameworks.

Test plan:
0. Apply the patch
1. Go to /cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=100&frameworkcode=
2. Click on "a" next to "Personal name"
3. Note that you're taken to the "Edit subfield constraints" page and the "a" tab is
active
4. Press the Back button in the browser and scroll to the far right and click the "Edit"
button
5. Note that you're again taken to the "Edit subfield constraints" page and the "a"
tab is active
6. Note without the patch, you'd be taken to the 0 tab each time
Comment 3 Phil Ringnalda 2026-02-27 07:27:14 UTC
Authority types need the same fix as bib frameworks, according to the already signed off patch.

*** This bug has been marked as a duplicate of bug 41838 ***
Comment 4 Lari Taskula 2026-02-27 08:23:45 UTC
I've noticed this as well...