Bug 40031

Summary: MARC modification templates should have a unique URL
Product: Koha Reporter: Esther Melander <esther.melander>
Component: CatalogingAssignee: Bugs List <koha-bugs>
Status: CONFIRMED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, m.de.rooy
Version: 23.11Keywords: Academy
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Esther Melander 2025-05-29 18:40:05 UTC
To replicate:

1. Go to Cataloging > MARC Modification templates

note the URL = /cgi-bin/koha/tools/marc_modification_templates.pl

2. Add a new template

notice the URL = /cgi-bin/koha/tools/marc_modification_templates.pl

It would be nice if the template name is incorporated into the URL so the URL can be shared and the user can be taken directly to a template. Currently the user has to go to /cgi-bin/koha/tools/marc_modification_templates.pl and search for the template to see the actions.
Comment 1 David Cook 2025-05-30 01:01:57 UTC
(In reply to Esther Melander from comment #0)
> To replicate:
> 
> 1. Go to Cataloging > MARC Modification templates
> 
> note the URL = /cgi-bin/koha/tools/marc_modification_templates.pl
> 
> 2. Add a new template
> 
> notice the URL = /cgi-bin/koha/tools/marc_modification_templates.pl
> 
> It would be nice if the template name is incorporated into the URL so the
> URL can be shared and the user can be taken directly to a template.
> Currently the user has to go to
> /cgi-bin/koha/tools/marc_modification_templates.pl and search for the
> template to see the actions.

Good point!

Although it wouldn't be the template name. It would be the template ID. For instance, if you go to edit the actions for the template, you'll have a URL like /cgi-bin/koha/tools/marc_modification_templates.pl?template_id=2&op=select_template

So the fix for this would be to add the new template with a POST and then after a successful add, it should redirect the user to /cgi-bin/koha/tools/marc_modification_templates.pl?template_id=<TEMPLATE ID>&op=select_template
Comment 2 David Cook 2025-05-30 01:02:25 UTC
I'm a bit time poor at the moment, but that should be a simple fix for someone.
Comment 3 David Cook 2025-05-30 01:03:07 UTC
Btw confirmed back to 23.11, but probably an issue for much older versions too