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

2 answers

1 accepted

0 votes
Accepted answer
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!

0 votes

project = "Core JDX" AND issuetype in standardIssueTypes() AND Sprint in openSprints() AND status changed from "Code Review" to "Ready for Testing"  AND assignee in (umakant.b, jedidiah.j, sathishkumar.d, subbiah.s)

 

Try this.. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,637 views 18 21
Read article

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