Assign User in an attribute based on Team Area
![](http://jazz.net/_images/myphoto/a3584494ad724515957b8249bd6cafaf.jpg)
One answer
![](http://jazz.net/_images/myphoto/a3584494ad724515957b8249bd6cafaf.jpg)
As far as I can tell, the only ways to do this are:
- A Java Based default Value Provider. Example code can be found here: https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ ; Note there is code for finding specific roles at the end of that post and you should be able to reuse most of it
- A Work Item Save Participant, that sets the value after the save in a second save
Using JavaScript won't work, as there is no way to iterate the team structure in it. The only way would be a static mapping with the contributor UUID's coded into the calculated value provider.
Comments
![](http://jazz.net/_images/myphoto/a3584494ad724515957b8249bd6cafaf.jpg)
i tried doing something like this but the problem is it returns a list with an 'unassigned' value.. is there a way to remove the 'unassigned value'? Thanks by the way for the reply.
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
What is "Like this"? Why would a calculated value provider return a list?
If you create a Java calculated value provider, you are in control what the return value is. The post provides you with code that can get the user with the role you want.