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

How could I get current user's role in script?

I use RTC in 3.0.1.3 and I using scripts for attribute customization in work item to set some attribute default value. But I have no idea how to get current user's role in script. Is there any way to get current user's role in script, I really need to set one attribute default value depends on it. Can you provide some API and some example please? Thank you very much!

0 votes


Accepted answer

Permanent link
That data is accessible. See: https://jazz.net/wiki/bin/view/Main/AttributeCustomization
Di Tang selected this answer as the correct answer

0 votes


2 other answers

Permanent link
I use RTC in 3.0.1.3 and I using scripts for attribute customization in work item to set some attribute default value. But I have no idea how to get current user's role in script. Is there any way to get current user's role in script, I really need to set one attribute default value depends on it. Can you provide some API and some example please? Thank you very much!


Hi,

the Wiki page states that there is only limited access to IItem objects. As far as I know the Contributor objects are not really exposed in scripts. So far I have not been able to access more than the ID that is returned as the string. I can't access the name or any other information. My current assumption for scripts is, if you have to do more than the most basic operations, use preconditions or follow up actions instead.

0 votes


Permanent link
I use RTC in 3.0.1.3 and I using scripts for attribute customization in work item to set some attribute default value. But I have no idea how to get current user's role in script. Is there any way to get current user's role in script, I really need to set one attribute default value depends on it. Can you provide some API and some example please? Thank you very much!


Hi,

the Wiki page states that there is only limited access to IItem objects. As far as I know the Contributor objects are not really exposed in scripts. So far I have not been able to access more than the ID that is returned as the string. I can't access the name or any other information. My current assumption for scripts is, if you have to do more than the most basic operations, use preconditions or follow up actions instead.

thank for your reply, I will try preconditions later.

But I still feel interested in how to get more information than workitem attribute info, such as the number of the story. I think function like this will be very useful.

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
× 10,937

Question asked: Apr 17 '12, 11:39 p.m.

Question was seen: 5,301 times

Last updated: Apr 17 '12, 11:39 p.m.

Confirmation Cancel Confirm