Help Contents

 

Related To

Field: RelatedTo

Description

RelatedTo provides an easy way to filter entities based on the results of another query, representing the entities they are related to.

To better illustrate this, imagine we have a query representing all the high-priority requirements:

EntityType = Requirement AND Priority = High AND Project = 'Project X'

If we then wanted to find all scripts related to those high-priority requirements, we could use the RelatedTo Field like this:

EntityType = TestScript AND RelatedTo IN { EntityType = Requirement AND Priority = High AND Project = 'Project X' }

Notice we have surrounded the original query for requirements within curly braces - this is know as a "sub-select" - it means we will execute the query within the curly braces first, then use the results of that query to filter the outer query.

If you only wish to match direct relationships, but not indirect relationships, use the field DirectlyRelatedTo instead.

To perform more complex relationship queries, use the Relationships field.

Examples

All scripts related to low-priority requirements:

EntityType = TestScript AND RelatedTo IN { EntityType = Requirement AND Priority = Low AND Project = 'Project X' }

All requirements with a status of approved which have associated bugs that are currently open:

EntityType = Requirement AND Status = Approved AND RelatedTo IN { EntityType = Incident AND Status = Open } AND Project = 'Project X'

Supported Operators

=, IN, !=, NOT IN

Supported Indexes

Entity

Supported Types

  • AgileRun
  • AutomatedTest
  • AutomatedTestAssignment
  • Incident
  • Requirement
  • RequirementPackage
  • TestExecutionPackage
  • TestScript
  • TestScriptAssignment
  • TestScriptPackage

Supported Features

FeatureSupported?
AggregationNo
SortableNo
Sub-selectsYes

See Also