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

Displaying work item resolution on closed work items

I've changed the defect workflow state of "resolved" into two states:
"resolved" with a resolution of "fixed" or "duplicate"
     and
"returned" with a resolution of "more information" or "not recreateable"

and I've also added a "closed" state.

In the case of "returned" and "not recreateable", the originator of the work item would "accept answer", and the work item would transfer to "closed" state.

I would like to keep the "resolution" on the closed work item. But when "accept answer" action is selected, the resolutions disappears.

I can get it to work, by checking "show resolution" on the "Closed" state. However, it does allow the user to edit the "resolution" and possibly change the value when the "accept answer" action is selected. Is there some why which the resolution can be displayed and not allow the user to change the value?

I've tried to see if I could make the value "resolution" as read only, on certain states. But it seem that resolution is a special variable, and does not allow setting.

From what I can tell of the behavior, it seems the resolution attribute is assumed to be transient data associated with a certain state, and not persistent data associated with the work item.

0 votes

Comments


I am having the same problem.

What I am doing now is to create a Resolution custom field, and make it only show up at Resolved and Closed states.

I wonder if anyone has a better solution.




2 answers

Permanent link
with the out of the box solutions, if you have multiple resolutions for a state, you cannot prevent it being changed.

you could write a participant that forces it to stay as previously selected, altho that might be weird for the user, who set it to another value, and it didn't stay set that way.

or you can trigger an error in an advisor, that says, sorry, you can't change the value on this action.

1 vote


Permanent link
 Hi All,
I also have same scenario but for custom work item,
I have two sates for work item,
"Resolved" and "Pending Validation"
For resolved work item there are 5 resolutions, one of them is "Feature Implemented", when work item traverse from Resolved state to Pending Validation state, resolution of Pending Validation state should be "Feature Implemented".
Pending validation state has 3 resolutions, which allows user to select any of them and save work item.
To achieve this I also searched to make resolution of work item read only, but I also faced same problems as Frank faced.
Therefore to achieve this requirement, I came up with 2 solutions as below

Solution 1: 
In the process configuration tab of project area-->Project configuration-->Configuration Data-->Work items-->Workflow,
I can set only one resolution for Pending Validation state i.e. Feature Implemented.
ndin
Solution 2:
I can customize attribute for 
Script based validator, which shall save work item when resolution of Pending Validation state is "Feature Implemented".
This way when work item traverse from Resolved state to Pending Validation state, default resolution for Pending Validation states shall be "Feature Implemented", and work item shall not be saved if resolution for Pending Validation state is changed to other than "Feature Implemented".

Here is script for validator, which restrict resolution of work item to be duplicate when in resolve state. This script is for defect work item.


dojo.provide("org.example.RestrictResolutionState");

dojo.require("com.ibm.team.workitem.api.common.Severity");
dojo.require("com.ibm.team.workitem.api.common.Status");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {
var Severity= com.ibm.team.workitem.api.common.Severity;
var Status= com.ibm.team.workitem.api.common.Status;
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

var RestrictResolutionState= dojo.declare("org.example.RestrictResolutionState", null, 

{
   validate: function(attributeId, workItem, configuration) 

{
if (workItem.getValue(WorkItemAttributes.TYPE) === "defect" && workItem.getValue(WorkItemAttributes.STATE) === "3") 
{
  
if (workItem.getValue(WorkItemAttributes.RESOLUTION) === "2") 
{
return Status.OK_STATUS;
else 
{

var severity= configuration.getChild("parameters").getStringDefault("severity", Severity.ERROR.name);

var message= configuration.getChild("parameters").getStringDefault("message", "");

return new Status(Severity[severity], message);
               
}
} else {
return Status.OK_STATUS;
}
}
});
})();


Note : <parameters message="Resolution of WI should be Duplicate." severity="ERROR"/>, Add this line above closing tag of validator, in process configuration source tab.

Please tell me if this is valid answer, or if anyone having better solution.

0 votes

Comments

Thank you for sharing the solution. But only you can decide whether the other solutions are "better". If the current solution works for you, that's good enough.

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
× 12,019

Question asked: Mar 22 '13, 3:49 p.m.

Question was seen: 3,914 times

Last updated: Jan 17 '16, 7:13 p.m.

Confirmation Cancel Confirm