transition an issue based on value of Assignee field

Tomas Arguinzones Yahoo December 14, 2016

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
Answer accepted
Steven F Behnke
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 Leaders.
December 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
Tomas Arguinzones Yahoo December 14, 2016

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

Thanks again

Steven F Behnke
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 Leaders.
December 15, 2016

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

Tomas Arguinzones Yahoo December 15, 2016

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 F Behnke
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 Leaders.
December 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.

Tomas Arguinzones Yahoo December 15, 2016

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

0 votes
AVINASH KUMAR November 14, 2018

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