Help with Script Create - Set the Value for Enumerations
![]()
Hi,
I need some help to create a script which will populate an Enumeration when a work item is created:
So I have an Enumeration: Enum1
Values: 1 Initial; 2 Study
I have then created two Attributes in the work items:
Milestone1
Milestone2
What I would like is to automatically set:
So I need a script which populates these Enumeration values.
Any help would be great.
Thanks
|
One answer
![]()
Ralph Schoon (62.7k●3●36●43)
| answered Jul 15 '14, 7:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 15 '14, 7:42 a.m.
Please see https://jazz.net/library/article/1093 lab 5. You need to create two default value provider scripts and return the enumeration literal ID's.
Comments Hi is it not possible to have one script that defines all Variables:
If possible could you provide an example?
A value provider can only provide the value to one attribute. You can use the same provider for several ones if the type matches.
/*********** * Licensed Materials - Property of IBM * (c) Copyright IBM Corporation 2011. All Rights Reserved. * * Note to U.S. Government Users Restricted Rights: I've found this script as I'm new and do not understand scripting: how can this be expanded for all mappings? dojo.provide("com.example.DefaultValueProvider"); ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Start here: https://jazz.net/wiki/bin/view/Main/AttributeCustomization and https://jazz.net/library/article/1093 lab 5
Hi,
I'm using the same enumeration; so how would you add the script for that?
sorry to ask simple question - but can you provide an example in the script above
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
If you would just care to look at the workshop and the other link I proposed you to read, all your questions would be answered, I think.
showing 5 of 6
show 1 more comments
|