use blueprint variables in Usermacro

Gera March 21, 2024

Does anyone have some experience if and when yes how to use the blueprint variables in an user macro.

In my case, I have the blueprint decision here.

This blueprint has a variable called Status.
Here is my macro code:

## @Param Priority:title=Priority|type=enum|enumValues=nicht gestartet,in arbeit,Entschieden

#set($priorityvalues = {"nicht gestartet" : "Red", "in arbeit" : "Yellow", "Entschieden" : "Green"})
#set($priorityoutline = {"nicht gestartet" : "false", "in arbeit" : "false", "Entschieden" : "false"})

#set($priorityColor = $priorityvalues.get($paramPriority))
#set($prioritySubtle = $priorityoutline.get($paramPriority))

<ac:structured-macro ac:name="status" ac:schema-version="1">
<ac:parameter ac:name="colour">$!priorityColor</ac:parameter>
<ac:parameter ac:name="title">$!paramPriority</ac:parameter>
<ac:parameter ac:name="subtle">$!prioritySubtle</ac:parameter>
</ac:structured-macro>

 

I would like to use this macro in the blueprint decision.

The user macro should take the set blueprint variable status (lets say "in arbeit") and use it in the macro code instead of the macro variable paramPriority. 

thanks

1 answer

0 votes
Laurie Sciutti
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2024

Hi @Gerald König and welcome to the Community!  Are you using an add-on that utilizes "blueprint" templates (i.e. brikit-blueprint-maker ) or are you just referring to "blueprint" as a template using OOB functionality?

Gera April 4, 2024

Hi @Laurie Sciutti , thx )
no just using the oob functionality.

 

I hope my explanation was clear:

Confluence has a Blueprint named decission. In this Blueprint i can find a variable called "$status".

When i am creating a new blueprint decision, i can add a status from a dropdown in a form. For example "in Progress". Can i use this blueprint variable $status "in progress" then in an usermacro!?

 

Crazy thoughts, but thanks because everything else works fine in this blueprint.

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events