The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
  • Community
  • Q&A
  • Jira
  • Questions
  • Is it possible to have issues transition to different statuses on create, depending on what priority level is entered?

Is it possible to have issues transition to different statuses on create, depending on what priority level is entered?

MorganT
Contributor
March 2, 2016

I would like to issues to transition to different statuses on creation (e.g, to 'open' or 'input queue') depending on the priority level that was entered in the creation screen. I imagine this should be doable with a post-function or validator but am not sure exactly how to make it happen.

Alternatively, if Script Runner is a better option, could anyone point me in the right direction in terms of what code to use?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Boris Georgiev [Appfire]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 2, 2016

You can add a post-function on the Create transition which will execute another transition based on the priority value. Check this Script Runner sample - I think it does exactly what you need  - https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_fast_track_transition_an_issue

MorganT
Contributor
April 8, 2016

Hi Boris - thank you for your answer. It was useful but I never got it working because the workflow I wanted to apply the post function to is shared by various projects and I was afraid I'd interfere with them. I've only just come back to it and realised that if I include the project key of the project I want to apply it to in the condition, it could be ok.

My problem now is that I don't speak Groovy. My attempt of:

(issue.getProjectObject().getKey() = "TSUPP") && (issue.priority?.name == 'High'||'Emergency')

 

In the condition field hasn't worked for me. Any ideas on how to express this?

TAGS
AUG Leaders

Atlassian Community Events