Bug 39827

Summary: Wrong framework in edit framework button
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: System AdministrationAssignee: Fridolin Somers <fridolin.somers>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, phil
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39827: Fix framework code in edit framework button
Bug 39827: Fix framework code in edit framework button

Description Fridolin Somers 2025-05-05 08:31:11 UTC
In Administration > MARC bibliographic frameworks the "Edit framework" button in tools bar always edits default framework
Comment 1 Fridolin Somers 2025-05-05 08:38:19 UTC
Created attachment 181899 [details] [review]
Bug 39827: Fix framework code in edit framework button

In Administration > MARC bibliographic frameworks the "Edit framework" button in tools bar always edits default framework

Test plan :
1) Go to Administration > MARC bibliographic frameworks
2) On any framework except default one click on actions then "MARC structure"
3) In tools bar click on "Edit framework"
4) Check you are editing the correct framework
Comment 2 Fridolin Somers 2025-05-05 08:40:26 UTC
OMG using this button on default framework goes to framework creation.
I open a new report.
Comment 3 David Nind 2025-05-05 18:42:01 UTC
Created attachment 181942 [details] [review]
Bug 39827: Fix framework code in edit framework button

In Administration > MARC bibliographic frameworks the "Edit framework" button in tools bar always edits default framework

Test plan :
1) Go to Administration > MARC bibliographic frameworks
2) On any framework except default one click on actions then "MARC structure"
3) In tools bar click on "Edit framework"
4) Check you are editing the correct framework

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-05-05 18:45:11 UTC
I have (In reply to Fridolin Somers from comment #2)
> OMG using this button on default framework goes to framework creation.
> I open a new report.

I have signed off.

However, before the patch I get this behavour for any framework, not just the default framework (MARC21 instance).

That is, before the patch, clicking 'Edit framework' for any framework, shows the add framework form.
Comment 5 Phil Ringnalda 2025-05-06 05:56:14 UTC
We don't allow editing the default framework from the place this link duplicates, the Edit option in the biblio_framework.pl list of frameworks. To allow dealing with it, with its special framework code of '' when a code is otherwise required, you would have to add special-casing for that. Or just hide the link on the default framework like we hide the Edit option.

But a more accurate label for the link would be "Edit framework description" since that's the only thing you can edit, and that's something that you would generally do maybe once, if you made a typo while creating the framework. I really don't see any reason why this link was added. Even if you do notice that you have a description typo while in marctagstructure.pl and use this link, you're going to wind up dumped at biblio_framework.pl when you save your description change, so there's no real benefit over just going there in the first place to do your edit.