Configuring dynamic required attributes
You can configure a condition customization to require users to provide a value for an attribute when another attribute contains a specific value.
Before you begin
About this task
The Finished condition uses the following script:
dojo.provide("org.example.workitems.providers.FinishedCondition");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("org.example.workitems.providers.FinishedCondition", null, {
matches: function(workItem, configuration) {
var state= workItem.getValue(WorkItemAttributes.STATE);
console.log(typeof(state))
return (state === "3" || state === "4"); // Resolved or Verified state
}
});
})();
For details about writing scripts, see https://jazz.net/wiki/bin/view/Main/AttributeCustomization.