Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Oct 29, 2025

Issue associated PR

The IssueAssociatedPr relationship represents the link between a Jira issue and an external pull request within the Teamwork Graph. It allows you to:

  • Retrieve external pull requests associated with a specific Jira issue
  • Find which Jira issues are associated with an external pull request
  • Traverse and analyze issue-pull-request relationships

Relationship type: Canonical

From object typeTo object type
Jira issue - ati:cloud:jira:issueExternal pull request - ati:cloud:jira:pull-request

Cypher

We recommend using parameterized Cypher queries rather than placing parameters directly in the query string. This helps improve performance.

Forward query

GraphQL
1
2
query IssueAssociatedPr_CypherQuery($cypherQuery: String!, $params: JSON!) {
 graphStore @optIn(to: ["GraphStore", "GraphStoreCypherQueryV2"]) {
  cypherQueryV2(query: $cypherQuery, params: $params) {
   edges {
    node {
     columns {
      key
      value {. on GraphStoreCypherQueryV2NodeList {
        nodes {
         data {. on DevOpsPullRequestDetails {
           id
          }. on ExternalPullRequest {
           id
          }
         }
        }
       }. on GraphStoreCypherQueryV2AriNode {
        data {. on DevOpsPullRequestDetails {
          id
         }. on ExternalPullRequest {
          id
         }
        }
       }. on GraphStoreCypherQueryV2BooleanObject {
        bool_val: value
       }. on GraphStoreCypherQueryV2IntObject {
        int_val: value
       }. on GraphStoreCypherQueryV2FloatObject {
        float_val: value
       }. on GraphStoreCypherQueryV2StringObject {
        str_val: value
       }
      }
     }
    }
   }
  }
 }
}
Params
1
2
{
 "cypherQuery": "MATCH (issue:JiraIssue {ari: $id})-[:issue_associated_pr]->(request:GraphPullRequest) RETURN request",
 "params": {
  "id": "$id"
 }
}

Inverse query

GraphQL
1
2
query IssueAssociatedPr_CypherQuery($cypherQuery: String!, $params: JSON!) {
 graphStore @optIn(to: ["GraphStore", "GraphStoreCypherQueryV2"]) {
  cypherQueryV2(query: $cypherQuery, params: $params) {
   edges {
    node {
     columns {
      key
      value {. on GraphStoreCypherQueryV2NodeList {
        nodes {
         data {. on JiraIssue {
           id
          }
         }
        }
       }. on GraphStoreCypherQueryV2AriNode {
        data {. on JiraIssue {
          id
         }
        }
       }. on GraphStoreCypherQueryV2BooleanObject {
        bool_val: value
       }. on GraphStoreCypherQueryV2IntObject {
        int_val: value
       }. on GraphStoreCypherQueryV2FloatObject {
        float_val: value
       }. on GraphStoreCypherQueryV2StringObject {
        str_val: value
       }
      }
     }
    }
   }
  }
 }
}
Params
1
2
{
 "cypherQuery": "MATCH (issue:JiraIssue)-[:issue_associated_pr]->(request:GraphPullRequest {ari: $id}) RETURN issue",
 "params": {
  "id": "$id"
 }
}

Metadata

This relationship is not indexed. You will not be able to filter by this metadata when querying this relationship.

To metadata

PullRequestStatus

NameInternal NameIndexDescription
not-setPR_STATUS_NOT_SET0No status has been set for this pull request.
openPR_STATUS_OPEN1Pull request is open and awaiting review or merge.
mergedPR_STATUS_MERGED2Pull request has been successfully merged into the target branch.
declinedPR_STATUS_DECLINED3Pull request has been declined and will not be merged.
unknownPR_STATUS_UNKNOWN4Pull request status cannot be determined.
draftPR_STATUS_DRAFT5Pull request is in draft mode and not ready for review.

Reviewer

Author

ReviewerStatus

NameInternal NameIndexDescription
not-setPR_REVIEWER_STATUS_NOT_SET0No reviewer status has been set.
approvedPR_REVIEWER_STATUS_APPROVED1Reviewer has approved the pull request changes.
unapprovedPR_REVIEWER_STATUS_UNAPPROVED2Reviewer has not yet approved the pull request.
needsworkPR_REVIEWER_STATUS_NEEDSWORK3Reviewer has requested changes before approval.

Ari

When filtering by ARI in GraphQL, it will behave as a String rather than a message as shown below.

NameTypeDescription
valueStringThe ARI string value identifying the user or resource.

Rate this page: