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

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 ?

0 votes


Accepted answer

Permanent link
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

0 votes

Comments

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
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

1 vote

Comments

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!

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

1 vote


Permanent link
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?



0 votes

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.

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?

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 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
× 6,166

Question asked: Jul 18 '13, 5:07 p.m.

Question was seen: 8,771 times

Last updated: Nov 25 '14, 5:59 a.m.

Confirmation Cancel Confirm