It would be helpful to add the ability to rename a MARC modification template. There are times when the name originally assigned isn't as descriptive as desired. While it is currently possible to use the 'New template' button to duplicate the template and give it a new name that's not very obvious. And then the old template would need to be deleted. This takes time and it would be more efficient to have a button or action from the main MARC modification template screen for renaming.
+1, this is a stilly functionality to leave out.
Came here to file a bug about this myself. This would be extremely useful! A use case for me: I created a bunch of templates based on the specific MARC tags they were updating and they were all next to each other, but as we've created more templates, the original ones I created are now spread out. It would be helpful if I could rename them to include something at the beginning of each one so they would be sorted next to each other permanently. Another use case: fixing typos!
Created attachment 168041 [details] [review] Bug 27182: Unit tests To test: prove t/db_dependent/MarcModificationTemplates.t
Created attachment 168042 [details] [review] Bug 27182: Add ability to rename a MARC modification template This patch adds a new 'Rename template' button on the MARC modifications templates page. To test: 1) Go to Cataloging -> MARC modification templates 2) Click the button at the top 'New template'. Name your template and press submit. 3) You should now be on the actions page for that template. Notice there isn't any options to rename your template. 4) Apply patch and restart_all 5) Notice that there is now a "Rename template' button. 6) Click this and rename your template and press submit. 7) Notice that the template name changed correctly. 8) Go back to the general MARC modifications templates page. Note the name of your template is correctly displayed in the table.
Created attachment 168045 [details] [review] Bug 27182: (follow-up) Fix tidy warning
Looks great, Sam. I notice 1 typo in C4/MarcModificationTemplates.pm: RenameModificatoinTemplate( $template_name, $template_id );
Created attachment 168077 [details] [review] Bug 27182: (follow-up) Fix typo in pm
Created attachment 168079 [details] [review] Bug 27182: (follow-up) Fix typo in pm Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Worked great! Just a wee thing here, "4) Apply patch and restart_all 5) Notice that there is now a "Rename template' button," probably for the documentation, that one needs to: Select the 'Edit actions' button. Then 'Rename template' will appear at the top; choose 'Rename template' I've forgotten if I should change the Status on this bug to "Signed off," or if someone does then when it gets a second signoff? Cheerio!! h2
Created attachment 168080 [details] [review] Bug 27182: Unit tests To test: prove t/db_dependent/MarcModificationTemplates.t Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 168081 [details] [review] Bug 27182: Add ability to rename a MARC modification template This patch adds a new 'Rename template' button on the MARC modifications templates page. To test: 1) Go to Cataloging -> MARC modification templates 2) Click the button at the top 'New template'. Name your template and press submit. 3) You should now be on the actions page for that template. Notice there isn't any options to rename your template. 4) Apply patch and restart_all 5) Notice that there is now a "Rename template' button. 6) Click this and rename your template and press submit. 7) Notice that the template name changed correctly. 8) Go back to the general MARC modifications templates page. Note the name of your template is correctly displayed in the table. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 168082 [details] [review] Bug 27182: (follow-up) Fix tidy warning Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 168083 [details] [review] Bug 27182: (follow-up) Fix typo in pm Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
When I click "Rename template" nothing happens. There is no errors in the browser console. Also RenameModificationTemplate needs to be rewritten because of https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL16:_Hashrefs_should_be_used_as_arguments
Created attachment 171294 [details] [review] Bug 27182: Account for Bootstrap 5 changes
Created attachment 171295 [details] [review] Bug 27182: Rework RenameModificationTemplate to not pass hashref as argument