Work Item Rules Workarounds: Force selection of Reason

In our last post in this series, Sunder blogged about Closing down an iteration. Let’s take a look at another question: “How do I force people to select a reason?

We’ve had people come to us with the request to force their users to select a reason. The way State/Reason is implemented, there is always a default Reason. Therefore, its very easy for a user to just change the state, and accept the default Reason without thinking. Our customers wanted people to have to make a choice.

image

In the above example, the customer wants the Reason field to be blank by default.

Here is the workaround. The steps are:

1. Create a ResolvedReasonValidation field

2. Create a Form tab called “Validation Errors” and place ResolvedReasonValidation on it

3. Add a default Reason: “Select a reason” and a COPY rule on Resolved state

image

4. On each non-default reason, add a COPY rule

image

 

5. Add Rules on ResolvedReasonValidation

image

 

Put it all together, and this is what it looks like:

image