It's all about the answers!

Ask a question

RRDI reports - reporting on relational links


Bharath M (5465428) | asked Feb 27 '12, 5:40 a.m.
Hi,

we are trying to build some RRDI-RTC reports that should report on the relational links of a workitem. For eg: Give me list of workitems of type A which has a related workitem of type B. The relation can be Child or just Related.

Though the report returns results, I see some difference in the list when I compare the report results and normal query results. The report returns less number compared to the queries.

I'm using Request and Request related Requests (by Relational Link) to get the report data.

Am I missing something here?

Regards,
Bharath

7 answers



permanent link
Jared Russell (1.3k12019) | answered Feb 28 '12, 4:22 a.m.
There are two query subjects of interest: Request Related Requests, which is based on the parent/child links, and Request Related Requests (by Relational Link) (RRRbRL) which is based on all other types of link.

When you're querying based on the relational link query subject, the thing to take into consideration is that work items will either fall into the "left" or "right" side of the relationship based on where the link was created from. For example, if you want to query for all stories and related defects, the story might either be in the Request, or the Request Related Request (by Relational Link) query subject after the join is performed.

To solve this you need to create two query subjects in Insight/RRDI, the first needs to filter on Request.Type = 'Story' and RRRbRL.Type = 'Defect' and another that filters on Request.Type = 'Defect' and RRRbRL.Type = 'Story'. You can then union these queries to get a single query subject that has all of the stories/defects that are related.

The issue you'll have with the union query is that in the "left" columns you'll have some stories, and some defects, and the same on the right. You will need to edit the expressions of the data items to ensure that you end up with one type of work item on the left, and the other type on the right.

Hi,

we are trying to build some RRDI-RTC reports that should report on the relational links of a workitem. For eg: Give me list of workitems of type A which has a related workitem of type B. The relation can be Child or just Related.

Though the report returns results, I see some difference in the list when I compare the report results and normal query results. The report returns less number compared to the queries.

I'm using Request and Request related Requests (by Relational Link) to get the report data.

Am I missing something here?

Regards,
Bharath

permanent link
Bharath M (5465428) | answered Feb 28 '12, 4:30 a.m.
There are two query subjects of interest: Request Related Requests, which is based on the parent/child links, and Request Related Requests (by Relational Link) (RRRbRL) which is based on all other types of link.

When you're querying based on the relational link query subject, the thing to take into consideration is that work items will either fall into the "left" or "right" side of the relationship based on where the link was created from. For example, if you want to query for all stories and related defects, the story might either be in the Request, or the Request Related Request (by Relational Link) query subject after the join is performed.

To solve this you need to create two query subjects in Insight/RRDI, the first needs to filter on Request.Type = 'Story' and RRRbRL.Type = 'Defect' and another that filters on Request.Type = 'Defect' and RRRbl.Type = 'Story'. You can then union these queries to get a single query subject that has all of the stories/defects that are related.

The issue you'll have with the union query is that in the "left" columns you'll have some stories, and some defects, and the same on the right. You will need to edit the expressions of the data items to ensure that you end up with one type of work item on the left, and the other type on the right.

Hi,

we are trying to build some RRDI-RTC reports that should report on the relational links of a workitem. For eg: Give me list of workitems of type A which has a related workitem of type B. The relation can be Child or just Related.

Though the report returns results, I see some difference in the list when I compare the report results and normal query results. The report returns less number compared to the queries.

I'm using Request and Request related Requests (by Relational Link) to get the report data.

Am I missing something here?

Regards,
Bharath


Thanks Jared. Thats very useful info. When you say Request.Type = 'Story', are you saying Request Related Requests.Type or just Request.Type

permanent link
Jared Russell (1.3k12019) | answered Feb 28 '12, 5:40 a.m.
Just the plain Request.Type field.

There are two query subjects of interest: Request Related Requests, which is based on the parent/child links, and Request Related Requests (by Relational Link) (RRRbRL) which is based on all other types of link.

When you're querying based on the relational link query subject, the thing to take into consideration is that work items will either fall into the "left" or "right" side of the relationship based on where the link was created from. For example, if you want to query for all stories and related defects, the story might either be in the Request, or the Request Related Request (by Relational Link) query subject after the join is performed.

To solve this you need to create two query subjects in Insight/RRDI, the first needs to filter on Request.Type = 'Story' and RRRbRL.Type = 'Defect' and another that filters on Request.Type = 'Defect' and RRRbl.Type = 'Story'. You can then union these queries to get a single query subject that has all of the stories/defects that are related.

The issue you'll have with the union query is that in the "left" columns you'll have some stories, and some defects, and the same on the right. You will need to edit the expressions of the data items to ensure that you end up with one type of work item on the left, and the other type on the right.

Hi,

we are trying to build some RRDI-RTC reports that should report on the relational links of a workitem. For eg: Give me list of workitems of type A which has a related workitem of type B. The relation can be Child or just Related.

Though the report returns results, I see some difference in the list when I compare the report results and normal query results. The report returns less number compared to the queries.

I'm using Request and Request related Requests (by Relational Link) to get the report data.

Am I missing something here?

Regards,
Bharath


Thanks Jared. Thats very useful info. When you say Request.Type = 'Story', are you saying Request Related Requests.Type or just Request.Type

permanent link
Bharath M (5465428) | answered Feb 29 '12, 1:28 a.m.
Jared, I tried the Union, but somehow it doesn't get the expected results. I'm not that good with SQL. Is it possible for us to have a call so as to see what I'm doing wrong.

Thanks,
Bharath

permanent link
Bharath M (5465428) | answered Feb 29 '12, 10:40 a.m.
Jared, somehow I struggled a bit and finally got it working. Thanks for the useful info.

-- Bharath

permanent link
Bharath M (5465428) | answered Apr 10 '12, 10:34 a.m.
Hi Jared,

One more issue in this report. we have a custom attribute(string) defined in the two workitem types (the related workitems that I'm reporting on).
The values in this custom field can be different in each of these related workitems.

I'm using Request String Extension to get hold of this custom field. But for some reason, when I display, it always gives the value of one workitem type.

For eg: I have Feature and User Stories that are related to each other. When I try to display the custom field, it always gives the value in User Stories type. But I need the value in Feature.

Am I missing something?

Thanks,
Bharath

permanent link
Bharath M (5465428) | answered Apr 12 '12, 8:33 a.m.
I got this working. I just need to do the joins on the request ids related to the Feature type.

Thanks,
Bharath

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.