January 2, 2014
12 Tips of TestTrack: Using Triggers to Make a Field Required
TestTrack allows you to set fields as required, which applies throughout the entire lifecycle of an item. Sometimes, however, you may want to set a field as required based on the workflow state or another field. You can use triggers to ensure a field has a value before it reaches a state, or to ensure a field has a value based on another field. In both instances, the mechanics are the same, and this applies to all development, test, and requirement artifacts tracked by TestTrack. There are three main components to using triggers to make a field required based on state or another field value:
- Filter: The filter returns the situation you want to prevent. The filter could just check to see if a field is empty or <not set>. It could also see if another field is set or has a value.
- Action to Trigger On: When do you want to enforce this? Is it before the item reaches a state? Is it any time the item is saved?
- Action: For this example, I’m using the prevent action. I can also create a message that is displayed to the user to let them know that the field needs to be completed.