How can I get the user name of a contributor using JavaScript?
Ashwath G (66●3●39●51)
| asked Jul 30 '15, 6:50 a.m.
edited Jul 30 '15, 7:05 a.m. by Ralph Schoon (63.5k●3●36●46)
Hello,
I am trying to read the owned by attribute using the script to increase the Re Assignment counter when ever a change on the owned by )Assigned by) value is changed. But the function returns me the internal_id of the user_id in the attribute where iam capturing the owned by attribute o/p. If i would like to convert this internal_id to a string , what is the function to be used ? Kindly help me out to resolve this issue. **********************************************Code Sample******************************* dojo.provide("com.ibm.team.workitem.hiddenassignee"); dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); (function() { var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes; dojo.declare("com.ibm.team.workitem.hiddenassignee", null, { getValue: function(attributeId, workItem, configuration) { var hiddenassignee = workItem.getValue(WorkItemAttributes.OWNER); console.log("hiddenassignee: assignee is "+hiddenassignee); return hiddenassignee ; } }); })(); Thank You..! Ashwath |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Jul 30 '15, 7:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jan 05 '16, 4:37 a.m.
Yes, for complex objects
Carefully read https://jazz.net/wiki/bin/view/Main/AttributeCustomization and Lab 5 Ralph Schoon selected this answer as the correct answer
|
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.