Work item - required field on transition
-
10. ledna 2012 21:08
Hi,
I want a specific field to become required when work item state = Resolved and Reason = Fixed.
I used:
<FIELD name="Root Cause" refname="Microsoft.VSTS.CMMI.RootCause" type="String"> <WHEN value="Fixed" field="System.Reason"> <REQUIRED /> </WHEN> </FIELD>
However, when i change field state to resolved and reason is by default fixed, the root cause is not changed to required.Only after I change the reason to a different reason and back to fixed, the root cause is set to required.
Does anyone know how to solve this issue?
Thanks,
Všechny reakce
-
10. ledna 2012 23:33
Hi Billy,
Try move/add this rule on State Transition for Resolved state.
Let me know if you need more info
Regards,
Adhi- Navržen jako odpověď Adhithan 10. ledna 2012 23:34
-
11. ledna 2012 6:28
Hi Adhi,
Thanks you for your answer.
If I add the rule to the state transition, the root cause is required for all reasons.
I want it to be required only for state resolved and reason fixed.
It it possible?
thanks,
-
7. února 2012 6:14Moderátor
Billy,
Rules like WHEN clause in Workitem xml is evaluated with logic, the details like below. The rule is applied when user moves focus from that editing field, item 8. Would you check it?
I'm referring to:
- How rules are evaluated: http://msdn.microsoft.com/en-us/library/ms194946.aspx
- WHEN syntax: http://msdn.microsoft.com/en-us/library/ms194966.aspx
- Using the Visual Studio user interface, the user creates a new work item or edits an existing work item.
- Fill in field defaults. For all fields, use any <DEFAULT> rules that are outside <WHEN*> rules.
- Copy field values. For all fields, use any <COPY> rules that are outside <WHEN*> clauses.
- For all fields with a <WHEN> rule that matches, first do <DEFAULT> and then <COPY> rules inside.
- For all fields with a <WHENNOT> rule that matches, first do <DEFAULT> and then <COPY> rules inside.
- For all fields that have had their values changed since step 1 and that contain <WHENCHANGED> rules, first do <DEFAULT> and then <COPY> rules inside.
- Allow the user to start editing.
- The user changes a field value and then moves focus from the field.
- Raise any <WHEN> rules for that field that match the new value.
- Raise any <WHENNOT> rules for that field that match the new value.
- Raise any <WHENCHANGED> rules for that field that match the new value.
- Return editing ability to the user.
- The user saves the changes to the database.
- For all fields, perform <SERVERDEFAULT> operations that are defined for the field either directly or indirectly under a <WHEN> or a <WHENNOT> rule
Forrest Guo | MSDN Community Support | Feedback to us