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 (63.3k●3●36●46)
| 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
Matt Muller
commented Jul 21 '14, 8:28 a.m.
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:
Matt Muller
commented Jul 21 '14, 9:22 a.m.
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");
Ralph Schoon
commented Jul 21 '14, 9:25 a.m.
| edited Jul 21 '14, 9:26 a.m.
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
Matt Muller
commented Jul 21 '14, 12:04 p.m.
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
Ralph Schoon
commented Jul 22 '14, 2:17 a.m.
| edited Jul 22 '14, 2:19 a.m.
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
|
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.