The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Macro Browser Parameters/Options

Sean King
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 22, 2012

I'm wanting to create a user macro that changes the parameters displayed in the macro browser based on the first few values chosen. For example, the first parameter might be a boolean asking if the user has an image, if they select true, then an input box will show up in the macro browser for them to put the url in. If they don't select true then the box is hidden.

Is this possible? If so how?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 9, 2013

Yes, it should be possible.

You can get access to any of the fields in the macro browser dialog with this little snippet:

AJS.MacroBrowser.getMacroJsOverride("macrno-name").fields.string = {
  "field-name": function(param) { //do stuff }};

You could then possible bind an on change event to the field to take action against the second field.

https://developer.atlassian.com/display/CONFDEV/Including+Information+in+your+Macro+for+the+Macro+Browser

Sean King
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 26, 2013

The documentation you linked to was for creating plugins. Does this work on User Macros too? I'm wanting it for a User Macro.