It's all about the answers!

Ask a question

Dependant Attribute and Value Set not Working


Kyle Dodge (3114) | asked Nov 05 '18, 10:22 p.m.
retagged Nov 27 '18, 8:29 a.m. by Ken Tessier (84117)

Hello,

I followed the steps outlined below for setting the values in dependent attributes but the dependent attribute is not being updated based on the source attribute.

Basically I have the following.

1) Source attribute enumeration: Unassigned, Low, Medium, and High

2) Dependent attribute enumeration: 0, 1, 2, and 3.

I created a Value Set Dependent Enumeration and mapped them (source and dependent) accordingly (and respectively).  I added the source and dependent attributes to the work item, but when I change the source attribute, the dependent attribute did not update based on the source selection (even after save).  Not sure what the issue is. Any help is greatly appreciated.

Tutorial followed: https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.workitem.doc%2Ftopics%2Ft_configuring_dependent_enumeration.html


Comments
Kyle Dodge commented Nov 05 '18, 10:43 p.m.

Update:

1)  Noticed that in the Web View the source and dependent attributes do display, but in the eclipse client the dependent attribute does NOT display. This only applies to previously created work items.

2) Creating a new work item shows both the Source and Dependent attributes in the Web View and the Eclipse client.  However, I see an "error" on the dependent attribute stating "The selected value is not applicable".  Source attribute = "High", Dependent attribute = "0, 3". 

Is this an issue with default not being assigned in the value set correctly?  Default Value Set = Unconfigured for source attribute.  Source and Dependent Attributes have "Unassigned" as the default in the enumeration (which should be 0 based on the value set mapping)


Ian Wark commented Nov 06 '18, 7:25 a.m.

I can reproduce your error "The selected value is not applicable". In the Eclipse .log it has this error:


java.lang.IllegalArgumentException: The filter attribute or a dependency has to be configured for the FilteringValueSetProvider (Work Item -1, Attribute 'MyNumber')
at com.ibm.team.workitem.common.internal.attributeValueProviders.FilteringValueSetProvider.getValueSet(FilteringValueSetProvider.java:87)

I am investigating what is wrong with this setup.. not sure yet. 



Ralph Schoon commented Nov 06 '18, 7:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The defect above is for HTTP Filtered Value sets and unrelated to the topic at hand as far as I can tell. 

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Nov 06 '18, 7:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 06 '18, 8:59 a.m.

A dependent attribute is a value set and not a default value provider or a calculated value. It provides a range of allowed values for the dependent attribute based on the value of the source attribute. It does however not change the target attribute value.


1. If you change the source of a dependency there is no calculation that magically calculates the dependent attribute. This would also not make sense, as the dependent attribute could still provide multiple valid choices. 
2. What you should see after creation, is an error indicator, if the default value of the dependent attribute has a default value that does not belong to the value set  for the default or chosen value of the source attribute. The dependent attribute value would not change, you have to do it yourself.
3. After the work item was created, if you change the source attribute value to a value that makes the dependent attribute value violate the dependency, you will see an indicator hinting you should change the dependent value to an agreed upon value set. Again, there is no automation that does that for you.

So the dependent enumeration is likely working as it is designed to.

Kyle Dodge selected this answer as the correct answer

Comments
Kyle Dodge commented Nov 06 '18, 8:53 a.m.

Thanks, Ralph,

After reading this I can see that my interpretation of the behavior of the dependent attribute was incorrect.  Basically, the dependent attribute limits the amount of selections provided to the user, but ultimately still requires the user to make a selection.


Ralph Schoon commented Nov 06 '18, 9:02 a.m. | edited Nov 06 '18, 9:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

That is correct Kyle. This is also due to the fact that there is no way to automate this, since the dependency is not necessarily to one target value.

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.