Work Item customizations using scripts in RTC 4.0.6
![]()
Aparna Sukumaran (33●37●60)
| asked Oct 06 '14, 2:50 p.m.
edited Oct 07 '14, 3:30 a.m. by Ralph Schoon (63.3k●3●36●46)
I'm trying to set default owner based on the few other Custom attributes using js script customization. I want to use attribute Value provider to get the owner id.
1. Where I need to put my Value provider tag in the process configuration file? <valueSetProviders> <valueSetProvider> </valueSetProvider> ... </valueSetProviders> 2. In my case can I add the script to Owner field directly or I need to create a custom field just for this script? |
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Oct 07 '14, 3:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Also see https://jazz.net/library/article/1093 lab 5 for how that works.
Some remarks: You can only set attributes of tape Contributor/User by setting the UUID of the user. You can not search for users and get their UUID in JavaScript. You can also not search for roles. Carefully readd https://jazz.net/wiki/bin/view/Main/AttributeCustomization and https://jazz.net/library/article/1093 lab 5, the first two sections to understand what you can and can't do. There are some default value providers available. See https://jazz.net/library/article/1093 lab 4. There is very few information available that would allow a default value script to work. When the work item is created, there is almost nothing set, so you can't use a lot to work with. Only attributes with default value providers and the type attribute have any value. So for the default, you can pretty much only use a single default user - which you can achieve with the available provider. Ralph Schoon selected this answer as the correct answer
|
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.
Comments
I suggest you go through these articles first.
https://jazz.net/library/article/1003
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
https://jazz.net/library/article/1360