I would like to create a custom drop down list that provides users with a particualr status of a work request. We have several pre-defined statuses that a work request will go through from inception until completion.
The status macro isn't very helpful since you have to edit, select a color and add text. so, my thought is to use a table field where I could insert a cool drop down list with button type indicators with preset text. Example: when a work request has been submitted by a customer, the status is, EDS1. When it goes into tech review, it is changed to REVW. wen it goes into construction, it goes into WORK.
So I'd like to be able to change the status, or have a user change the status when necessary. And to add some flash, I'd like to each one have a color coded button of sorts.
Any ideas? I thought the use of buttons would make things easy since there are so many button generators out there.
Community moderators have prevented the ability to post new answers.
You could create a user macro that has a parameter with a predefined set of values that would then populate a status macro's text and color depending upon which value is selected in the user macro parameter.
As a very new and very green user, is there an easy to follow path to doing this? I've seen a lot of html samples, so my guess is to modify those and then implement them into the macro?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is an example of a user macro. These must be created by a system admin.
Macro Name:
work-request-status
Macro Title:
Work Request Status
Macro Body Processing:
No macro body
Template:
## Developed by: Davin Studer
## Date created: 03/19/2014
## @param Status:title=Status|type=enum|required=true|enumValues=EDS1,REVW,WORK|desc=Choose a status.
#if ( $paramStatus == "EDS1" )
#set ( $color = "Yellow" )
#elseif ( $paramStatus == "REVW" )
#set ( $color = "Blue" )
#elseif ( $paramStatus == "WORK" )
#set ( $color = "Green" )
#else
#set ( $color = "Yellow" )
#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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, for each status type, I can continue to add colors. Could I use a CSS class instead of the color?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This example uses the built in status maco ... which only has five colors. If you need more than that you would need to build out your own status indicator with html. You could use css. In the user macro if you replace the macro xml with html and add in a <style> block you could make it look the way you want. I just figured I would show it to you with the status macro as it is built into the system and would thus follow the system's UI guidlines. User macro's are super handy. They give you the ability to do some somewhat powerful things without having to drop down to programming a full on plugin in Java.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks David! This was exactly what I was looking for but I couldnt get it to work at first. All that was wrong though was that it needed a space in the beginning of the macro when defining the parameter. Probably just a formatting error when doing a copy paste to the editor
## @param Status:title=Status
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The suggested approach does indeed work, but you still have to first edit the page and then edit the status macro to change status. As far as I am concerned, this is no real "drop down status list".
Is it possible to achieve a proper drop down status list without having to buy add-ons? I'm on a customers system, and can't go installing add-ons as it suits me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd go with an Marketplace Add-on solution. You could either use the Comala Workflows Add-on for review processes of pages or simple use the Metadata for Confluence Add-on to add custom (e.g. dropdown) fields to pages.
Of cause you can get a filtered list of all pages with xyz-status with both tools.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Handy Status macro (Handy Macros add-on) does exactly what you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a very new and very green user, is there an easy to follow path to doing this? I've seen a lot of html samples, so my guess is to modify those and then implement them into the macro?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just came across this post and this is what I did... version 5.8.10.
Log into Confluence as an Admin.
Click on the gear at the top and click on Geneeral Configuration.
In the left menu box, click on User Macros -> Create a New User Macro.
Macro Name: work-request-status Visibility: Visible to all users in the Macro Browser Macro Title: Test Case Status Description: Test Case Status for reporting. Categories: Confluence Content Macro Body Processing: Unrendered Template: ## Developed by: Me ## Date created: 2016-04-07 ## @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>
Then save. After saving, you can go create a new page and insert macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've used this in the past and it's worked, but I'm on a new instance and getting this error: "Error occurred rendering template content"
Any thoughts on how to resolve the error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you used the above code as-is from "d h" then that is why. When Atlassian migrated their content off the old Answers site to this new site almost all of the code snippets got borked. You need to replace < with < and > with >.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've fixed the above code to remove the escaped xml characters.
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.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.