16. July 2010 13:42
The bug work item has 3 (Agile: Active, Resolved, Closed) or 4 states (CMMI: Proposed, Active, Resolved, Closed). Those states are used also in the reporting. When you use additional states you will see that the colors are not in the trend that the default states have. Also the order of the states might not be in the correct order. The last requirement I have in this case (because this bug work item has 10+ states) is to aggregate some states into categories to see less states.
This post shows you have you can achieve these requirements.
In order to support the new states in the report, you have to change the rdl.
- Go to http://msdn.microsoft.com/en-us/library/ff730838.aspx to find out how you can start up a new Visual Studio project to modify the report
- Now download the Bug Status (you can find the instructions how to do that in Reflect the rename of a state for the Bug Work Item)
- And add the Bug Status report to the project
- Open the report by double clicking it. You will see something similar like this
- First we are going to solve the coloring
- Now right click on the orange / blue area to open the context menu for the data series
- Choose for the Series Properties
- And go to the Fill section
- Now click on the fx button to open the expression for the color
- You see the list of states and its colors. The color is specified as (Transparancy, Red, Blue, Green). The transparancy of 80 means (because it is a Hex value) 50%. Play around with colors to get the result you want.
- Now we also need to change the sorting of the states
- To do that click on the data series again and scroll completely to the right
- You see that there is a window shown with the Chart Data.
- Click on the triangle in the Series Groups
- And choose the “Series Group Properties…”
- Go to the Sorting section
- Click on the fx button to change the sort by expression
- Again you can modify this expression to get the correct sorting. The !1, !2 and !3 are just textual values to ensure that they are alphabetically sorted before Active, Assigned and so on.
The third modification you might want to make is to aggregate a few states. If you want to do that, you should change the value for the Series Groups from System_State to an expression.