how to set owned by in attribute customization?
![]()
Glenn N (11●1●8)
| asked Apr 04 '16, 2:27 p.m.
edited Apr 04 '16, 3:45 p.m. by Ralph Schoon (62.0k●3●36●43)
How to set owned by value same the person modifying the status of the defect =Resolved?
Currently the example customization need to identify the id of the owner , but i wanted it dependent on who is currenly changing the defect status, no predefined value. Is this possible? I tried this but didnt work
dojo.provide("com.acme.providers.script.OwnedByAutoAssign");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var scriptname = "OwnedByAutoAssign";
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var OwnedByAutoAssign= dojo.declare("org.example.OwnedByAutoAssign", null, {
getValue: function(attributeId, workItem, configuration) {
if (workItem.getValue(WorkItemAttributes.TYPE) === "defect" && workItem.getValue(WorkItemAttributes.STATE) === "3") {
return workItem.getValue(WorkItemAttributes.MODIFIED_BY);
} else {
return workItem.getValue(WorkItemAttributes.OWNER);
}
}
});
})();
|
2 answers
|
![]()
According to previous discussion, you have one way to do it, but only in the Web GUI.
https://jazz.net/forum/questions/133477/work-item-customization-getting-current-user-as-logged-in-user |