How to show default resolution upon workitem submission?
![]()
We are using RTC 502 and have "Defect" workitem states "Draft"<== "Analysis" ==> "Implementation" ==> "Integration" ==> "Validation" ==> "Done".
The process template is enabled to show resolution "Duplicate" / "Reject" / "Fixed" values in the following states "Implementation" ==> "Integration" ==> "Validation" ==> "Done".
Now the customer wants to make it uniform and show "None" in "Draft" and "Analysis" state. Along with that, upon Defect submission, they want to show "None". So that the other person can see the resolution as "None" in "Analysis" and "Draft" by default (not selectable by user).
When I move the defect from "Analysis" ==> "Draft", it is showing "None" without any issue. But when I submit a new defect, the "Resolution" field is always "blank", though I "enabled" to show "Resolution" in all these three actions.
What could be the issue?
|
3 answers
![]()
Finally I found a solution using "dojo"script. Inside "Attribute Customization" under "Calculated Values", I have added the below script. Then this "calculated value" is selected in "Resolution" field of the "Defect" workitem. Now it is working fine.
dojo.provide("com.visteon.workitem.resolutionrestore");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); debug=true; console.log("im here"); (function() { var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes; dojo.declare("com.visteon.workitem.resolutionrestore", null, { getValue: function(attributeId, workItem, configuration) { var workitemstate = workItem.getLabel(WorkItemAttributes.STATE); var Resolution_Val= workItem.getValue(WorkItemAttributes.RESOLUTION); // console.log("worktem state is " + workitemstate); // console.log("worktem Resolution_Val is " + Resolution_Val); var type= workItem.getValue(WorkItemAttributes.TYPE); if(type == "defect") {
if((workitemstate == ""))
{ Resolution_Val = "0"; } return Resolution_Val; } } }); })(); |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.