Collection aggregates data

Hello Forest Admin team,

I am trying to call some traceability matrix between:

  • User Requirements
  • Software Requirements
  • Test Cases

where:

  • User Requirement can have assigned multiple Software Requirements
  • Software Requirement can have assigned multiple Test Cases

I proceeded as follows:

  1. I created collection “idTraceability”

  2. I created router with the respective dataQuery:

  3. If I run my sql query directly on database, I get also the right results:
    image

  • as you can see, row 3 “Information about new articles” is listed twice since “Software Requirement” 4 and 5 are assigned to this User Requirement.
  • this is exactly as this should work

However, this is not the result that I see in Forest Admin. It looks like this in forest admin:

  • as you see, the row is just simply duplicated, but this is not how that result should look like…

The applied query is just regular multiple left-join.

    SELECT user_req.id, user_req."requirementName" as "User Requirement", soft_req.id as "Software Requirement ID", tests.id as "Test Case ID"

    FROM "userRequirements" as user_req

    LEFT JOIN "userRequirements-softwareRequirements" as user_software ON user_software."userRequirementId" = "user_req".id
      
    LEFT JOIN "softwareRequirements" as soft_req ON user_software."softwareRequirementId"=soft_req.id

    LEFT JOIN "testCases-softwareRequirements" as soft_test ON soft_test."softwareRequirementId" = soft_req.id

    LEFT JOIN "testCases" as tests ON soft_test."testCaseId" = tests.id

    ORDER BY user_req.id ASC;

Is there any specific setting in collections that I overlooked or is that a bug?

Thank you for your help,

Vaclav

Hello @Vaclav,

Can you please give more information such as:

  • Agent type & version
  • Project name
  • Team name

Hi @anon23361380,

I solved that already, I didn’t have a unique id for each row. I used as unique id user_req.id, but this is not unique though when the same unique requirement can be listed in more roles.

Have a nice day,
Vaclav