How do I assign the value of a custom Contributor attribute in RTC to a variable in RPE?
I have only been able to find contributor data in two places:
- /workitem/contributor/
- /foundation/contributor/contributor/
- /workitem/workItem/allExtensions
- Filter on key ( key == <attribute_id>)
- Assign <helpId> ( helpId = /workitem/workItem/allExtensions/helperId )
- /workitem/workItem/itemExtensions
- /workitem/workItem/itemExtensions/value
- Filter on <helpId> (<itemExtensions/helperId> == helpId)
- Assign <myItemId> ( myItemId = /workitem/workItem/itemExtensions/value/itemId )
- Note: there is also a ‘reportableUrl’ field here, but when I try the link directly in the browser I get an invalid object error.
- There is not a smallString or DisplayValue here that contains the contributor data
- /workitem/contributor
- Filter on <myItemId> ( /workitem/contributor/itemId == myItemId )
- Assign <myName> ( myName = /workitem/contributor/name )
Accepted answer
You can either use the query workitem/workItem/itemExtensions or workitem/workItem/allExtensions. If you are using the query workitem/workItem/itemExtensions, workitem/workItem/itemExtensions/value/itemId will give the itemId for the contributor, that can be used in the (native) filter for the 2nd request. For the Data Source Configuration, you can set URI property that evaluates to https://server:port/ccm/rpt/repository/foundation
Another option s to use Special Attribute in RPE that can fetch the value based on the matching key.
Note: You may need to update the schema (use Replace Schema option in RPE) if you do not find "itemValue" node under allExtensions. In this example, I am retrieving "Tester" value for the work item.
