It's all about the answers!

Ask a question

How to filter http value sets based on values of other fields?


Brian Fleming (1.6k11928) | asked Jul 18 '13, 5:07 p.m.
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


permanent link
Sudhakar Frederick (80113631) | answered Jul 19 '13, 7:31 a.m.
JAZZ DEVELOPER
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
My first issue was caused by having the wrong dependency set - I still had "Filed Against" instead of my new custom attribute ("category2").

2 other answers



permanent link
Ralph Schoon (63.1k33646) | 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,

Is any way to make "http value sets" to work on RTC 3.0.1.1 ???
All posts I've read are from v4.0 and that solution didn't work for v3.
Any idea or workaround?

Thanx in advance!


1
Eric Jodet commented Sep 06 '13, 7:29 a.m.
JAZZ DEVELOPER

 question from Martin answered in a separate thread: supported in 4.0


permanent link
Durand Guillaume (634) | answered Nov 25 '14, 5:28 a.m.
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
Ralph Schoon commented Nov 25 '14, 5:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.

But, Are you a solution for to recover my attribute with space?


Ralph Schoon commented Nov 25 '14, 5:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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


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.