How to save labels dynamically via page properties or Labels macro?

I'm using product requirements blueprint and I need that during creation new requirement an addition label will be saved together with by default label "requirements".

The additional label should be like "xx123-requirements" where thexx123 is projectCode for example.

I need it because I want to list the requirements using Product requirements index blueprint and by filtering them with the project based label on appropriate project page.

Perfect would be use a variable like $projectCode in the page template were the "Create new requirement" macro will be placed so that the label will be concatenated by the variable $projectCode and static string "requirements".

How to do it?

P.S. Maybe there is another solution how to filter or limit the requirements list in case I put it into every project page template?

Using Confluence 5.7.

1 answer

1 accepted


Maybe another solution will be suitable for you. I don't know the whole case, but you can try to use Page Properties macro + Page Properties Report macro. Page Properties Report allows you to build the report table (you need to use labels to identify what pages should be included into the report, this can be one label like "requirements" for all requirements pages). Then your report table can be easily filtered with Table Filter and Charts add-on.

As a result, you'll get something like this:

image2016-8-5 16:18:35.png 

Is it not possible to define a variable within the page that then sets the value for the macro on the page? Trying to create global templates with Macros seems impossible without this.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

264 views 11 10
Join discussion

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