Bug 26964 - Advanced editor no longer selects newly created macros
Summary: Advanced editor no longer selects newly created macros
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low normal
Assignee: Phil Ringnalda
QA Contact: Testopia
URL:
Keywords: regression
: 27890 (view as bug list)
Depends on: 17268
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-07 18:56 UTC by Kelly McElligott
Modified: 2021-12-13 21:09 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch fixes the behaviour for saving of new macros using the advanced editor. Before this fix the newly created macro wasn't selected and the automatic save (there isn't a save option) had nothing to save.
Version(s) released in:
21.05.00,20.11.04,20.05.10
Circulation function:


Attachments
Bug 26964: Newly created macros should be selected in the Advanced editor (1.93 KB, patch)
2021-02-26 21:54 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 26964: Newly created macros should be selected in the Advanced editor (1.99 KB, patch)
2021-02-26 22:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 26964: Newly created macros should be selected in the Advanced editor (2.05 KB, patch)
2021-03-07 15:59 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2020-11-07 18:56:21 UTC
In 20.05.05, the ability to save a new macro is not visible.  One needs to create the name of the macro, it will appear on the left, then click that new macro name, and then the options to save and to create the macro public.  Seems to need the page refreshed during this process in some way.
Comment 1 Phil Ringnalda 2021-02-26 21:54:53 UTC
Created attachment 117404 [details] [review]
Bug 26964: Newly created macros should be selected in the Advanced editor

The problem is that the newly created macro isn't selected, because the
return values from the call to create it are accidentally thrown away. There
isn't actually any option to save, just a timeout that automatically saves,
but you can tell you are in this broken state because the Delete macro
button is disabled.

Test plan:

1. Prior to applying the patch, Administration - set the preference
   EnableAdvancedCatalogingEditor to Enable
2. Cataloging - Advanced editor - Macros... - New macro...
3. Give it a name, click OK, notice that the Delete macro button is disabled
4. Apply patch, shift+reload
5. Macros... - New macro...
6. Give it a name, click OK, notice that the Delete macro button is enabled
7. Type something in the editor, delete 999 will do nicely, wait half a
   second to see Saved appear at the far right, close the macro popup
8. Macros..., click the name of your macro, verify it really was saved
Comment 2 Andrew Fuerste-Henry 2021-02-26 22:38:50 UTC
Created attachment 117405 [details] [review]
Bug 26964: Newly created macros should be selected in the Advanced editor

The problem is that the newly created macro isn't selected, because the
return values from the call to create it are accidentally thrown away. There
isn't actually any option to save, just a timeout that automatically saves,
but you can tell you are in this broken state because the Delete macro
button is disabled.

Test plan:

1. Prior to applying the patch, Administration - set the preference
   EnableAdvancedCatalogingEditor to Enable
2. Cataloging - Advanced editor - Macros... - New macro...
3. Give it a name, click OK, notice that the Delete macro button is disabled
4. Apply patch, shift+reload
5. Macros... - New macro...
6. Give it a name, click OK, notice that the Delete macro button is enabled
7. Type something in the editor, delete 999 will do nicely, wait half a
   second to see Saved appear at the far right, close the macro popup
8. Macros..., click the name of your macro, verify it really was saved

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 David Nind 2021-03-03 09:16:11 UTC
Changed status to signed off - looks like Andrew signed off on 26 February 2021. Please change back if that is not the case.
Comment 4 Andrew Fuerste-Henry 2021-03-03 14:09:32 UTC
Oh, yes, thanks! I must have missed the status.
Comment 5 Katrin Fischer 2021-03-07 15:55:55 UTC
This looks like a duplicate to bug 27890 and implements the same solution afaikt?
Comment 6 Katrin Fischer 2021-03-07 15:57:44 UTC
*** Bug 27890 has been marked as a duplicate of this bug. ***
Comment 7 Katrin Fischer 2021-03-07 15:59:54 UTC
Created attachment 117891 [details] [review]
Bug 26964: Newly created macros should be selected in the Advanced editor

The problem is that the newly created macro isn't selected, because the
return values from the call to create it are accidentally thrown away. There
isn't actually any option to save, just a timeout that automatically saves,
but you can tell you are in this broken state because the Delete macro
button is disabled.

Test plan:

1. Prior to applying the patch, Administration - set the preference
   EnableAdvancedCatalogingEditor to Enable
2. Cataloging - Advanced editor - Macros... - New macro...
3. Give it a name, click OK, notice that the Delete macro button is disabled
4. Apply patch, shift+reload
5. Macros... - New macro...
6. Give it a name, click OK, notice that the Delete macro button is enabled
7. Type something in the editor, delete 999 will do nicely, wait half a
   second to see Saved appear at the far right, close the macro popup
8. Macros..., click the name of your macro, verify it really was saved

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Jonathan Druart 2021-03-08 14:17:31 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 9 Fridolin Somers 2021-03-12 08:07:35 UTC
Pushed to 20.11.x for 20.11.04
Comment 10 Andrew Fuerste-Henry 2021-03-14 20:02:17 UTC
Pushed to 20.05.x for 20.05.10
Comment 11 Victor Grousset/tuxayo 2021-03-23 06:28:58 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.