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:
What I’ve Tried So Far:
Thank you in advance for your assistance!
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
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.