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

How to get Contributor Name by Javascript

Hi all,
I'm writing a Javascript extension and I need to get the name of the owner of a workitem.
The function workItem.getValue(WorkItemAttributes.OWNER) returns an handle (e.g. _YNh4MOlsEdq4xpiOKg5hvA).
Is there any way to get the attributes (Name, Mail ...) from the Contributor's handle?

Thanks in advance,
Marco
 

0 votes


Accepted answer

Permanent link
I don't know since when, but you can access the name of a contributor in a contributor type attribute.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization in the section

API for Javascript

mentions, workItem.getValue(attributeID) as well as workItem.getLabel(attributeID). The letter returns the contributor name. The first one the UUID.
Ralph Schoon selected this answer as the correct answer

0 votes


2 other answers

Permanent link
As far as I know you can't access the contributor name in Javascript. The API is still very limited for IItems. You get the value. so you can more or less only work with string based attributes. This is mentioned in the WiKi article.

we discussed this several times here already. As an example this thread: https://jazz.net/forum/questions/71806/contributor-name-in-work-item

0 votes

Comments

Ralph,

Don't need to answer me. I found the solution in the link you mentioned.


Permanent link
Ralph,

In this link is mentioned that we can acces the WorkItemAttributes.CREATOR, but this returns "_bgEx0DK8EeSsIskz45a9zw" too.

I am using version 4.0.7. Do you know if in this version is possible to obtain the name of creator (or ID of creator) in JavaScript?

0 votes

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

Question asked: Jul 04 '12, 1:23 p.m.

Question was seen: 5,535 times

Last updated: Sep 11 '14, 1:58 a.m.

Confirmation Cancel Confirm