Is there a way to retrieve the macroId when user opens the macro in edit mode?

Luis F December 9, 2020

So I saw this question on how to get the macroId in the execute method of an action, which works fine for viewing a macro.

But when the user clicks to edit the macro, how can I access the macroId? That same question was asked there but never answered.

I'm developing a plugin and I can see that it is stored in the DOM img element as data-macro-id, next to more information of the macro as well as any custom data that the plugin stores in the macro, so it should in theory be possible to get it somehow.

I can access everything else, such as schema version, my custom data, etc, by overriding the opener function through

AJS.MacroBrowser.setMacroJsOverride('my-macro', {
    opener: macroData => {
          // macroData contains the schema version, the macro name as well as my custom data, everything is there EXCEPT for the macroId
    }
});

So is there a way to get the macroId on editing a macro?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events