Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Workflow post function to set resolution only if triggered by specific trigger

Hi guys,


I have a little specific case, that I want to think is actually quite common but still cannot automate. 


So setup is Cloud Jira + Cloud Bitbucket. I have setup workflow transition triggers so that once a PR is merged I resolve the ticket. 


The thing is I cannot make it so that on resolving the ticket it sets a resolution "Done" and I end up with status resolved without setting the resolution.


If I just implement Post function to set this to Done, then it will get resolution Done regardless if triggered by the "PR is merged" trigger or if I manually modify the ticket.


How would you suggest I approach this case.


Help much appreciated.



1 answer

1 accepted

0 votes
Answer accepted

Hi @Julian Davchev ,

Jira natively does not have a conditional option that can be set based on a trigger event, and there is some discussion on the same use case recommending the third party tool ScriptRunner as an option to accomplish this in the following thread, However the method described is one of the apps built in scripts, that I cannot verify wether it exists in the tool or not so it may not be avaliable on the Cloud version as discussed in "Why are built in scripts in ScriptRunner for Jira Cloud limited" , the post can be seen at the following link and would be one option to look into if the function is also avaliable in the Cloud version:

But for your noted use case a native option that might work out via the workflow would be to set up a two different transitions to the done status, one to be used by the trigger including the post function setting the resolution, and the other used when manually transiting in the instance so that a Resolution can be set manually.  Then on the transition used by your trigger set up the "Hide From User Condition" (Additional details on avaliable conditions can be seen in "Advanced workflow configuration: Conditions" )  So that the Transition is not avaliable to anyone on the front end but is still avaliable to the trigger in the backend as this condition can still be triggered from a workflow function or from REST calls.


That is some awesome advice Earl! Thanks a lot for the hint!

Like Earl McCutcheon likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

158 views 1 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you