Jira Automation Not Listing Bitbucket PRs in Comments

Golan Shoval Gil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 19, 2024

Hello Atlassian Community,

 

I’m encountering an issue with setting up an automation rule in Jira to collect and comment on Bitbucket pull requests (PRs) associated with a Jira story. Despite following the recommended steps, the automation isn’t functioning as expected. I would greatly appreciate any guidance or solutions you can provide.

 

Current Setup:

I have admin access to the Jira project and the relevant Bitbucket repositories. I aim to create an automation rule in Jira that:

1.Triggers manually.

2.Collects all Bitbucket PRs linked to that story.

3.Posts a comment on the Jira story listing these PRs.

 

Automation Rule Configuration:

Trigger: Issue Updated

Condition: Issue Type equals Story

Action: Add Comment

 

Trying to print {{issue.development}} on a story that has 3 pull requests linked to it, produced this log in the audit log:

Development Data: {pullrequest={dataType=pullrequest, state=OPEN, stateCount=3}, json={"cachedValue":{"errors":[],"summary":{"pullrequest":{"overall":{"count":3,"lastUpdated":"2024-12-19T10:49:59.434-0500","stateCount":3,"state":"OPEN","dataType":"pullrequest","open":true},"byInstanceType":{"bitbucket":{"count":3,"name":"Bitbucket Cloud"}}}}},"isStale":false}}

 

Questions:

  1. Automation Limitations: Are there any known limitations or permissions issues that might prevent Jira automation from accessing the issue.development data?
  2. Smart Value Access: Is {{issue.development.pullrequest}} the correct smart value path to access linked Bitbucket PRs in Jira Cloud? If not, what is the accurate path?
  3. Alternative Approaches: If smart values aren’t sufficient, are there alternative methods or plugins recommended for achieving this PR listing functionality?

 

What I’ve Tried So Far:

  • Verified that PRs are correctly linked and visible in the Development panel.
  • Updated smart values based on logged output.
  • Ensured consistent PR naming with Jira issue keys.

Thank you in advance for your assistance!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2024

Hi @Golan Shoval Gil -- Welcome to the Atlassian Community!

My understanding is the pull request (PR) smart value {{pullRequest}} is only available to automation rules when one of the PR-related triggers is used: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/#--Pull-request--

Another option is to use the Send Web Request action to call a REST API endpoint to access the PR data at other times.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events