Help Contents

 

Directly Related To

Field: DirectlyRelatedTo

Description

DirectlyRelatedTo provides an easy way to filter entities based on the results of another query, representing the entities they are directly related to (so any indirect relationships an entity may have i.e. bugs associated with a requirement via script references) will not be included.

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 DirectlyRelatedTo 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 both direct and indirect relationships, use the field RelatedTo 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' }

To find all scripts that have a direct relationship to a requirement with a name that includes customer:

EntityType = Script AND DirectlyRelatedTo IN {EntityType = Requirement AND Name ~ customer}

See Also

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