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 votes
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
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

53 views 0 2
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