The Teamwork Graph API is coming soon. The relationship types documented here are indicative of what will be available in the Graph via the Teamwork Graph API. Please note that relationships, their properties, and functionality may change before and during the Early Access Program.
Interested in early access? Express your interest in joining the EAP
The ProjectAssociatedPr relationship represents the link between Jira project and external pull request within the Teamwork Graph. It allows you to:
Relationship type: Canonical
| From object type | To object type | 
|---|---|
| Jira project - ati:cloud:jira:project | External pull request - ati:cloud:jira:pull-request | 
We recommend using parameterized Cypher queries rather than placing parameters directly in the query string. This helps improve performance.
1 2query ProjectAssociatedPr_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 } } } } } } } }
1 2{ "cypherQuery": "MATCH (project:JiraProject {ari: $id})-[:project_associated_pr]->(request:GraphPullRequest) RETURN request", "params": { "id": "$id" } }
1 2query ProjectAssociatedPr_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 JiraProject { id } } } }. on GraphStoreCypherQueryV2AriNode { data {. on JiraProject { id } } }. on GraphStoreCypherQueryV2BooleanObject { bool_val: value }. on GraphStoreCypherQueryV2IntObject { int_val: value }. on GraphStoreCypherQueryV2FloatObject { float_val: value }. on GraphStoreCypherQueryV2StringObject { str_val: value } } } } } } } }
1 2{ "cypherQuery": "MATCH (project:JiraProject)-[:project_associated_pr]->(request:GraphPullRequest {ari: $id}) RETURN project", "params": { "id": "$id" } }
This materialization rule automatically creates project_associated_pr relationships by traversing from Jira projects through their issues to find associated pull requests.
1 2// Materialization Rule: issue-associates-project-to-pr MATCH (project:JiraProject {ari: $id}) MATCH (project)-[rel0:project_has_issue]->(issue:JiraIssue) MATCH (issue)-[rel1:issue_associated_pr]->(request:GraphPullRequest) RETURN request AS ret, MAX(rel1.lastUpdated) AS lastUpdated
| Name | Type | Description | 
|---|---|---|
| status | PullRequestStatus ( Enum) | Current status of the pull request. | 
| reviewers | Reviewer ( Message) | List of users assigned as reviewers for this pull request. | 
| taskCount | Int | Number of tasks or checklist items in the pull request. | 
| author | Author ( Message) | Author information for the pull request. | 
| Name | Type | Description | 
|---|---|---|
| assigneeAri | Ari ( Message) | ARI of the user assigned to the connecting issue. | 
| statusAri | Ari ( Message) | ARI of the current status of the connecting issue. | 
| issueAri | Ari ( Message) | ARI of the issue that connects the project to the pull request. | 
| creatorAri | Ari ( Message) | ARI of the user who created the connecting issue. | 
| reporterAri | Ari ( Message) | ARI of the user who reported the connecting issue. | 
| issueLastUpdatedOn | Long | Timestamp when the connecting issue was last updated. | 
| sprintAris | Ari ( Message) | ARIs of sprints containing the connecting issue. | 
| Name | Type | Description | 
|---|---|---|
| approvalStatus | ReviewerStatus ( Enum) | Current approval status of this reviewer for the pull request. | 
| reviewerAri | Ari ( Message) | ARI of the user assigned as a reviewer. | 
When filtering by ARI in GraphQL, it will behave as a String rather than a message as shown below.
| Name | Type | Description | 
|---|---|---|
| value | String | The ARI string value identifying the user or resource. | 
| Name | Internal Name | Index | Description | 
|---|---|---|---|
| not-set | PR_STATUS_NOT_SET | 0 | No status has been set for this pull request. | 
| open | PR_STATUS_OPEN | 1 | Pull request is open and awaiting review or action. | 
| merged | PR_STATUS_MERGED | 2 | Pull request has been successfully merged into the target branch. | 
| declined | PR_STATUS_DECLINED | 3 | Pull request has been declined and will not be merged. | 
| unknown | PR_STATUS_UNKNOWN | 4 | Pull request status cannot be determined. | 
| draft | PR_STATUS_DRAFT | 5 | Pull request is in draft mode and not ready for review. | 
| Name | Internal Name | Index | Description | 
|---|---|---|---|
| not-set | PR_REVIEWER_STATUS_NOT_SET | 0 | No review status has been set by this reviewer. | 
| approved | PR_REVIEWER_STATUS_APPROVED | 1 | Reviewer has approved the pull request changes. | 
| unapproved | PR_REVIEWER_STATUS_UNAPPROVED | 2 | Reviewer has not approved the pull request changes. | 
| needswork | PR_REVIEWER_STATUS_NEEDSWORK | 3 | Reviewer has requested changes or additional work be done. | 
Rate this page: