It's all about the answers!

Ask a question

How can I add a default value to one work item type for a shared attribute?


Michael Walker (99215201157) | asked Sep 05 '12, 7:17 p.m.
I'm trying to add a default iteration for the Planned For field and since it's a shared field it's adding it to all the work item types.  Is it possible to specify the default value for only 1 work item type using the Process Config or is this going to require a script to implement?

Comments
Michael Walker commented Sep 07 '12, 3:04 a.m.

bump bump bump

One answer



permanent link
Ifeanyichukwu Agu (561) | answered Nov 12 '12, 2:56 p.m.
JAZZ DEVELOPER
Hi Michael,

You can achieve this using a script based default value provider by writing your function to return the different iteration UUIDs depending on workitem type.

You can obtain the UUIDs for your iterations from the rootservices page (https://<host-name>:<port-numbr>/jazz/rootservices) drilling down to project area and then timelines.

 The code below illustrates the general idea.

 getDefaultValue: function(attribute, workItem, configuration) {
            var result;
            var typevar = workItem.getValue("workItemType");
            if(typevar=="defect") result= "_EiPCcBJgEeK6lIYfm2Q12w";
            return result;        
        }

Hope this helps.

Your answer


Register or to post 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.