Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In our last post in this series, Gregg blogged about securing a work item type. Another question along these lines: “How can I save the resolved reason? I want to create metrics based on how bugs were resolved, but the value of the ‘Reason’ field is changed when the bug is closed”
Here’s the solution:
1. Add “Microsoft.VSTS.Common.ResolvedReason” field to the form definition
2. Add the following rules to the workflow transition from “Active” to “Resolved”
<Transition from="Active" to="Resolved">
<REASONS>
<REASON value="Fixed">
<FIELDS>
<FIELD refname="Microsoft.VSTS.Common.ResolvedReason">
<COPY from="value" value="Fixed" />
</FIELD>
</FIELDS>
</REASON>
<REASON value="Deferred">
<FIELDS>
<FIELD refname="Microsoft.VSTS.Common.ResolvedReason">
<COPY from="value" value="Deferred" />
</FIELD>
</FIELDS>
</REASON>
...
</Transition>
Here’s the end result; I am displaying the field in the Details tab of the Bug form:
This workaround works by copying the resolved reason when the bug is resolved off into the Resolved Reason field.
Sunder Raman
Program Manager, Team Foundation Server
[Cross-posted from https://blogs.msdn.com/sunder/]
Comments
- Anonymous
April 03, 2009
The Teams WIT Tools Blog on Work Item Rules Workarounds: Secure creation of a work item type and Work