It's all about the answers!

Ask a question

parameterized HTTP Value Set Providers - How to dynamically pass values to the XML data source URL


Shwetha G (60331) | asked Dec 16 '16, 12:38 a.m.
edited Dec 16 '16, 1:16 a.m.
Hello All,

I wanted to dynamically pass the current work Item Id to the XML data source URL in HTTP Filtered value set.

Currently, I tried with the below mentioned URL to retrieve the XML data:

https://localhost:9443/ccm/oslc/workitems/${com.ibm.team.workitem.attribute.id}

but the id is not fetched and no values are listed in the combo box.

Is there any way to pass the WorkItem Id dynamically.

Thanks in advance

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Dec 16 '16, 5:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Dec 16 '16, 5:02 a.m.
To know the ID's for internal attributes, look into the work item customization in the Web UI. The identifier for the work item number attribute (Id) is "id". To show com.ibm.team.workitem.attribute.id is a defect in the Eclipse client I have reported long time ago. You won't get anything using these ID's from the Eclipse client in the attribute customization and anywhere else.


Shwetha G selected this answer as the correct answer

Comments
Shwetha G commented Dec 19 '16, 10:56 a.m. | edited Dec 19 '16, 11:54 a.m.

  Hi Ralph,


Thanks for your reply. I wanted to know whether I dynamically pass the current workItem ID to the Http Filtered value set XML URL 

say for eg: If the defect Id is 1000, then I should be able to pass the XML path URL as : https://localhost:9443/ccm/oslc/workitems/1000

like wise : If the current workItem ID is 1001 

Is there a way to dynamically do this. I have read we can pass the value and the label of the current workItem to this Http filtered value set.

However, I have not got the exact way to do so.

As you mentioned in the earlier post :
${xy.value} The value of attribute  xy  . The value is the internal representation of an attribute value, for example,  severity.literal.l5  .
I have tried this, but no luck.

Please help me with a sample example, that passes the dynamic value to the URL.



Ralph Schoon commented Dec 19 '16, 11:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

${id.value}

One other answer



permanent link
Ralph Schoon (63.5k33646) | answered Dec 16 '16, 2:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Dec 16 '16, 2:18 a.m.
Reading the product help would be valuable.  You can only access attributes of the current work item to modify the URL. You have to conform to the format.

The XML data source URL and the row XPath expression can also support the following variables:
Table 1. Supported variables
Variable Description
${filter} The current filter
${xy.value} The value of attribute xy . The value is the internal representation of an attribute value, for example, severity.literal.l5 .
${xy.label} The label of attribute xy . The label is the display name of the attribute value, for example, Critical .







Comments
Shwetha G commented Dec 16 '16, 4:36 a.m.

Hello Ralph,

Thanks for the reply.

I have already tried the example shared, and seen the table shared,

I have tried the following queries :

https://localhost:9443/ccm/oslc/workitems/${com.ibm.team.workitem.attribute.id}
https://localhost:9443/ccm/oslc/workitems/${com.ibm.team.workitem.attribute.id.value}
https://localhost:9443/ccm/oslc/workitems/${Id.value} : Here Id is the current workItem Id.
https://localhost:9443/ccm/oslc/workitems/${com.ibm.team.workitem.api.common.WorkItemAttributes.ID}
https://localhost:9443/ccm/oslc/workitems/${com.ibm.team.workitem.api.common.WorkItemAttributes.ID.values}.

but I couldn't hit the URL and get the values in the combo box.

Is there any sample program for the dynamic XML data source URL ?, I have found the example for Xpath. But I need for sample program for
XML data source URL.

Could you please assist me on this.

Thank you

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.