Summary: | JavaScript error on MARC modifications page | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, fridolin.somers, kyle, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
URL: | /cgi-bin/koha/tools/marc_modification_templates.pl | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch makes a minor change to the MARC modifications template (Staff interface > Administration > MARC modification templates) so that the "mmtas" variable isn't defined if there is no JSON to be assigned as its value.
|
Version(s) released in: |
21.11.00,21.05.02,20.11.08
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 28418 | ||
Attachments: |
Bug 28423: JavaScript error on MARC modifications page
Bug 28423: JavaScript error on MARC modifications page Bug 28423: JavaScript error on MARC modifications page |
Description
Owen Leonard
2021-05-21 17:01:38 UTC
Created attachment 121280 [details] [review] Bug 28423: JavaScript error on MARC modifications page This patch makes a minor change to the MARC modifications template so that the "mmtas" variable isn't defined if there is no JSON to be assigned as its value. To test, apply the patch and go to Administration -> MARC modification templates. - If necessary, add a template with at least one action. - Check the browser console, there should be no errors. - Click the "Edit" button corresponding to one of the template actions. - The details of the action should load correctly in the edit form and there should be no errors in the console. Created attachment 121303 [details] [review] Bug 28423: JavaScript error on MARC modifications page This patch makes a minor change to the MARC modifications template so that the "mmtas" variable isn't defined if there is no JSON to be assigned as its value. To test, apply the patch and go to Administration -> MARC modification templates. - If necessary, add a template with at least one action. - Check the browser console, there should be no errors. - Click the "Edit" button corresponding to one of the template actions. - The details of the action should load correctly in the edit form and there should be no errors in the console. Signed-off-by: David Nind <david@davidnind.com> Testing notes (koha-testing-docker): - Error message in the browser console when going to Staff interface home > Tools > Catalog > MARC modification templates before applying the patch was: "Uncaught SyntaxError: expected expression, got end of script" - Adding and editing new templates worked as expected - After applying the patch there was no console error Created attachment 121327 [details] [review] Bug 28423: JavaScript error on MARC modifications page This patch makes a minor change to the MARC modifications template so that the "mmtas" variable isn't defined if there is no JSON to be assigned as its value. To test, apply the patch and go to Administration -> MARC modification templates. - If necessary, add a template with at least one action. - Check the browser console, there should be no errors. - Click the "Edit" button corresponding to one of the template actions. - The details of the action should load correctly in the edit form and there should be no errors in the console. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.02 Pushed to 20.11.x for 20.11.08 Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed. |