Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I am creating a table where others will be inputting information and one of the fields is Status. Now I know Confluence has the Status Macro, but I am looking for something a little more robust that would allow me to limit the choices others have to a list of set stati. This would remove spelling capitolization, and wording errors. I was thinking a drop down user-select field woudl be best, but I'm open to other suggestions.
To build on what Davin said. Create a user macro that uses the enum parameter type (see https://confluence.atlassian.com/display/DOC/Guide+to+User+Macro+Templates#GuidetoUserMacroTemplates-Usingparametersinyourusermacro). The call the status macro within that macro and have it set the variable's value based on the enum value.
Exactly what I would have suggested.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea how this could be changed to allow users to alter a status without actually having to EDIT the page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would a macro that only allows specific choices work? This could be done fairly easy with a user macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hers is soemthing I whipped up that could work. Just edit the enum values and what the color assignment for those values are and you should be good to go.
Macro Body Processing:
Escaped
Template:
## Macro title: My Status
## Macro has a body: N
## Developed by: Me
## Date created: 09/26/2013
## Installed by: Me
## A specific list of status values.
## @param Status:title=Status|type=enum|enumValues=Good,Mediocre,So-so,Bad,What!|default=auto|desc=Pick a status.
#if ( $paramStatus && $paramStatus == "Good")
#set ( $color = "Green" )
#elseif ( $paramStatus && $paramStatus == "Mediocre")
#set ( $color = "Grey" )
#elseif ( $paramStatus && $paramStatus == "So-so")
#set ( $color = "Yellow" )
#elseif ( $paramStatus && $paramStatus == "Bad")
#set ( $color = "Red" )
#elseif ( $paramStatus && $paramStatus == "What!")
#set ( $color = "Blue" )
#end
<ac:macro ac:name="status">
<ac:parameter ac:name="colour">$!color</ac:parameter>
<ac:parameter ac:name="title">$!paramStatus</ac:parameter>
</ac:macro>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow, thank you so much! This is perfect. Would you happen to know how to add the "Use Outline Style" option?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Macro Body Processing:
Escaped
Template:
## Macro title: My Status
## Macro has a body: N
## Developed by: Me
## Date created: 09/26/2013
## Installed by: Me
## A specific list of status values.
## @param Status:title=Status|type=enum|enumValues=Good,Mediocre,So-so,Bad,What!|default=auto|desc=Pick a status.
#if ( $paramStatus && $paramStatus == "Good")
#set ( $color = "Green" )
#elseif ( $paramStatus && $paramStatus == "Mediocre")
#set ( $color = "Grey" )
#elseif ( $paramStatus && $paramStatus == "So-so")
#set ( $color = "Yellow" )
#elseif ( $paramStatus && $paramStatus == "Bad")
#set ( $color = "Red" )
#elseif ( $paramStatus && $paramStatus == "What!")
#set ( $color = "Blue" )
#end
<ac:macro ac:name="status">
<ac:parameter ac:name="colour">$!color</ac:parameter>
<ac:parameter ac:name="title">$!paramStatus</ac:parameter>
<ac:parameter ac:name="subtle">true</ac:parameter>
</ac:macro>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Small edit. The Macro Body Processing should not be Escaped. It should be No macro body. Not sure whay I made that typo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, I figured as much so I changed it. Thanks for looking out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.