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!
|
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Apr 19 '12, 2:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
That data is accessible. See: https://jazz.net/wiki/bin/view/Main/AttributeCustomization
Di Tang selected this answer as the correct answer
|
2 other answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Apr 18 '12, 3:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER 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. |
![]() 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. |
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.