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!
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hopefully you can use that to solve your problem!
Cheers
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.