Auto Transition based on commenters

Hi,
I'm asking about issue status auto transition based on commenters

i.e. if the assignee replied to issue "or one from assignees group" the issue status should be waiting for customer response

Thanks

3 answers

Hi,

You can use script runner's "Fast-track transition an issue" listener by selecting Issue Commented Event and writing Additional Conditions

You can find further info on https://jamieechlin.atlassian.net/wiki/display/GRV/Listeners

0 vote
Bryan Trummer Community Champion Apr 15, 2014

So you are wanting the issue to move to waiting for customer response depending on who the commenter is?

import com.opensymphony.workflow.WorkflowContext

import com.atlassian.jira.issue.Issue

import com.atlassian.jira.ComponentManager

import com.atlassian.jira.event.issue.AbstractIssueEventListener

import com.atlassian.jira.event.issue.IssueEvent

import org.apache.log4j.Logger

import static org.apache.log4j.Level.DEBUG

import com.atlassian.jira.bc.issue.IssueService.UpdateValidationResult

import com.atlassian.jira.bc.issue.IssueService.IssueResult

import com.atlassian.jira.bc.issue.IssueService

import com.atlassian.jira.bc.issue.IssueService.TransitionValidationResult

import com.atlassian.jira.issue.IssueInputParametersImpl

import com.atlassian.jira.issue.IssueInputParameters

import com.atlassian.jira.util.ErrorCollection

import com.atlassian.jira.issue.index.IssueIndexManager

class invoketransition extends AbstractIssueEventListener {

Logger log = Logger.getLogger(invoketransition.class)

@Override

void issueUpdated (IssueEvent event) {

//add your code to get the user who has commentted, assignee and all usernames from assignment group and add the condition

Issue issue = event.getIssue();

def issuestatus = issue.getStatusObject().getName().toUpperCase()

actionid = 123 //action id for transition to reach to status waiting for customer

ComponentManager componentManager = ComponentManager.getInstance()

IssueService issueService = ComponentManager.getInstance().getIssueService()

IssueInputParameters issueInputParameters = issueService.newIssueInputParameters()

TransitionValidationResult validationResult = issueService.validateTransition(user, issue.id, actionid, issueInputParameters)

issueService.transition(user, validationResult)

}

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

84 views 0 5
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