It's all about the answers!

Ask a question

Set a default user from a 'Role Based User List' value set instead of Unassigned

Don Yang (7.7k21108137) | asked Jul 23 '20, 6:32 a.m.
RTC 6.0.6 used

There is a contributor type of custom attribute using 'Role Based User List' value set. When creating a work item, the default value of this custom attribute will be Unassigned. The requirement is to set any user from the value set list instead of Unassigned. Is there any way to achieve that using Java or Javascript?


Accepted answer

permanent link
Ralph Schoon (62.7k33643) | answered Jul 23 '20, 10:41 a.m.
A role based user list is a value set and not a default value provider. If you want to set a default (or calculated) value you must create a default (or calculated) value provider that returns the user ID. You can not access the value set as far as I can tell. Java or Java Script does not really matter.

You could create a custom value set in Java and use the same code in a Java default value provider, i don't think you can access the existing one.
Don Yang selected this answer as the correct answer

Don Yang commented Jul 29 '20, 8:44 p.m.

Thanks Ralph for the info.

Your answer

Register or to post your answer.