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

2 Replies
Sunday, May 12, 2019
Avatar
inflectra.jimx
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

Wednesday, February 5, 2020
Avatar
re: inflectra.jimx Sunday, May 12, 2019

Hello Jim,

Thanks for your response. We've instructed all projects to use the same way of custom values, however it runs into another issue, for example: project 1, cust02 is Program, value is free form Text, but for project 2, cust02 is also Program, value is a List of predefined program (Civil, Electrical...). Consequently the report generated error cannot convert character correctly etc...In this case, it's type mismatch for the custom properties

Anyway to fix?

By the way, if custom value is Date type, error with conversion happens as well. Possibly we cannot apply "C on cast (T.CUST_02 as int32) = C.CUSTOM_PROPERTY_VALUE_ID"??

 

Many thanks

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, May 8, 2019
  • Last Reply: Wednesday, February 5, 2020
  • Replies: 2
  • Views: 2347