Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

{{pullRequest}} smart values are empty

Emily Pinhasi
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!
July 4, 2024

we have jira cloud and bitbucket

the integration is working fine - i can manage and see the details of the branch and pull requests in jira as needed

 

in the automation rules, I would like to get teams notification when a pull request is created for a specific destination branch, but all the values i get for the {{pullRequest}} smart values are empty, so no trigger and the msg is actually empty

(the notification in teams works fine)

 

rule configuration I tried:
jql to filter key=XXXX (one that i know has a pull request, and i can see it in jira)

send teams msg with info:

{{pullRequest.destinationBranch.url}}

{{pullRequest.destinationBranch.repository.name}}

{{pullRequest.destinationBranch.repository.url}}

{{pullRequest.createdDate}}

{{pullRequest.state}}

{{pullRequest.url}}

 

{{pullRequest.destinationBranch}}

 

the msg is sent but the info is empty

 

any idea what im doing wrong?

 

1 answer

2 votes
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2024

Hi @Emily Pinhasi 

Can you add a screen shot of your automation rule's trigger and the action that you've mentioned.

As per https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/

These smart values are only available for the Pull request created, Pull request declined and Pull request merged triggers

Also, to debug is a certain value is present would recommend using the 'Log Action' action to see if thr smart value actually has a value or not.

Emily Pinhasi
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!
July 5, 2024

tries the log-action, same result - empty values

my trigger at the moment is a scheduled trigger, where the jql: key=<my issue that has pull request merged>, and i trigger it manually from "run rule"

 

the log-action:

{{pullRequest.destinationBranch}}  {{pullRequest.destinationBranch.url}}  {{pullRequest.destinationBranch.repository.name}}  {{pullRequest.destinationBranch.repository.url}} {{pullRequest.createdDate}}  {{pullRequest.state}} {{pullRequest.url}}

 

and in the log i get empty msg.

 

image.png

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2024

Thanks for the image @Emily Pinhasi 

You will have to update your automation trigger as  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/

Try setting it to Pull request created, Pull request declined and Pull request merged and then retry please.

Emily Pinhasi
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!
July 5, 2024

oh I see the problem, thank you very much

 

changed my trigger, waiting for someone to merge a pullrequest :) 

Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 5, 2024

Great,

If the automation works after the change, please mark this thread as Accepted, so that it's more visible to the rest of the community

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events