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

Problem with dependent enumeration in web browser

Hello guys,

I have the following problem:

I created two enumeration attributes in a workitem: Area and Subarea.
In "Subarea" attribute I created a set value based on dependent enumeration.
In RTC client, when I change the value in "Area" combobox, an error notification is showed in "Subarea" combobox when the value selected is not applicable. This behaviour does not occur in web browser.

I'd like to know if this behaviour is possible in web browser and how I do it.

Also, I'd like to know if is possible a refresh in combobox "Subareas" when I change the "Area" combobox, so that combobox "Subareas" shows only the applicable values. (now, if i select a value in Subareas combobox and then change de Area combobox, the value I selected in Subarea remains the same)

Version of RTC is 4.0.3

0 votes

Comments

 yes, this should work (sub refresh to selected list)..


to make this work, you must also set the sub attribute to be dependent on the Area attribute
here is how they do that for Category  --- see the dependencies box





2 answers

Permanent link
Sam,
I did this configuration. The problem occurs when i follow the steps:

1. I set a value in Area combobox
2. The Subarea combobox is updated
3. I select a valid value in Subarea combox
4. Then I change the value in Area combobx. In this moment, the Subarea combobox remains with the value I selected in step 3. In fact, the combobox has the content updated, but at the UI, the value selected is invalid.

The subarea apresentation is not refreshed when I set the value at the Area combobox.

Sorry my english...I am brazilian and I don't speak fluently.

0 votes

Comments

Very good explanation. I have seen this problem too.  since 3.0.1 on the web UI. 

it works the first time, not the second and on.  

I experience the same with 5.0.1. The dependent enumeration is not refreshed ... there is a little red x and the message is that the value is not valid. If is not valid, why show it?
Is there a fix for this available? a workaround? does it work as designed or is there a defect open?

this is working as designed. the dependent enumeration does NOT create javascript to CHANGE the downstream UI selections..


Permanent link
 Hi, I hope the following tips can help you
1. Add a default element to the dependent enumeration, for example <Select a value>.
2. Get the id from "process configuration source" for this new value, in this case  "com.xxx.process.enum.literal.l25".
3. Add a calculated value on workitem/Attribute Customization.
add de next lines to the script 
//////////////////////////////
dojo.provide("com.workitem.custom.getValue.xxxxx");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

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

    dojo.declare("com.workitem.custom.getValue.xxxxx", null, {

        getValue: function(attribute, workItem, configuration) {
return "com.xxx.process.enum.literal.l25"
        }
    });
})();

////////////

4. in the type and attribute section of the workitem type, edit the dependent enumeration, on the field calculated value by selecting the recently created script 

0 votes

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

Question asked: Apr 01 '14, 9:38 a.m.

Question was seen: 5,591 times

Last updated: Jan 16 '15, 6:46 p.m.

Confirmation Cancel Confirm