transition an issue based on value of Assignee field

Hi...I have a simple workflow with only two statuses: Available and Loaned....I want to make sure that once the issue is created, if the user assigns the issue to someone, the status of the issue goes to Loaned. Is there a way to accomplish that in scriptrunner or any other plugin? Users are creating issues, then assigning them to someone but if they dont manually transition the issue to Loaned, then the issue will remain as Available with the Assigneed field populated and that is creating a lot of confusion.

 

Thanks

1 answer

1 accepted

0 vote
Steven Behnke Community Champion Dec 14, 2016

You can accomplish this with a ScriptRunner Listener, but you'd need to write the JAVA/Groovy code.

You should be able to accomplish this with JIRA Automation Plugin too. This is FREE for JIRA Server. https://marketplace.atlassian.com/plugins/com.atlassian.plugin.automation.jira-automation-plugin/server/overview

  1. Navigate to Administration → Add-ons → Automation – 
    image2016-12-14 14:19:31.png

  2. Click + Add Rule – 
    image2016-12-14 14:18:58.png

  3. Name the rule and give it a useraccount to operate under – 
    image2016-12-14 14:23:10.png

  4. Make sure the rule is triggered by the Assigned event. You can limit the rule to a certain project with a JQL expression, and in this case I want it performed synchronously. 
    image2016-12-14 14:24:36.png

  5. Add your transition issue command to the rule – 
    image2016-12-14 14:27:13.png

  6. Save and enable the Rule! smile

Hi Steven...thank you very much for your assistance. That works great!

Thanks again

Steven Behnke Community Champion Dec 15, 2016

Thanks for the feedback! That's great to hear! Good luck smile

Hi Steven...did you notice that that doesnt work when editing the Assignee field in the People section with inline editing?

It works with the Assign button and when clicking Assign to me but if you use inline editing and assign the issue to a person there, the rule does not execute. It seems there is a bug with the Automation plugin because I went to Atlassian labs' bit bucket and a ticket has been already created since 2015 for the same bug and another user recently had the same problem with the latest version of the automation plugin (the one I am using as well, 2.0.3)

Steven Behnke Community Champion Dec 15, 2016

I assumed that inline editing the Assignee field would fire the Issue Assigned event. 

Perhaps you can change the Trigger Events to "Issue Assigned" and "Issue Updated", and then change the JQL query to filter for assignee is not EMPTY.

Hi Steven...that made the trick...thanks a lot for your help man!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

754 views 2 19
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you