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

Use ScriptRunner to update Jira ticket fix version

Scarlett Jones September 10, 2024

Is it possible to use ScriptRunner to update a related Jira ticket's fix version after a PR is merged?

I guess that would be triggered on a post hook, filtering for pushes to certain types of branches, or maybe a Listener for event PullRequestMergedEvent.

 

I see there is a suggested custom listener for updating all related Jira issues when a PR is opened here: 

https://docs.adaptavist.com/sr4bib/8.34.0/features/listeners/custom-listeners#update-all-related-jira-issues-when-pull-request-opened

 

Is it possible to modify that script to update the fix version (based on the contents in one of the files in the repo; a property) on all related Jira issues only when a PR is merged? A comment at the same time would be helpful as well.

 

It looks like it should be possible, since it appears to be just executing an API call to Jira. So should any supported API call for Jira be able to be ran here?

 

Also, if we have more than one Jira application link setup, is there anyway to specify which one to use based on some condition? Other than it just always assuming it should use the primary one. Or can it try both until one is successful?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events