Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to implement dynamic macro parameters (enumerations) in Confluence plugins

Deleted user February 22, 2012

I did just read the slides at http://www.slideshare.net/GoAtlassian/atlascamp-2010-making-confluence-macros-easy-for-the-user-dave-taylor

page 48 shows an example how to set static enum parameters

<parameter name="someenumeration" type="enum" required="true">
  <value name="one"/>
  <value name="two"/>
  <value name="three"/>
</parameter>

I would like to fill the values with dynamic values (eg. a list of jira projects which is retrieved via applink). Is that possible somehow?

Thanks in advance,

Lars

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Kevin O_Neal July 4, 2016

Here is how I solved the problem.

https://github.com/Scuilion/confluence-stash-macro/blob/master/stash-macro/src/main/resources/js/stash-macro.js

The trick is to just use jQuery. Don't think of this as a Confluence macro creation problem. You can do pretty much anything you want, create or delete elements, create hidden parameters with  beforeParamsRetrieved, etc. 

1 vote
Marc Brazeau July 20, 2014

Bump. I've been struggling (lots) with AJS, configuration files and feeling pretty overwhelmed for what seems like a simple request. Any success from any of the posters here?

J D
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 Leaders.
November 20, 2014

Hey @Marc Brazeau , Did you find the Solution, i have the same problem: https://answers.atlassian.com/questions/10416526/answers/10416959 regards

Marc Brazeau November 21, 2014

Nope. Ended up doing something else instead (not even using a macro or plugin), completely outside of Confluence.

1 vote
Hatem Ounis August 7, 2013

I have the same question too, any answer to this so far ?

J D
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 Leaders.
November 20, 2014

Hi @Hatem Ounis , Did you find the Solution, i have the same problem: https://answers.atlassian.com/questions/10416526/answers/10416959 regards

0 votes
J D
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 Leaders.
November 20, 2014

Hi @Lars Kleen , Did you find the Solution, i have the same problem: https://answers.atlassian.com/questions/10416526/answers/10416959 regards

0 votes
Roger Weinheimer
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 Leaders.
September 17, 2012

We have a similar question. We have a macro which reads a configuration file when it is rendered. If we add a new configuration to the configuration file, we would like the configuration to appear as a parameter choice in the macro properties panel.

Are macro parameters persisted anywhere else besides atlassian-plugin.xml? Or when is atlassian-plugin.xml read? Are there events associated with atlassian-plugin.xml that one can handle in code?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events