It's all about the answers!

Ask a question

How to get the list of Roles for particular Team area and then the list of users with a particular role using java script in RTC


0
1
Olga M (827) | asked Aug 16 '15, 7:16 a.m.
edited Aug 16 '15, 7:24 a.m.
How  can  I get  the  list of Roles  for particular Team area and  then the  list  of users with a particular role  using java script  in  RTC.
I  found that  it  is  impossible  in  RTC  4.0  ,  I  am working  with  RTC 5.0.2 is it  possible there  ? 
Thank in advance

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Aug 16 '15, 10:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, it is not possible to access that data with JavaScript in an attribute customization.
You can only do this in Java based providers. See https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/
Ralph Schoon selected this answer as the correct answer

2 other answers



permanent link
Olga M (827) | answered Aug 18 '15, 3:56 a.m.
Thanks  a  lot , Ralph!

permanent link
Olga M (827) | answered Sep 03 '15, 8:45 a.m.
Hello  Ralph . 
I  have  some another  issue  . 
I  should to  calculate  the  Owner field .
I  have developed  the  calculated  value  that  returns Creator  as  icontributor .
I  can  see my Calculated Value on  field  definition  on  drop  down of  Calculate value  for  attributes that have  been  defined as  contributors . 
I   define  the  dependency from  Filed Against  attribute . 
When  I  set my Calculated  value  to  custom contributor attribute  it  gets  the name  of  creator  by  the  moment  the   Filed Against  attribute has  been  changed ,  but after  the  save process  the  value  of  the custom  contributor  attribute  becomes to  be  Unidentified . 
If  I set my Calculated  value  to Owned By  attribute  with the same dependency  it  also  gets  the right  value  before  saving  , but  on  save  process  I  get  the next error :  "Error running operation 'Saving Work Item'

java.lang.NullPointerException
java.lang.NullPointerException"

Please  advice .


Comments
Ralph Schoon commented Sep 03 '15, 8:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The support for all kinds of complex items such as

  • Contributor
  • TeamArea
  • ProjectArea

and may others is very limited - what is supported is stated in https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript.

The only way to set these types of attributes is to return the UUID.


Next time if you have an additional question, create a new question.

Your answer


Register or 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.