Bug 40031 - MARC modification templates should have a unique URL
Summary: MARC modification templates should have a unique URL
Status: CONFIRMED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 23.11
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2025-05-29 18:40 UTC by Esther Melander
Modified: 2025-05-30 01:03 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

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