Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Dojo script to create dependent enumeration

 Hi,


I'm trying to create dependent enumeration using dojo script (for one internal requirement). I have tried the fillowing dojo script (script based value set), but it didn't worked.


dojo.provide("featuregroup.dojo");

dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

dojo.declare("featuregroup.dojo", null, {

    getValueSet: function(attributeId, workItem, configuration) {
    
        var domain= workItem.getValue("com.visteon.enum.domain");
        var functionalblockoptions= [];
        
if ((domain === "com.visteon.domain.literal.l9")) { 
            functionalblockoptions.push("com.visteon.functional.block.literal.l3");
            functionalblockoptions.push("com.visteon.functional.block.literal.l4");
            functionalblockoptions.push("com.visteon.functional.block.literal.l5");
            functionalblockoptions.push("com.visteon.functional.block.literal.l6");
            functionalblockoptions.push("com.visteon.functional.block.literal.l7");
            functionalblockoptions.push("com.visteon.functional.block.literal.l8");
functionalblockoptions.push("com.visteon.functional.block.literal.l9");
            functionalblockoptions.push("com.visteon.functional.block.literal.l10");
}else if((domain === "com.visteon.domain.literal.l8")) {        
functionalblockoptions.push("com.visteon.functional.block.literal.l11");
functionalblockoptions.push("com.visteon.functional.block.literal.l12");
functionalblockoptions.push("com.visteon.functional.block.literal.l13");
functionalblockoptions.push("com.visteon.functional.block.literal.l14");
functionalblockoptions.push("com.visteon.functional.block.literal.l15");
functionalblockoptions.push("com.visteon.functional.block.literal.l16");
}
functionalblockoptions.push("com.visteon.functional.block.literal.l1");
        return functionalblockoptions;
    }
});
})();
================================
Please let suggest if any other process we have to achive this requirment. 

0 votes



One answer

Permanent link

Hi Chandra,

Does the out of the box dependency not work for you?

https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.4/com.ibm.team.workitem.doc/topics/t_configuring_dependent_enumeration.html

0 votes

Comments

 Hi Matt,


Out of the box option is working. but we wanted to do the same funtionality using the dojo.
Because, we have a requirement where the dependent enumeration has more number of literals (now it is morethan 50) it will keep on increase. 
Each time we open out of the box functionality, its taking toomuch of time to load the enumeration fields. assuming because of more number of enumerations available in the project area.
So we thought of using dojo script, which will be easy to configure and maintain the list (easy to add when additional literals needed).

Thanks in advance.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 1,381

Question asked: Feb 08 '18, 8:13 a.m.

Question was seen: 2,351 times

Last updated: Feb 22 '18, 2:06 p.m.

Confirmation Cancel Confirm