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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Copy {{pullrequest.url}} from triggerIssue to linked issue Custom Field

Hi, 

I'm trying to copy {{pullrequest.url}} from triggerIssue to it's linked issue custom field and it doesn't work as of now. Can you advice how to do that?

I've found information that this smart value can only be used with Pull request created trigger, but was unsuccessful to use with it , because linked issue can be created any time (even before PR is created) and I need PR link to be copied. 

Please advice how can I get to that and thank you!

2 answers

1 vote
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 26, 2023

Hi @Shushan Kocharyan 

Unfortunately this isn't possible using the issue smart value like your rule is using. This is because the issue fields do not contain the full pull request information, hence why the `pullrequest` smart value is only available to the relevant triggers.

You can see the full data the issue fields has access to by hitting <your_domain>/rest/api/3/issue/<issue_key>, where you can see that the pull request custom field only contains meta data about the pr, and not details such as the url

Cheers
Sam

thanks for answer Sam. No way to get PR url? May I do that using scriptrunner or it'll not work as well?

Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 29, 2023

I am personally not too familiar with Scriptrunner's capabilities, but I believe it should be doable. There is rest API endpoints to fetch the PR data from Jira which you can access with Scriptrunner 

See https://community.atlassian.com/t5/Jira-questions/JIRA-REST-API-to-get-list-of-branches-related-to-a-issue/qaq-p/800389

Hopefully you can use that to solve your problem!

Cheers
Sam

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events