It's all about the answers!

Ask a question

Query results with Related links - can you limit the Related links returned?


Donna Thomas (14122448) | asked Apr 15 '13, 2:17 p.m.
(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?

One answer



permanent link
KrishnaKanth Naik (76511015) | answered Apr 16 '13, 4:10 a.m.
JAZZ DEVELOPER
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.

Comments
Donna Thomas commented Apr 16 '13, 9:29 a.m.

We are using the web client in this instance. Apparently I did not describe it clearly enough. See the picture. This is a query in the web client to find specific related records. To make it even more clear, we searched for an ID. While I want 1 related record, it returns 4.

SampleQueryAndResultsFromWeb

Your answer


Register or to post your answer.