| Summary: | Creation of a new MARC modification template should redirect to have the template ID in the URL | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Esther Melander <esther.melander> |
| Component: | Cataloging | Assignee: | Raguram Gopinath <aviatorgaming309> |
| Status: | Pushed to main --- | QA Contact: | Lucas Gass (lukeg) <lucas> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | aleisha, aviatorgaming309, david, dcook, lucas, m.de.rooy |
| Version: | Main | Keywords: | Academy |
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | Sponsored | Comma delimited list of Sponsors: | Catalyst |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This updates the URL when adding a new MARC modification template (Cataloging > Batch editing > MARC modification templates). It adds the template ID so that you can directly link to the template.
Previously, you had to click `Edit actions` from the list of templates, and couldn't directly link to the template to see the actions:
- Previous URL after adding a template:
STAFF-INTERFACE-URL/cgi-bin/koha/tools/marc_modification_templates.pl
- New URL after adding a template:
STAFF-INTERFACE-URL/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template
|
Version(s) released in: |
26.05.00
|
| Circulation function: | |||
| Attachments: |
Bug 40031: Redirect to add action page from add template form
Bug 40031: Redirect to add action page from add template form Bug 40031: Redirect to add action page from add template form |
||
|
Description
Esther Melander
2025-05-29 18:40:05 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 I'm a bit time poor at the moment, but that should be a simple fix for someone. Btw confirmed back to 23.11, but probably an issue for much older versions too Renaming so easier to understand what bug this is addressing Created attachment 191741 [details] [review] Bug 40031: Redirect to add action page from add template form Test plan: 1. Login to staff client. 2. Go to: Cataloging > MARC modification templates > New template 3. Give new template a name and click submit. 4. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl If you are using KTD 5. Apply patch and restart services. 6. Repeat steps 2 and 3. 7. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template 8. You can now add actions for your new template. Created attachment 191769 [details] [review] Bug 40031: Redirect to add action page from add template form Test plan: 1. Login to staff client. 2. Go to: Cataloging > MARC modification templates > New template 3. Give new template a name and click submit. 4. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl If you are using KTD 5. Apply patch and restart services. 6. Repeat steps 2 and 3. 7. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template 8. You can now add actions for your new template. Signed-off-by: David Nind <david@davidnind.com> I attempted a release note, not sure I got this right... Thanks for the patch Raguram! Created attachment 191843 [details] [review] Bug 40031: Redirect to add action page from add template form Test plan: 1. Login to staff client. 2. Go to: Cataloging > MARC modification templates > New template 3. Give new template a name and click submit. 4. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl If you are using KTD 5. Apply patch and restart services. 6. Repeat steps 2 and 3. 7. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template 8. You can now add actions for your new template. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Works good! Passing QA here. Thanks Raguram! Nice work everyone! Pushed to main for 26.05 |