Query results with Related links - can you limit the Related links returned?
(Using RTC 3.0.1) Basically the problem boils down to this: when querying for work items that have "related" records, individual related records are not being returned - all the related links are returned. If one related record is found to match the query, all of the values in the related records field are returned. In all instances, all the related records will be returned if one matches the query. Tried like this:
1. Create a work item that has more than one related record, and make note of one of the IDs.
2. Create a query with result set showing the related records.
3. Make the query to filter for related->ID = the ID you made a note of above.
When you run the query, all the related records will be returned, not just the one with the ID you specified.
This appears to be a bug, or is it actually designed to run this way?
1. Create a work item that has more than one related record, and make note of one of the IDs.
2. Create a query with result set showing the related records.
3. Make the query to filter for related->ID = the ID you made a note of above.
When you run the query, all the related records will be returned, not just the one with the ID you specified.
This appears to be a bug, or is it actually designed to run this way?
One answer
Hello Donna
I dont think the query is designed to include "related to self" as a criteria, and what you are seeing is working as designed.
Let me just add up a few screenshots:
Here is a Defect with related WI:
Here are a few queries as you mentioned in your comment:
2) Create a query with result set showing the related records.
2) Make the query to filter for related->ID = the ID you made a note of above
As I understand you were expected the actual defect WI too in the result set, but then you would be expected the result to have "related to self" - which would be redundant info. Please let me know if I have understood and answered your query correctly.
I dont think the query is designed to include "related to self" as a criteria, and what you are seeing is working as designed.
Let me just add up a few screenshots:
Here is a Defect with related WI:
Here are a few queries as you mentioned in your comment:
2) Create a query with result set showing the related records.
2) Make the query to filter for related->ID = the ID you made a note of above
As I understand you were expected the actual defect WI too in the result set, but then you would be expected the result to have "related to self" - which would be redundant info. Please let me know if I have understood and answered your query correctly.