It's all about the answers!

Ask a question

how to set owned by in attribute customization?


Glenn N (11113) | asked Apr 04 '16, 2:27 p.m.
edited Apr 04 '16, 3:45 p.m. by Ralph Schoon (63.1k33645)
 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



permanent link
Donald Nong (14.5k414) | answered Apr 04 '16, 9:04 p.m.
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

permanent link
Glenn N (11113) | answered Apr 13 '16, 1:50 p.m.
Any other suggestion how I can do this?

Your answer


Register or 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.