Bug 27890

Summary: Advanced editor - new macro not selected after creation
Product: Koha Reporter: Nick Clemens <nick>
Component: CatalogingAssignee: Nick Clemens <nick>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26964
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 27890: Select new macro after creation
Bug 27890: Select new macro after creation
Bug 27890: Select new macro after creation

Description Nick Clemens 2021-03-06 15:37:44 UTC
When a new macro is created it is not automatically selected - if you edit without selecting the macro nothing will be saved
Comment 1 Nick Clemens 2021-03-06 15:40:58 UTC
Created attachment 117885 [details] [review]
Bug 27890: Select new macro after creation

There was an error here, we were capturing the status of the request (i.e. success)
instead of the returned data.

To test:
 1 - Go to Cataloguing -> Advanced editor
 2 - Click 'Macros'
 3 - 'New macro..'
 4 - Assing a name and click 'Ok'
 5 - New macro is in list on left, but not selected
 6 - Type into editor, no save feedback after typing
 7 - Apply patch
 8 - Reload the editor
 9 - Repeat 3-4
10 - New macro is selected
11 - Type into editor, save notification appears
Comment 2 David Nind 2021-03-06 21:12:37 UTC
Created attachment 117888 [details] [review]
Bug 27890: Select new macro after creation

There was an error here, we were capturing the status of the request (i.e. success)
instead of the returned data.

To test:
 1 - Go to Cataloguing -> Advanced editor
 2 - Click 'Macros'
 3 - 'New macro..'
 4 - Assing a name and click 'Ok'
 5 - New macro is in list on left, but not selected
 6 - Type into editor, no save feedback after typing
 7 - Apply patch
 8 - Reload the editor
 9 - Repeat 3-4
10 - New macro is selected
11 - Type into editor, save notification appears

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-03-07 12:42:17 UTC
This works, but it could be a nice addition to set the focus into the text field. At the moment you still have to click before you can typing the macro.
Comment 4 Katrin Fischer 2021-03-07 12:42:56 UTC
Created attachment 117890 [details] [review]
Bug 27890: Select new macro after creation

There was an error here, we were capturing the status of the request (i.e. success)
instead of the returned data.

To test:
 1 - Go to Cataloguing -> Advanced editor
 2 - Click 'Macros'
 3 - 'New macro..'
 4 - Assing a name and click 'Ok'
 5 - New macro is in list on left, but not selected
 6 - Type into editor, no save feedback after typing
 7 - Apply patch
 8 - Reload the editor
 9 - Repeat 3-4
10 - New macro is selected
11 - Type into editor, save notification appears

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2021-03-07 15:57:44 UTC
We have an identical patch on bug 26964 - I've decided to prefer the other :)

*** This bug has been marked as a duplicate of bug 26964 ***