It's all about the answers!

Ask a question

Problem with value providers


Bruno Portaluri (212) | asked Feb 09 '10, 5:16 a.m.
We recently upgraded our server to RTC 2.0.0.2 to use new value providers feature documented here: https://jazz.net/wiki/bin/view/Main/AttributeValueProviders

We have customized our process to manage ODC defects classification.

We have OdcTrigger field that is dependent from OdcActivity. Both are enumerations.
Everithing works fine using RTC Java client be we have problems on the Web UI.
Creating a new defect both fields start with 'Unassigned' value and the second field is correctly disabled.
When I select a value for OdcActivity, the OdcTrigger field is correctly enabled on the Java client but this doesn't work on WebUI.
Furthermore, if I set the first field back to 'Unassigned' value I get a 'TypeError: _35 is null' error.
Since this field is required it is not possible to save the work item.


Here are some extract of our process.xml.


<attributeDefinitions>
<attributeDefinition>
<attributeDefinition>
<dependsOn>
<valueSetProvider>
<filterAttribute>
</valueSetProvider>
</attributeDefinition>
...
</attributeDefinitions>


<configuration>
<valueSetProviders>
<valueSetProvider>
<filterMap>
<value>
<literal>
<literal>
....
</value>
<value>
<literal>
<literal>
</value>
...
</filterMap>
</valueSetProvider>
</valueSetProviders>
</configuration>



In my opininon this is a defect
Is there a workaround or fix for this ?

Thanks

6 answers



permanent link
Patrick Streule (4.9k21) | answered Feb 09 '10, 5:38 a.m.
JAZZ DEVELOPER
On 2/9/10 11:23 AM, bportaluri wrote:
We recently upgraded our server to RTC 2.0.0.2 to use new value
providers feature documented here:
https://jazz.net/wiki/bin/view/Main/AttributeValueProviders

We have customized our process to manage ODC defects classification.

We have OdcTrigger field that is dependent from OdcActivity. Both are
enumerations.
Everithing works fine using RTC Java client be we have problems on the
Web UI.
Creating a new defect both fields start with 'Unassigned' value and
the second field is correctly disabled.
When I select a value for OdcActivity, the OdcTrigger field is
correctly enabled on the Java client but this doesn't work on WebUI.
Furthermore, if I set the first field back to 'Unassigned' value I get
a 'TypeError: _35 is null' error.
Since this field is required it is not possible to save the work
item.


Here are some extract of our process.xml.


attributeDefinitions
<attributeDefinition
attributeDefinition
<dependsOn
<valueSetProvider
<filterAttribute
</valueSetProvider
/attributeDefinition
...
/attributeDefinitions


configuration
<valueSetProviders
<valueSetProvider
<filterMap
<value
<literal
<literal
....
</value
<value
<literal
<literal
</value
...
</filterMap
</valueSetProvider
</valueSetProviders
/configuration



In my opininon this is a defect
Is there a workaround or fix for this ?

Thanks


Unfortunately, I can't see the entire XML, but I assume you have
elements of the form:

<value>
</value>

I.e. <value> elements with no <literal> child elements. This leads to
the bug that you described (which is fixed in the meantime).

IMO, all <value> elements need a <literal> sub element, as there is no
'undefined' value for an enumeration attribute. I would suggest to add
the 'Unassigned' literal as a child to the empty <value> elements.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Bruno Portaluri (212) | answered Feb 09 '10, 6:33 a.m.
Sorry but the XML was not correctly displayed.
This should be better:

<attributeDefinitions>
<attributeDefinition id="com.ibm.team.custom.odc.activity" name="ODC Activity" type="OdcActivity"/>
<attributeDefinition id="com.ibm.team.custom.odc.trigger" name="ODC Trigger" type="OdcTrigger">
<dependsOn id="com.ibm.team.custom.odc.activity"/>
<valueSetProvider providerId="com.ibm.team.custom.odc.activity_trigger_rel">
<filterAttribute id="com.ibm.team.custom.odc.activity"/>
</valueSetProvider>
</attributeDefinition>
...
</attributeDefinitions>


<configuration-data xmlns="http://com.ibm.team.workitem/providers" id="com.ibm.team.workitem.configuration.providers">
<valueSetProviders>
<valueSetProvider id="com.ibm.team.custom.odc.activity_trigger_rel" providerId="com.ibm.team.workitem.common.internal.attributeValueSetProviders.FilteredValueSetProvider" name="Activity to Trigger">
<filterMap sourceEnumeration="OdcActivity" dependentEnumeration="OdcTrigger">
<value content="1">
<literal id="1"/>
<literal id="2"/>
....
</value>
<value content="2">
<literal id="3"/>
<literal id="4"/>
</value>
...
</filterMap>
</valueSetProvider>
</valueSetProviders>
</configuration-data>


We do not have <value> elements without a <literal> sub element.

The problem is that when OdcActivity is not yet set it has an 'Unassigned' value that has no mapping to OdcTrigger. This is the desired behavior and works correctly on RTC client.

Thanks for the quick reply.

permanent link
Patrick Streule (4.9k21) | answered Feb 10 '10, 5:53 a.m.
JAZZ DEVELOPER
We do not have<value> elements without a<literal> sub
element.

The problem is that when OdcActivity is not yet set it has an
'Unassigned' value that has no mapping to OdcTrigger. This is the
desired behavior and works correctly on RTC client.

Thanks for the quick reply.

I see. Could you create a work item for this and attach the XML?

In the meantime, you could add a mapping for the Unassigned value in
OdcActivity to an Unassigned value in OdcTrigger.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Bruno Portaluri (212) | answered Feb 10 '10, 9:06 a.m.
Here is the defect: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=105684

permanent link
Bruno Portaluri (212) | answered Feb 10 '10, 5:06 p.m.
Defining 'Unassigned' values for enumerations and adding the mapping follows has fixed the problem.


<literal id="0" name="Unassigned" default="true" null="true"/>
...
<value content="0">
<literal id="0"/>
</value>


I have attached the new process.xml in the defect.

permanent link
EclipseTalk . (32736061) | answered Jul 14 '11, 9:09 a.m.
Hello,
The filter works in the rich client but not in the Web UI. I'm using RTC 2.x. Did you get it to work in the Web U and if so what did you do?
Thanks in advance.

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.