How to filter http value sets based on values of other fields?
RTC 4.0.3
I've followed the instructions at Freddy's blog post here: http://sudhakarf.wordpress.com/2013/03/15/http-filtered-value-set-providers-and-dependent-enumerations/ (which is an awesome tip!) but have run into two problems. Everything works as expected when creating a work item in the Eclipse client - the attribute populated by the value set is updated and the correct filtered results are displayed when the related attribute is modified. However, in the web client, the attribute populated by the value set does not display any values for selection. No errors in logs or in firebug. Testing in the Project Configuration -> Attribute Customization -> HTTP Value Set editor in Eclipse is successful. If I remove the search condition in the row xpath expression, values appear in the web client. What could be wrong? Secondly, I'd like the value set to be filtered off the category of the work item. Using ${com.ibm.team.workitem.attribute.category.label} in the row xpath expression does not work - when testing in the Project Configuration -> Attribute Customization -> HTTP Value Set editor in Eclipse the error says "Exception while updating value set". As a workaround, I've created a hidden attribute ("category2") with a javascript calculated value that returns "workItem.getLabel(WorkItemAttributes.FILED_AGAINST)" and used ${category2.value} in the row xpath. This works but seems like a hack. I would expect to be able to pull the label directly from the original category attribute. Is the com.ibm.team.workitem.attribute.category attribute a special case that does not apply to Table 1 here: http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m3/topic/com.ibm.team.workitem.doc/topics/t_configuring_http_filtered_value_set.html ? |
Accepted answer
Hi Brian
I updated http://sudhakarf.wordpress.com/2013/07/19/http-filtered-value-set-providers-and-dependent-enumerations/ with a different XML source now that http://cars.flashmx.us/makes isn't valid anymore. Regarding your question: 1. I tried with 4.0.3 and IE 10 and the values are filtered and shown correctly with the example I have anyway. 2. I got the same problem, except that if I use ${com.ibm.team.workitem.attribute.category.value} the error goes away but the filter doesn't work and all values get shown. Maybe open a defect? Brian Fleming selected this answer as the correct answer
Comments
Brian Fleming
commented Jul 19 '13, 11:11 a.m.
Thank you Freddy and Ralph for your responses. For my second issue, I have raised https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=273362
|
2 other answers
Ralph Schoon (63.1k●3●36●45)
| answered Jul 19 '13, 3:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 19 '13, 3:43 a.m.
Hi Brian,
I was working on something similar (Version 4.0.3). I found it works as advertized. But that was for a custom attribute. I used //node1/node2[contains(./node3,'${my_attribute_ID.value}')] Please note the '. I tried with category and failed. Please consider to file a PMR or a defect here: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWelcome Comments
Martin Sarro
commented Sep 06 '13, 5:20 a.m.
Hi Ralph,
1
question from Martin answered in a separate thread: supported in 4.0 |
Hi Raph,
I use //node1/node2[contains(./node3,'${my_attribute_ID.value}')] but if the attribute contains space. The node not find. How to obtain the node that corresponds to the attribute with space?
Comments I would suggest to create a new question as this is answered and the answer is accepted. If you so desire, include a link to this question in your new one. I would have expected that the quotation marks cover blanks.
Durand Guillaume
commented Nov 25 '14, 5:58 a.m.
I create the issue : https://jazz.net/forum/questions/168820/http-filtered-value-set-xpath-attribute-with-space.
I have written what I know. I have not tried that and I don't know if there could be an issue with XPath or if there is a solution.
|
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.