Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes



3 answers

Permanent link
the resolution is not initialized to None when a workitem is created.  it is only set on the state changes where resolution would be used

0 votes

Comments

  Once it is submitted, it will be in "Analyze" state and the resolution should be visible in this state which is nothing but "None". Why it is not happening?

  Once it is submitted, it will be in "Analyze" state and the resolution should be visible in this state which is nothing but "None". Why it is not happening?

is 'Analyze' in a closed state group? If not, resolution does not apply.

 'Analyze" is in Open state group. But we have option to select "Resolution' in "Initialize" action. And the same can be displayed in "Analysis" state using "Show resolution". Both are selected. 

FYI: when we move the defect from "Analysis" to "Draft" state using "Set Draft" action, we are able to see "None" and upon save and after save we are able to see "None" in "resolution field" Here "Draft" is also configured in "Open" state group.


Permanent link
 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;

}

  }
  
});
})(); 

0 votes


Permanent link
 Even in this case, customer or engineer who ever submit the defect they are not able to see the resolution. Only after closing the defect window and reopen the window, they are able to see the resolution. This is not acceptable by the customer.

0 votes

Comments

You can claim "not acceptable" for whatever reason. But what is the requirement? Does the customer want to submit a defect with a closed/resolved state straightaway? If true, that is quite bizarre.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,128

Question asked: Mar 07 '16, 5:50 a.m.

Question was seen: 2,629 times

Last updated: Apr 25 '16, 9:33 p.m.

Confirmation Cancel Confirm