Why Listeners does not work?

Alex
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.
June 17, 2022

Hi! I am writing a condition but, for some reason, the code does not work ..

Task : 
When using the "Customer expectation" button, the ticket is transferred to the status "waiting".

It is necessary to make it so that when a user writes a comment in a ticket, the ticket changes its status to "open".

If a user with the "developers" role in the "1F" project writes to the ticket, then we leave the ticket in the waiting status.

 

My code :

import com.atlassian.jira.component.ComponentAccessor

!isUserMemberOfRole('Developers')

def workflow = ComponentAccessor.getWorkflowManager().getWorkflow(issue)

def wfd = workflow.getDescriptor()

def actionName = wfd.getAction(transientVars["actionId"]).getName()

if (actionName == "Customer expectation"){

     true
}

фцыва (1).pngВВ (1).pngЙЦВЙЦ (1).png

0 answers

Suggest an answer

Log in or Sign up to answer