Passing a space key parameter to an existing macro

Ok, I have a series of templates, each has a "Create New Page From Template" macro in it.

One of the parameters in this macro is the "Space Key" which is the key to the space that the new page shoudl be created in.

As this could be triggered in several spaces I want to be able to have a $spaceKey or @spaceKey or something that can be passed through when the new page gets ceated.

How do I do this?

I have tried a range of options and can't seem to find the answer. It either errors with "unknown space" or it tries to create the new page in the oringial space but under the parent page (from the new space).

Any pointers or sample code would be appricated.

1 answer

0 vote
Gary Sackett Atlassian Team May 07, 2013

Hi Robin,

The issues is that you can variables in templates, but they arent supported within macros. We have a current feature request for this:

https://jira.atlassian.com/browse/CONF-29162?jql=text%20~%20%22templates%20macros%22

Unfortunately, there doesnt look like a good way to workaround this according to the docs:

https://confluence.atlassian.com/display/DOC/Creating+a+Page+using+a+Template

I would reccomend you add some feedback to the feature request, and vote for it. Sorry I dont any solid answers for you.

Cheers,

Gary

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

34 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you