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

Contributor Name in Work Item

Hi,

I'm trying to get the contributor name in my script WorkItem. I need the contributor name to customize another field in my WI with Contributor name and other informations.

I have tried to get this information as the rest of types but it is not working:

var contributorAttribute = parameters.getString("contributorAttribute");
var name= workItem.getValue(contributorAttribute);

Can anyone help me?

Kind regards,
Elisa.

0 votes



5 answers

Permanent link
Hi Elisa,

please look at https://jazz.net/library/article/537/
and follow the links to https://jazz.net/wiki/bin/view/Main/AttributeCustomization . The latter describes, roughly, what can and can not be done with scripts. My experience is that, at least with 3.0.1.1, the only information I get out of a contributor is the ID. I don't know a way to get to the name. Maybe others do.

There are other value providers and conditions that allow to solve some of the implications of this fact. The default vale provider for example allows to set an attribute to the creator of a work item.

0 votes


Permanent link
Hi,

Could be possible to have the name from the ID Contributor?

Regards,
Elisa.

0 votes


Permanent link
I do not know a way to do that, otherwise I would have mentioned it. I don't think the script API currently provides that.

0 votes


Permanent link
Hi,

Thanks for your answer.

I'm trying to look for an dojo library that allow me that (have access to the Contributor Class functions) but I can not find. Has anybody done that before?

Regards,
Elisa.

0 votes


Permanent link
Hi,

Because this solution is not possible I have thought in other but I'm not sure I can do that.

Use an enumeration with all users instead of Contributor.
Problems:
- In the script when I want to have the name of the user I have an enumeration like UserName.literal.l4, I have read in the version 3.5 we could have available the function getLabel but now how could we have the label instead the literal?
- I have lose the link connection to the RTC user. Could I create that?

Thanks.

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: Feb 14 '12, 4:42 a.m.

Question was seen: 5,502 times

Last updated: Feb 14 '12, 4:42 a.m.

Confirmation Cancel Confirm