Custom Reporting with Custom Properties

Wednesday, May 8, 2019
Avatar

Hi,

I have a situation similar to what mentioned in the below https://www.inflectra.com/Support/KnowledgeBase/KB369.aspx

However in my case I have multiple CUST values, (01, 02) and I'm running query against Project Group, not Project.

In the group, some project has only 1 CUST, some has 2 which made my report grabbing the unexpected custom properties.

Can you please help to advise how to get them correctly?

Thanks

1 Replies
Sunday, May 12, 2019
Avatar
re: tnguyen Wednesday, May 8, 2019

When you run against a project group, the custom properties will be different for each of the projects, so the values themselves will not be the same for each project.

In addition, the projects may not use the same fields for the same value (e.g. Browser could be CUS_01 in project PR1 and CUS_02 in project PR2). However assuming that is NOT the case, then if it is just the values that are different then you could use the following:

select R.REQUIREMENT_ID, R.REQUIREMENT_NAME, R.TEST_CASE_ID, R.TEST_CASE_NAME, T.CUST_02, C.NAME
from SpiraTestEntities.R_RequirementTestCases as R
inner join SpiraTestEntities.R_TestCases as T on R.TEST_CASE_ID = T.TEST_CASE_ID
left join SpiraTestEntities.R_CustomListValues as C on cast (T.CUST_02 as int32) = C.CUSTOM_PROPERTY_VALUE_ID and T.PROJECT_ID = C.PROJECT_ID
where R.PROJECT_GROUP_ID = ${ProjectGroupId}

where we added an additional clause to join the projects explicitly:

...and T.PROJECT_ID = C.PROJECT_ID

Regards

Jim

Statistics
  • Started: Wednesday, May 8, 2019
  • Last Reply: Sunday, May 12, 2019
  • Replies: 1
  • Views: 114