Hi all, I'd like to add a dropdown that will allow users to select from a list of predefined status types. I do not have access to create user macros so I was wondering if there's a way to use the HTML macro and add some JavaScript (maybe leverage Ajax) to define the various status types and colors and then pass that to the status macro to display.
I did find a solution to do this using a user macro but since I have no access to that, I was wondering if anyone can give me the JS alternative that I can add to an HTML include.
I've added the user macro code below.
Thank you all very much for the help:
## @param Status:title=Status|type=enum|required=true|enumValues=NOT STARTED,IN PROGRESS,PASS,FAIL,BLOCKED|desc=Test Case Status. #if ( $paramStatus == "NOT STARTED" ) #set ( $color = "Grey" ) #elseif ( $paramStatus == "IN PROGRESS" ) #set ( $color = "Yellow" ) #elseif ( $paramStatus == "PASS" ) #set ( $color = "Green" ) #elseif ( $paramStatus == "FAIL" ) #set ( $color = "Red" ) #elseif ( $paramStatus == "BLOCKED" ) #set ( $color = "Red" ) #else #set ( $color = "Grey" ) #end <ac:macro ac:name="status"> <ac:parameter ac:name="colour">$color</ac:parameter> <ac:parameter ac:name="title">$paramStatus</ac:parameter> </ac:macro>
Hi @Nicky ,
I can suggest using one of our apps - Handy Macros for Confluence.
The add-on provides the Handy Status macro that fully accomplishes your case: you create pre-defined sets of statuses and switch them in the page view mode.
Besides you'll be able to use Handy Dates - clever datepickers that allow you to change dates also on the fly without going to the page edit mode.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.