Status is not updated after performing transitionResult = issueService.transition(currentUser, transitionValidationResult) - jira
I would like an issue to be automatically transitioned from the following statuses:
From Open to Fixed
From Fixed to Tested
From Tested to Completed
The problem is that the status of my issue does not get updated even after executing the line
def transitionResult = issueService.transition(currentUser, transitionValidationResult)
The log.warn statement still shows the issue OPEN all the time even after executing issueService.transition, this is weird because this status should be changed to "Fixed", then "Tested" and then "Completed". I should be updated and should not always be "Opened". For example, here is what gets printed after performing the issueService.transition statement:
2022-08-13 00:54:54,877+0200 https-openssl-nio-443-exec-14 WARN mouh 54x25796x1 1uq4h23 10.248.75.214 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA 13 IssueConstantImpl[[GenericEntity:Status][sequence,4][statuscategory,4][name,Open][iconurl,/images/icons/statuses/open.png][description,null][id,1]]
Here is my code below. Is there anything I am doing wrong?
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.Issue;
import java.util.HashMap;
import java.util.List;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.workflow.JiraWorkflow
import com.atlassian.jira.workflow.WorkflowManager
import org.apache.log4j.Logger
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.changehistory.ChangeHistoryItem
import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.issue.IssueInputParametersImpl
import com.atlassian.jira.bc.issue.IssueService.IssueValidationResult
import com.atlassian.jira.user.ApplicationUser
def log = Logger.getLogger("atlassian-jira.log")
if (issue.getStatus().getSimpleStatus().getId().equals("1")) {
log.warn("MOUNA 1");
int transitionFromOpentoFixed = 71;
int transitionFromFixedToTested = 111;
int transitionFromTestedToCompleted = 131;
log.warn("MOUNA 100 transitionFromOpentoFixed " + issue.getStatus());
transition(transitionFromOpentoFixed);
log.warn("MOUNA 101 transitionFromFixedToTested " + issue.getStatus());
transition(transitionFromFixedToTested);
log.warn("MOUNA 102 transitionFromTestedToCompleted " + issue.getStatus());
transition(transitionFromTestedToCompleted);
}
void transition(int transitionToBeDone) {
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
log.warn("MOUNA 5 STATUS " + issue.getStatus());
log.warn("MOUNA 6 ");
String issueKey = issue.getKey()
log.warn("MOUNA 7 ");
IssueService issueService = ComponentAccessor.getIssueService()
log.warn("MOUNA 8");
def transitionValidationResult
log.warn("MOUNA 9 ");
def issueInputParameters = issueService.newIssueInputParameters()
transitionValidationResult = issueService.validateTransition(currentUser, issue.id, transitionToBeDone, issueInputParameters)
log.warn("MOUNA 10");
if (transitionValidationResult.isValid()) {
log.warn("MOUNA 11 transition is valid");
def transitionResult = issueService.transition(currentUser, transitionValidationResult)
log.warn("MOUNA 12 ");
if (transitionResult.isValid()) {
log.warn("MOUNA 13 " + issue.getStatus());
} else {
log.warn("MOUNA 14 transitionResult not valid");
}
}
}
I found the problem and here is my solution, I needed to reload the issue inside the transition function and also set a comment.
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.Issue;
import java.util.HashMap;
import java.util.List;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.workflow.JiraWorkflow
import com.atlassian.jira.workflow.WorkflowManager
import org.apache.log4j.Logger
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.changehistory.ChangeHistoryItem
import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.issue.IssueInputParametersImpl
import com.atlassian.jira.bc.issue.IssueService.IssueValidationResult
import com.atlassian.jira.user.ApplicationUser
def log = Logger.getLogger("atlassian-jira.log")
if (issue.getStatus().getSimpleStatus().getId().equals("1")) {
log.warn("MOUNA 1");
int transitionFromOpentoFixed = 71;
int transitionFromFixedToTested = 111;
int transitionFromTestedToCompleted = 131;
log.warn("MOUNA 100 transitionFromOpentoFixed " + issue.getStatus());
transition(transitionFromOpentoFixed, "Fixed");
log.warn("MOUNA 101 transitionFromFixedToTested " + issue.getStatus());
transition(transitionFromFixedToTested, "Tested");
log.warn("MOUNA 102 transitionFromTestedToCompleted " + issue.getStatus());
transition(transitionFromTestedToCompleted, "Completed");
}
void transition(int transitionToBeDone, String destinationStatus) {
issue = ComponentAccessor.getIssueManager().getIssueObject(issue.id)
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
log.warn("MOUNA 5 STATUS " + issue.getStatus());
log.warn("MOUNA 6 ");
String issueKey = issue.getKey()
log.warn("MOUNA 7 ");
IssueService issueService = ComponentAccessor.getIssueService()
log.warn("MOUNA 8");
log.warn("MOUNA 9 ");
def issueInputParameters = issueService.newIssueInputParameters()
issueInputParameters.setComment("Transitioning issue from status "+ issue.getStatus().getName()+" to status "+ destinationStatus );
transitionValidationResult = issueService.validateTransition(currentUser, issue.id, transitionToBeDone, issueInputParameters)
log.warn("MOUNA 10");
if (transitionValidationResult.isValid()) {
log.warn("MOUNA 11 transition is valid");
def transitionResult = issueService.transition(currentUser, transitionValidationResult)
log.warn("MOUNA 12 ");
if (transitionResult.isValid()) {
log.warn("MOUNA 13 " + issue.getStatus());
} else {
log.warn("MOUNA 14 transitionResult not valid");
}
}
}
Related
How to display error message from progressErrorCollection.getErrors().toString() in Jira screen, scriptrunner postfunction
I have an error message that is thrown when I try to execute a postfunction, the error message is: org.ofbiz.core.entity.GenericTransactionException: Commit failed, rollback previously requested by nested transaction. You can see the error message in this screenshot: In my code, I am using the line : log.warn("MOUNA here 2 "+progressErrorCollection.getErrors().toString()) which is displaying a more meaninful message to the user which is: fixVersions:Fix Version/s is required. I would like to print this message instead to the user instead of org.ofbiz.core.entity.GenericTransactionException: Commit failed, rollback previously requested by nested transaction. How can I enforce this? I have tried using UserMessageUtil.error(progressErrorCollection.getErrors().toString()) but it is not working. Anyone knows? Here is my code below: package CombineTransitions import com.onresolve.scriptrunner.runner.util.UserMessageUtil import com.atlassian.jira.issue.Issue; import org.apache.log4j.Logger import com.atlassian.jira.bc.issue.IssueService import com.atlassian.jira.issue.Issue; import CombineTransitions.Configuration_CombineTransitions import com.atlassian.jira.bc.issue.IssueService.IssueResult import com.atlassian.jira.bc.issue.IssueService.TransitionValidationResult import com.atlassian.jira.event.type.EventDispatchOption import java.util.concurrent.TimeUnit import java.util.concurrent.ScheduledExecutorService import java.util.concurrent.Executors import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.workflow.WorkflowTransitionUtil import com.opensymphony.workflow.WorkflowContext; import com.atlassian.jira.workflow.WorkflowTransitionUtilImpl; import com.atlassian.jira.util.JiraUtils; import com.atlassian.jira.issue.MutableIssue; import com.atlassian.jira.util.ErrorCollection import com.atlassian.jira.workflow.WorkflowException def log1 = Logger.getLogger("atlassian-jira.log") def combineTransitionsHashMap= Configuration_CombineTransitions.getCombineTransitionsHashMap() def issueStatusTypeId = combineTransitionsHashMap["issueStatusTypeId"] as String; def transitionFromOpentoFixed = combineTransitionsHashMap["transitionFromOpentoFixed"] as Integer; def transitionFromFixedToTested = combineTransitionsHashMap["transitionFromFixedToTested"] as Integer; def transitionFromTestedToCompleted = combineTransitionsHashMap["transitionFromTestedToCompleted"] as Integer; def fixedStatusName = combineTransitionsHashMap["fixedStatusName"] as String; def testedStatusName = combineTransitionsHashMap["testedStatusName"] as String; def completedStatusName = combineTransitionsHashMap["completedStatusName"] as String; def fixedStatusId = combineTransitionsHashMap["fixedStatusId"] as String; def testedStatusId = combineTransitionsHashMap["testedStatusId"] as String; def completedStatusId = combineTransitionsHashMap["completedStatusId"] as String; if (issue.getStatus().getSimpleStatus().getId().equals(issueStatusTypeId)) { def ok = false ok=performTransition(transitionFromOpentoFixed, fixedStatusName, fixedStatusId); log.warn("MOUNA first boolean "+ok +" "+fixedStatusName) if(ok){ ok= performTransition(transitionFromFixedToTested, testedStatusName, testedStatusId); log.warn("MOUNA second boolean "+ok +" "+testedStatusName) if(ok){ ok= performTransition(transitionFromTestedToCompleted, completedStatusName, completedStatusId); log.warn("MOUNA third boolean "+ok +" "+completedStatusName) } } } def performTransition(int transitionToBeDone, String destinationStatus, String statusId ) { log.warn("MOUNA ORIGINAL STATUS "+ issue.getStatus() + "DEST STATUS "+ destinationStatus) issue = ComponentAccessor.getIssueManager().getIssueObject(issue.id) def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() String issueKey = issue.getKey() IssueService issueService = ComponentAccessor.getIssueService() def issueInputParameters = issueService.newIssueInputParameters() issueInputParameters.setComment("Transitioning issue from status "+ issue.getStatus().getName()+" to status "+ destinationStatus ); WorkflowTransitionUtil workflowTransitionUtil = (WorkflowTransitionUtil) JiraUtils.loadComponent(WorkflowTransitionUtilImpl.class) workflowTransitionUtil.setIssue(issue) workflowTransitionUtil.setAction(transitionToBeDone) ErrorCollection errorCollection=workflowTransitionUtil.validate() if (errorCollection.hasAnyErrors()) { log.warn("MOUNA here 1 "+errorCollection.getErrorMessages().toString()) return false; }else{ ErrorCollection progressErrorCollection=workflowTransitionUtil.progress() if(progressErrorCollection.hasAnyErrors()){ log.warn("MOUNA here 2 "+progressErrorCollection.getErrors().toString()) // throw new WorkflowException(progressErrorCollection.getErrors().toString()); UserMessageUtil.error(progressErrorCollection.getErrors().toString()) return false; }else{ return true; } } }
Postfunction enforce 3 transitions back to back , 2nd transition is not working
I am trying to write some postfunction to execute some transitions back to back. I get the following error message when I click on the menu item for executing the 3 transitions back to back. I am supposed to transition from open to fixed, then from fixed to tested and from tested to completed. The first transition works as expected but the second one is not working, I don't really know why, I have tried printing the list of error or warning messages but they are both empty. Anyone knows what the problem is? Here is my code: package CombineTransitions import com.atlassian.jira.issue.Issue; import org.apache.log4j.Logger import com.atlassian.jira.bc.issue.IssueService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue; import CombineTransitions.Configuration_CombineTransitions import com.atlassian.jira.bc.issue.IssueService.IssueResult import com.atlassian.jira.bc.issue.IssueService.TransitionValidationResult def log1 = Logger.getLogger("atlassian-jira.log") def combineTransitionsHashMap= Configuration_CombineTransitions.getCombineTransitionsHashMap() def issueStatusTypeId = combineTransitionsHashMap["issueStatusTypeId"] as String; def transitionFromOpentoFixed = combineTransitionsHashMap["transitionFromOpentoFixed"] as Integer; def transitionFromFixedToTested = combineTransitionsHashMap["transitionFromFixedToTested"] as Integer; def transitionFromTestedToCompleted = combineTransitionsHashMap["transitionFromTestedToCompleted"] as Integer; def fixedStatusName = combineTransitionsHashMap["fixedStatusName"] as String; def testedStatusName = combineTransitionsHashMap["testedStatusName"] as String; def completedStatusName = combineTransitionsHashMap["completedStatusName"] as String; def fixedStatusId = combineTransitionsHashMap["fixedStatusId"] as String; def testedStatusId = combineTransitionsHashMap["testedStatusId"] as String; def completedStatusId = combineTransitionsHashMap["completedStatusId"] as String; if (issue.getStatus().getSimpleStatus().getId().equals(issueStatusTypeId)) { def ok = false ok=performTransition(transitionFromOpentoFixed, fixedStatusName, fixedStatusId); log.warn("MOUNA first boolean "+ok +" "+fixedStatusName) if(ok){ ok= performTransition(transitionFromFixedToTested, testedStatusName, testedStatusId); log.warn("MOUNA second boolean "+ok +" "+testedStatusName) if(ok){ ok= performTransition(transitionFromTestedToCompleted, completedStatusName, completedStatusId); log.warn("MOUNA third boolean "+ok +" "+completedStatusName) } } } def performTransition(int transitionToBeDone, String destinationStatus, String statusId ) { log.warn("MOUNA ORIGINAL STATUS "+ issue.getStatus() + "DEST STATUS "+ destinationStatus) issue = ComponentAccessor.getIssueManager().getIssueObject(issue.id) def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() String issueKey = issue.getKey() IssueService issueService = ComponentAccessor.getIssueService() def issueInputParameters = issueService.newIssueInputParameters() issueInputParameters.setComment("Transitioning issue from status "+ issue.getStatus().getName()+" to status "+ destinationStatus ); TransitionValidationResult transitionValidationResult = issueService.validateTransition(currentUser, issue.id, transitionToBeDone, issueInputParameters) log.warn("MOUNA transitionValidationResult: "+transitionValidationResult + " actionID "+transitionValidationResult.getActionId()+" transitionValidationResult.getAdditionInputs() "+transitionValidationResult.getAdditionInputs()+" transitionValidationResult.getFieldValuesHolder().toString() "+ transitionValidationResult.getFieldValuesHolder().toString() ) if (transitionValidationResult.isValid()) { IssueResult transitionResult = issueService.transition(currentUser, transitionValidationResult) issue.setStatusId(statusId) log.warn("MOUNA STATUS "+ transitionResult.getIssue().getStatus().getName()) return true }else{ log.warn("MOUNA 2 getErrorCollection() "+transitionValidationResult.getErrorCollection() ) log.warn("MOUNA 3 getWarningCollection() "+transitionValidationResult.getWarningCollection().getWarnings().toString() ) // log.warn("MOUNA 4 "+issue.getStatus().getName() +" transitionToBeDone "+ transitionToBeDone +" destinationStatus "+destinationStatus) return false } } This is my log file where I am printing some values for debugging: 2022-12-22 10:32:27,239+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA second boolean false Tested 2022-12-22 10:32:27,239+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA 3 getWarningCollection() [] 2022-12-22 10:32:27,239+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA 2 getErrorCollection() Errors: {} 2022-12-22 10:32:27,239+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA transitionValidationResult: com.atlassian.jira.bc.issue.IssueService$TransitionValidationResult#5325f11e actionID 111 transitionValidationResult.getAdditionInputs() null transitionValidationResult.getFieldValuesHolder().toString() [formToken:null] 2022-12-22 10:32:27,223+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA ORIGINAL STATUS IssueConstantImpl[[GenericEntity:Status][sequence,8][statuscategory,4][name,Fixed][iconurl,/images/icons/status_fixed-sag.gif][description,][id,10001]]DEST STATUS Tested 2022-12-22 10:32:27,223+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA first boolean true Fixed 2022-12-22 10:32:27,223+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA STATUS Open 2022-12-22 10:32:26,457+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA transitionValidationResult: com.atlassian.jira.bc.issue.IssueService$TransitionValidationResult#294cb9b9 actionID 71 transitionValidationResult.getAdditionInputs() [commentProperty:null, originalAssigneeId:JIRAUSER59200, comment:Transitioning issue from status Open to status Fixed, roleLevel:null, commentLevel:null, userKey:JIRAUSER59200] transitionValidationResult.getFieldValuesHolder().toString() [fixVersions:[], customfield_10298:CustomFieldParams: Readme Text. Params: {null=[]}., customfield_10002:CustomFieldParams: QA/QE Owner. Params: {null=[]}., customfield_10211:CustomFieldParams: Phase Missed. Params: {null=[]}., customfield_10531:CustomFieldParams: Fix Build. Params: {null=[]}., customfield_10215:CustomFieldParams: Test Steps. Params: {null=[]}., customfield_10217:CustomFieldParams: Source Control Ref.. Params: {null=[]}., formToken:null, customfield_10219:CustomFieldParams: Solution Description. Params: {null=[bm]}., customfield_19380:CustomFieldParams: Related Product Standard. Params: {null=[]}., comment:[levelPresent:true, comment:Transitioning issue from status Open to status Fixed, groupLevel:null, roleLevel:null], worklog:com.atlassian.jira.issue.fields.WorklogSystemField$WorklogValue$Builder$1#3ea48487, assignee:mouh] 2022-12-22 10:32:26,426+0100 https-openssl-nio-443-exec-3 WARN mouh 632x4183x1 jj2112 10.248.75.15 /secure/CommentAssignIssue.jspa [c.o.scriptrunner.runner.ScriptBindingsManager] MOUNA ORIGINAL STATUS IssueConstantImpl[[GenericEntity:Status][sequence,4][statuscategory,4][name,Open][iconurl,/images/icons/statuses/open.png][description,null][id,1]]DEST STATUS Fixed
Cannot transition to another status in Jira Custom script post-function
I am using a Custom script post-function [ScriptRunner] that is triggered after clicking on the transition "MounaCompleted" located in my menu item (last item in the menu). I am using the following code to transition an issue after clicking on the "Completed" menu item. Initially, my issue is in the status "Open" and I would like to transition my issue from "Open" to "Fixed". I am using the following code which does not work. My problem is that if (validationResult.isValid()) evaluates to false and I end up printing Failed to transition subtask 7 com.atlassian.jira.bc.issue.IssueService$TransitionValidationResult#105aff4d import com.atlassian.jira.issue.Issue; import com.atlassian.jira.workflow.WorkflowManager import org.apache.log4j.Logger import com.atlassian.jira.component.ComponentAccessor def log = Logger.getLogger("atlassian-jira.log") log.warn("This is the last action ") WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager(); def issueService = ComponentAccessor.getIssueService() def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() if (issue.status.name == "Open") { log.warn("Failed to transition subtask 1"+issue.status.name) def issueInputParameters = issueService.newIssueInputParameters() issueInputParameters.with { log.warn("Failed to transition subtask 2") setResolutionId("10001") // resolution of "Fixed" setComment("*Resolving* as a result of the *Resolve* action being applied to the parent.") setSkipScreenCheck(true) } // validate and transition subtask log.warn("Failed to transition subtask 10 "+ user+" "+ issue.getId()+" "+ 10001+" "+ issueInputParameters) def validationResult = null try{ validationResult = issueService.validateTransition(user, issue.getId(), 10001, issueInputParameters) } catch(Exception e){ log.warn("Failed to transition subtask 3 "+e) } if (validationResult.isValid()) { def issueResult = issueService.transition(user, validationResult) log.warn("Failed to transition subtask 4") if (!issueResult.isValid()) { log.warn("Failed to transition subtask 5") log.warn("Failed to transition subtask ${issue.getId()}, errors: ${issueResult.errorCollection}") }else{ log.warn("Failed to transition subtask 6") log.warn("success") } } else { log.warn("Failed to transition subtask 7 "+validationResult) log.warn("Could not transition subtask ${issue.getId()}, errors: ${validationResult.errorCollection}") } }else { log.warn("Failed to transition subtask 8") log.warn("Failed to transition subtask ") log.warn("Failed to transition subtask3333 "+issue.getId()) }
import com.atlassian.jira.user.ApplicationUser import com.atlassian.jira.issue.MutableIssue; import com.atlassian.jira.issue.Issue; import java.util.HashMap; import java.util.List; import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.workflow.JiraWorkflow import com.atlassian.jira.workflow.WorkflowManager import org.apache.log4j.Logger import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.changehistory.ChangeHistoryItem import com.atlassian.jira.bc.issue.IssueService import com.atlassian.jira.issue.IssueInputParametersImpl import com.atlassian.jira.bc.issue.IssueService.IssueValidationResult import com.atlassian.jira.user.ApplicationUser import com.opensymphony.module.propertyset.PropertySet; import com.opensymphony.workflow.WorkflowException; import com.opensymphony.workflow.loader.ActionDescriptor; import com.opensymphony.workflow.loader.StepDescriptor; import com.opensymphony.workflow.spi.SimpleStep; import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.config.ConstantsManager def log = Logger.getLogger("atlassian-jira.log") if (issue.getStatus().getSimpleStatus().getId().equals("1")) { log.warn("MOUNA 1"); int transitionFromOpentoFixed = 71; int transitionFromFixedToTested = 111; int transitionFromTestedToCompleted = 131; log.warn("MOUNA 100 transitionFromOpentoFixed " + issue.getStatus()); transition(transitionFromOpentoFixed, "Fixed"); log.warn("MOUNA 101 transitionFromFixedToTested " + issue.getStatus()); transition(transitionFromFixedToTested, "Tested"); log.warn("MOUNA 102 transitionFromTestedToCompleted " + issue.getStatus()); transition(transitionFromTestedToCompleted, "Completed"); } void transition(int transitionToBeDone, String destinationStatus) { issue = ComponentAccessor.getIssueManager().getIssueObject(issue.id) def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() log.warn("MOUNA 5 STATUS " + issue.getStatus()); log.warn("MOUNA 6 "); String issueKey = issue.getKey() log.warn("MOUNA 7 "); IssueService issueService = ComponentAccessor.getIssueService() log.warn("MOUNA 8"); log.warn("MOUNA 9 "); def issueInputParameters = issueService.newIssueInputParameters() issueInputParameters.setComment("Transitioning issue from status "+ issue.getStatus().getName()+" to status "+ destinationStatus ); transitionValidationResult = issueService.validateTransition(currentUser, issue.id, transitionToBeDone, issueInputParameters) log.warn("MOUNA 10"); if (transitionValidationResult.isValid()) { log.warn("MOUNA 11 transition is valid"); def transitionResult = issueService.transition(currentUser, transitionValidationResult) log.warn("MOUNA 12 "); if (transitionResult.isValid()) { log.warn("MOUNA 13 " + issue.getStatus()); } else { log.warn("MOUNA 14 transitionResult not valid"); } } }
get the transition name in Jira listener
I am using use a listener in Jira to execute some code if a specific transition was made. I need to retrieve the transition name to only fire the event if the transition is called "MounaTransition". It seems that the following code is not working to get the transition name in the listener. import com.atlassian.jira.component.ComponentAccessor def workflow = ComponentAccessor.getWorkflowManager().getWorkflow(issue) def wfd = workflow.getDescriptor() def actionName = wfd.getAction(transientVars["actionId"] as int).getName() Here is the code I have written so far in my listener to try to do the same thing that I was doing with the custom post function before. Any idea on how to get the transition name/ID? I can only operate and execute my script if the tranition name matches the one I am interested in. import org.ofbiz.core.entity.GenericValue import com.opensymphony.workflow.WorkflowContext import com.atlassian.jira.issue.Issue; import java.util.List; import org.apache.log4j.Logger; import com.atlassian.jira.issue.ModifiedValue; import com.atlassian.jira.issue.fields.CustomField; import com.atlassian.jira.component.ComponentAccessor import org.ofbiz.core.entity.GenericDelegator; import com.atlassian.jira.issue.changehistory.ChangeHistoryManager; import com.atlassian.jira.issue.history.ChangeItemBean; import com.atlassian.jira.issue.comments.Comment import com.atlassian.jira.workflow.JiraWorkflow import com.atlassian.jira.workflow.WorkflowManager import com.atlassian.jira.issue.changehistory.ChangeHistoryItem import com.onresolve.scriptrunner.runner.util.UserMessageUtil import com.atlassian.jira.config.SubTaskManager import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.link.LinkCollectionImpl; import com.atlassian.jira.issue.link.IssueLink; import com.atlassian.crowd.embedded.api.User; import com.atlassian.jira.issue.comments.CommentManager; import com.atlassian.jira.issue.link.IssueLinkManager; import com.atlassian.jira.user.ApplicationUser; import com.atlassian.jira.util.ErrorCollection; import com.atlassian.jira.util.JiraUtils; import com.atlassian.jira.workflow.JiraWorkflow; import com.atlassian.jira.workflow.WorkflowManager; import com.atlassian.jira.workflow.WorkflowTransitionUtil; import com.atlassian.jira.workflow.WorkflowTransitionUtilImpl; import com.atlassian.jira.workflow.function.issue.AbstractJiraFunctionProvider; import com.opensymphony.module.propertyset.PropertySet; import com.opensymphony.workflow.WorkflowException; import com.opensymphony.workflow.loader.StepDescriptor; import com.opensymphony.workflow.spi.SimpleStep; import com.atlassian.jira.config.ConstantsManager import com.atlassian.jira.workflow.ImmutableWorkflowDescriptor import com.atlassian.jira.web.action.admin.workflow.ViewWorkflowStep import com.opensymphony.workflow.loader.ActionDescriptor import com.atlassian.jira.issue.IssueInputParametersImpl import com.atlassian.jira.issue.IssueInputParameters import com.atlassian.jira.bc.issue.IssueService.IssueValidationResult import com.atlassian.jira.user.ApplicationUser import com.atlassian.jira.workflow.WorkflowTransitionUtil import com.atlassian.jira.workflow.WorkflowTransitionUtilFactory import com.atlassian.jira.workflow.TransitionOptions import com.atlassian.jira.bc.issue.IssueService import com.atlassian.jira.bc.issue.IssueService.TransitionValidationResult import com.atlassian.event.Event import com.atlassian.jira.event.issue.AbstractIssueEventListener; import com.atlassian.jira.event.issue.IssueEvent; def log = Logger.getLogger("atlassian-jira.log") log.warn("This is the last action ") Issue issue = event.getIssue(); log.warn("CAM 0 ") log.warn("CAM 0.1 ") //Get worklflowname By actionId GenericValue changeLog = event.getChangeLog(); log.warn("HERE 1") List<GenericValue> changeItems = ComponentAccessor.getChangeHistoryManager().getAllChangeItems(issue) // changeItems = changeLog.internalDelegator.findByAnd("ChangeItem", fields); //changeItems = changeLog log.warn("HERE 5::: "+ changeItems) log.warn("MOUNA IS HERE AFTER HERE 5 " +changeItems.size()); log.warn("VALUES 1"); int lastIndex= changeItems.size()-1; log.warn("CAM 0.2") ChangeHistoryItem value= changeItems.get(lastIndex) as ChangeHistoryItem; def workflow = ComponentAccessor.getWorkflowManager().getWorkflow(issue) def wfd = workflow.getDescriptor() log.warn("GENERIC VALUE "+ transientVars["actionId"] +" "); def actionName = wfd.getAction(transientVars["actionId"] as int).getName() log.warn("GENERIC VALUE "+ actionName +" ");
Hmm. I know that the transition name is not recorded in the issue History, just the old and new status names and ids. But actionId is likely what you are looking for. I'm not sure why it is not returning anything for you.
Comment is not added in Jira issue although the transition is valid and successfully made
I am supposed to perform a transition in Jira and write a comment in an issue. Here is the code that I wrote in my script console for testing purposes below. The problem is that my transition is made as shown in the screenshot below but no comment gets added although I specified the comment in the input parameters through this line and my transition is valid and does not throw any errors. I do not want to use the CommentManager, the line below should be enough to add the comment without needing to resort to the commentManager. inputParameters.setComment(defectComment) import com.opensymphony.workflow.WorkflowContext import com.atlassian.jira.issue.MutableIssue; import com.atlassian.event.Event import java.util.HashMap; import java.util.List; import org.ofbiz.core.entity.GenericValue; import org.ofbiz.core.entity.GenericEntity; import com.atlassian.jira.event.issue.AbstractIssueEventListener; import com.atlassian.jira.event.issue.IssueEvent; import com.atlassian.jira.issue.ModifiedValue; import com.atlassian.jira.issue.fields.CustomField; import com.atlassian.jira.issue.util.DefaultIssueChangeHolder; import com.atlassian.jira.issue.util.IssueChangeHolder; import org.apache.log4j.Logger import com.atlassian.jira.component.ComponentAccessor import org.ofbiz.core.entity.GenericDelegator; import com.atlassian.jira.issue.changehistory.ChangeHistoryManager; import com.atlassian.jira.issue.history.ChangeItemBean; import com.atlassian.jira.issue.comments.Comment import com.atlassian.jira.issue.changehistory.ChangeHistoryItem import com.onresolve.scriptrunner.runner.util.UserMessageUtil import com.atlassian.jira.config.SubTaskManager import com.atlassian.jira.issue.Issue import groovy.xml.MarkupBuilder import com.atlassian.jira.config.properties.APKeys import com.atlassian.jira.issue.link.LinkCollectionImpl; import com.atlassian.jira.issue.link.IssueLink; import com.atlassian.crowd.embedded.api.User; import com.atlassian.jira.issue.comments.CommentManager; import com.atlassian.jira.issue.link.IssueLinkManager; import com.atlassian.jira.util.ErrorCollection; import com.atlassian.jira.util.JiraUtils; import com.atlassian.jira.workflow.JiraWorkflow; import com.atlassian.jira.workflow.WorkflowManager; import com.atlassian.jira.workflow.WorkflowTransitionUtil; import com.atlassian.jira.workflow.WorkflowTransitionUtilImpl; import com.atlassian.jira.workflow.function.issue.AbstractJiraFunctionProvider; import com.opensymphony.module.propertyset.PropertySet; import com.opensymphony.workflow.WorkflowException; import com.opensymphony.workflow.loader.StepDescriptor; import com.opensymphony.workflow.spi.SimpleStep; import com.atlassian.jira.config.ConstantsManager import com.atlassian.jira.workflow.ImmutableWorkflowDescriptor import com.atlassian.jira.web.action.admin.workflow.ViewWorkflowStep import com.opensymphony.workflow.loader.ActionDescriptor import com.atlassian.jira.bc.issue.IssueService import com.atlassian.jira.issue.IssueInputParametersImpl import com.atlassian.jira.bc.issue.IssueService.IssueValidationResult import com.atlassian.jira.user.ApplicationUser import com.atlassian.jira.workflow.WorkflowTransitionUtilFactory import com.atlassian.jira.workflow.TransitionOptions import com.atlassian.jira.issue.IssueInputParameters import com.atlassian.jira.bc.issue.IssueService.IssueResult def fix =ComponentAccessor.getIssueManager().getIssueByCurrentKey("NATMF-24873") def defect =ComponentAccessor.getIssueManager().getIssueByCurrentKey("NATMF-24890") PerformTransition(defect, "1081", fix ) void PerformTransition(Issue linkedissue, String transitionToBeDone, Issue sourceObject) { def defectComment = "Fix FIXSUMMARY[ISSUEKEY] has been released by USERNAME[USER]."; log.warn("CAM 1 " + transitionToBeDone+" LINKEDISSUE "+linkedissue+" sourceObject "+sourceObject) IssueService issueService = ComponentAccessor.getIssueService() log.warn("CAM 1 " + transitionToBeDone) ApplicationUser currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() log.warn("CAM 2") log.warn("CAM 3") int transitionToBeDoneInt = transitionToBeDone as Integer def constantsManager = ComponentAccessor.getConstantsManager() log.warn("CAM comment " + defectComment + " summary: " + sourceObject.getSummary()) defectComment = defectComment.replaceAll("FIXSUMMARY", sourceObject.getSummary()); log.warn("CAM comment 2" + defectComment) defectComment = defectComment.replaceAll("ISSUEKEY", sourceObject.getKey()).replaceAll("USERNAME", currentUser.getDisplayName()); log.warn("CAM comment 3" + defectComment) defectComment = defectComment.replaceAll("USER", currentUser.getName()); log.warn("CAM comment 4 " + defectComment) log.warn("CAM comment 5 " + defectComment) IssueInputParameters inputParameters = issueService.newIssueInputParameters() IssueInputParameters inputParameters2=inputParameters.setComment(defectComment) def userManager = ComponentAccessor.userManager def userKey = "itracfix" ApplicationUser user=ComponentAccessor.getUserManager().getUserByKey(userKey); def username=user.getUsername() IssueService.TransitionValidationResult result = issueService.validateTransition(currentUser, linkedissue.getId(), transitionToBeDoneInt, inputParameters2); log.warn("CAM 4 " + linkedissue.getKey()+ "=== "+ inputParameters2+"=== "+defectComment+"=== "+inputParameters2.getCommentValue()+"=== "+currentUser) log.warn("USER NAME MOUNA ") try { if (result.isValid()) { log.warn("CAM 5 " + defectComment+ " "+currentUser+" "+result.getAdditionInputs()+" "+result.getFieldValuesHolder() +" "+result.getErrorCollection() +" "+result.getWarningCollection()) IssueResult issueresult=issueService.transition(currentUser, result) log.warn("CAM 6 additional input " + result.getAdditionInputs()+" ") log.warn("CAM 6 getFieldValuesHolder "+result.getFieldValuesHolder() ) log.warn("CAM 6 getErrorCollection " +" "+issueresult.getErrorCollection() ) log.warn("CAM 6 getWarningCollection" +" "+issueresult.getWarningCollection().getWarnings()) }else{ log.warn("CAM 99 " ) } } catch (Exception e) { log.warn("CAM 7 " + e) log.warn(result.getErrorCollection().getErrors()); } } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// Here is a copy of my log file where I am printing all the log statements. Anyone knows the problem and what needs to be fixed? 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM 1 1081 LINKEDISSUE NATMF-24890 sourceObject NATMF-24873 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM 1 1081 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM 2 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM 3 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM comment Fix FIXSUMMARY[ISSUEKEY] has been released by USERNAME[USER]. summary: NDB_8.2_SP8 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM comment 2Fix NDB_8.2_SP8[ISSUEKEY] has been released by USERNAME[USER]. 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM comment 3Fix NDB_8.2_SP8[NATMF-24873] has been released by Hammoudi, Mouna[USER]. 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM comment 4 Fix NDB_8.2_SP8[NATMF-24873] has been released by Hammoudi, Mouna[mouh]. 2022-09-06 16:44:03,539 WARN [runner.ScriptBindingsManager]: CAM comment 5 Fix NDB_8.2_SP8[NATMF-24873] has been released by Hammoudi, Mouna[mouh]. 2022-09-06 16:44:03,961 WARN [runner.ScriptBindingsManager]: CAM 4 NATMF-24890=== com.atlassian.jira.issue.IssueInputParametersImpl#7750f7bc=== Fix NDB_8.2_SP8[NATMF-24873] has been released by Hammoudi, Mouna[mouh].=== Fix NDB_8.2_SP8[NATMF-24873] has been released by Hammoudi, Mouna[mouh].=== mouh(JIRAUSER59200) 2022-09-06 16:44:03,961 WARN [runner.ScriptBindingsManager]: USER NAME MOUNA 2022-09-06 16:44:03,961 WARN [runner.ScriptBindingsManager]: CAM 5 Fix NDB_8.2_SP8[NATMF-24873] has been released by Hammoudi, Mouna[mouh]. mouh(JIRAUSER59200) [originalAssigneeId:null, userKey:JIRAUSER59200] [formToken:null] Errors: {} Error Messages: [] com.atlassian.jira.util.SimpleWarningCollection#1 2022-09-06 16:44:03,977 WARN [listeners.UpdateListener4Features]: Checking issue type: Defect 2022-09-06 16:44:03,977 WARN [log.AutoDefaultsLogger]: Start Auto Defaults Listener 2022-09-06 16:44:03,977 WARN [log.AutoDefaultsLogger]: Issue = NATMF-24890 2022-09-06 16:44:03,977 WARN [log.AutoDefaultsLogger]: End Auto Defaults Listener 2022-09-06 16:44:03,977 WARN [workflow.WorkflowListener]: Start workflow listener 2022-09-06 16:44:03,977 WARN [workflow.WorkflowListenerUtils]: Event type 10022 is skipped 2022-09-06 16:44:03,977 WARN [workflow.WorkflowListenerUtils]: Event requires NO action 2022-09-06 16:44:03,977 WARN [workflow.WorkflowListener]: End workflow listener 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:ISSUE, total primary queue stats: {"maxQueueSize":13,"putCounter":14821,"queueFullOnPut":0,"getCounter":14820,"timeInQueueMillis":{"count":14820,"min":0,"max":172,"sum":4111,"avg":0,"distributionCounter":{"0":14672,"1":1,"10":0,"100":136,"1000":11,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":14820,"min":0,"max":134,"sum":12580,"avg":0,"distributionCounter":{"0":10639,"1":475,"10":3636,"50":64,"100":4,"500":2,"1000":0}},"totalTimeMillis":{"count":14820,"min":0,"max":656,"sum":35901,"avg":2,"distributionCounter":{"0":12931,"1":8,"10":4,"100":1855,"1000":22,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"https-openssl-nio-443-exec-16":914,"https-openssl-nio-443-exec-5":793,"https-openssl-nio-443-exec-13":750,"https-openssl-nio-443-exec-4":730,"https-openssl-nio-443-exec-15":728,"https-openssl-nio-443-exec-18":726,"https-openssl-nio-443-exec-1":679,"https-openssl-nio-443-exec-17":668,"https-openssl-nio-443-exec-10":602,"https-openssl-nio-443-exec-2":595},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:ISSUE, total secondary queue stats: {"maxQueueSize":1,"putCounter":2930,"queueFullOnPut":0,"getCounter":2930,"timeInQueueMillis":{"count":2930,"min":0,"max":31,"sum":282,"avg":0,"distributionCounter":{"0":2913,"1":0,"10":0,"100":17,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":2930,"min":0,"max":188,"sum":886,"avg":0,"distributionCounter":{"0":2353,"1":531,"10":44,"50":1,"100":0,"500":1,"1000":0}},"totalTimeMillis":{"count":2930,"min":0,"max":16006,"sum":263205,"avg":89,"distributionCounter":{"0":107,"1":1,"10":0,"100":2754,"1000":40,"10000":24,"20000":4,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"JiraTaskExecutionThread-1":1405,"JiraTaskExecutionThread-2":1405,"pool-60-thread-1":68,"Caesium-1-3":16,"Caesium-1-1":14,"Caesium-1-4":14,"Caesium-1-2":8},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:ISSUE, snapshot primary queue stats: {"maxQueueSize":1,"putCounter":6,"queueFullOnPut":0,"getCounter":6,"timeInQueueMillis":{"count":6,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"0":6,"1":0,"10":0,"100":0,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":6,"min":0,"max":3,"sum":8,"avg":1,"distributionCounter":{"0":3,"1":0,"10":3,"50":0,"100":0,"500":0,"1000":0}},"totalTimeMillis":{"count":6,"min":0,"max":16,"sum":32,"avg":5,"distributionCounter":{"0":4,"1":0,"10":0,"100":2,"1000":0,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"https-openssl-nio-443-exec-12":2,"https-openssl-nio-443-exec-15":2,"https-openssl-nio-443-exec-20":1,"https-openssl-nio-443-exec-6":1},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:ISSUE, snapshot secondary queue stats: {"maxQueueSize":0,"putCounter":0,"queueFullOnPut":0,"getCounter":0,"timeInQueueMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"0":0,"1":0,"10":0,"100":0,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"0":0,"1":0,"10":0,"50":0,"100":0,"500":0,"1000":0}},"totalTimeMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"0":0,"1":0,"10":0,"100":0,"1000":0,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:COMMENT, total primary queue stats: {"maxQueueSize":12,"putCounter":3146,"queueFullOnPut":0,"getCounter":3145,"timeInQueueMillis":{"count":3145,"min":0,"max":18,"sum":822,"avg":0,"distributionCounter":{"0":3092,"1":0,"10":0,"100":53,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":3145,"min":0,"max":142,"sum":10513,"avg":3,"distributionCounter":{"0":549,"1":1047,"10":1360,"50":184,"100":3,"500":2,"1000":0}},"totalTimeMillis":{"count":3145,"min":0,"max":656,"sum":19379,"avg":6,"distributionCounter":{"0":2149,"1":0,"10":1,"100":989,"1000":6,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"https-openssl-nio-443-exec-2":207,"https-openssl-nio-443-exec-25":143,"https-openssl-nio-443-exec-1":139,"https-openssl-nio-443-exec-23":126,"https-openssl-nio-443-exec-15":123,"https-openssl-nio-443-exec-3":114,"https-openssl-nio-443-exec-7":113,"https-openssl-nio-443-exec-17":112,"https-openssl-nio-443-exec-6":112,"https-openssl-nio-443-exec-10":110},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:COMMENT, total secondary queue stats: {"maxQueueSize":9,"putCounter":101164,"queueFullOnPut":0,"getCounter":101164,"timeInQueueMillis":{"count":101164,"min":0,"max":62,"sum":5952,"avg":0,"distributionCounter":{"0":100794,"1":4,"10":1,"100":365,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":101164,"min":0,"max":165,"sum":2415,"avg":0,"distributionCounter":{"0":100043,"1":686,"10":407,"50":26,"100":1,"500":1,"1000":0}},"totalTimeMillis":{"count":101164,"min":0,"max":391,"sum":402127,"avg":3,"distributionCounter":{"0":77786,"1":47,"10":70,"100":23253,"1000":8,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"NodeReindexServiceThread:thread-0":101095,"pool-60-thread-1":17,"Caesium-1-3":16,"Caesium-1-1":14,"Caesium-1-4":14,"Caesium-1-2":8},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:COMMENT, snapshot primary queue stats: {"maxQueueSize":1,"putCounter":3,"queueFullOnPut":0,"getCounter":3,"timeInQueueMillis":{"count":3,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"0":3,"1":0,"10":0,"100":0,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":3,"min":2,"max":2,"sum":6,"avg":2,"distributionCounter":{"0":0,"1":0,"10":3,"50":0,"100":0,"500":0,"1000":0}},"totalTimeMillis":{"count":3,"min":0,"max":16,"sum":16,"avg":5,"distributionCounter":{"0":2,"1":0,"10":0,"100":1,"1000":0,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"https-openssl-nio-443-exec-12":1,"https-openssl-nio-443-exec-15":1,"https-openssl-nio-443-exec-20":1},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:COMMENT, snapshot secondary queue stats: {"maxQueueSize":1,"putCounter":144,"queueFullOnPut":0,"getCounter":144,"timeInQueueMillis":{"count":144,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"0":144,"1":0,"10":0,"100":0,"1000":0,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":144,"min":0,"max":1,"sum":3,"avg":0,"distributionCounter":{"0":141,"1":3,"10":0,"50":0,"100":0,"500":0,"1000":0}},"totalTimeMillis":{"count":144,"min":0,"max":16,"sum":405,"avg":2,"distributionCounter":{"0":118,"1":0,"10":0,"100":26,"1000":0,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"NodeReindexServiceThread:thread-0":144},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,305 INFO [index.QueueingIndexStats]: [JIRA-STATS] [INDEXING-QUEUE] index:CHANGE_HISTORY, total primary queue stats: {"maxQueueSize":11,"putCounter":14821,"queueFullOnPut":0,"getCounter":14820,"timeInQueueMillis":{"count":14820,"min":0,"max":125,"sum":1822,"avg":0,"distributionCounter":{"0":14708,"1":2,"10":0,"100":109,"1000":1,"10000":0,"20000":0,"30000":0}},"timeToUpdateIndexMillis":{"count":14820,"min":0,"max":33,"sum":9668,"avg":0,"distributionCounter":{"0":10451,"1":1696,"10":2639,"50":34,"100":0,"500":0,"1000":0}},"totalTimeMillis":{"count":14820,"min":0,"max":494,"sum":39214,"avg":2,"distributionCounter":{"0":12660,"1":8,"10":4,"100":2132,"1000":16,"10000":0,"20000":0,"30000":0}},"totalTimeFailedMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"totalTimeTimedOutMillis":{"count":0,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{}},"putCounterByThreadTopN":{"https-openssl-nio-443-exec-16":914,"https-openssl-nio-443-exec-5":793,"https-openssl-nio-443-exec-13":750,"https-openssl-nio-443-exec-4":730,"https-openssl-nio-443-exec-15":728,"https-openssl-nio-443-exec-18":726,"https-openssl-nio-443-exec-1":679,"https-openssl-nio-443-exec-17":668,"https-openssl-nio-443-exec-10":602,"https-openssl-nio-443-exec-2":595},"indexerNotRunningCounter":0} 2022-09-06 16:44:04,430 INFO [stats.TotalAndSnapshotIndexSearcherStats]: [JIRA-STATS] [index-searcher-stats] ISSUE : snapshot stats: {"searchStatsInMillis":{"count":230,"min":0,"max":26,"sum":367,"avg":1,"distributionCounter":{"1":197,"10":21,"20":9,"50":3,"100":0,"500":0,"1000":0,"5000":0}},"docStatsInMillis":{"count":3,"min":0,"max":0,"sum":0,"avg":0,"distributionCounter":{"1":3,"10":0,"20":0,"50":0,"100":0,"500":0,"1000":0,"5000":0}},"getSearcherTotalStatsInMillis":{"count":3,"min":35,"max":42,"sum":115,"avg":38,"distributionCounter":{"1":0,"10":0,"20":0,"50":3,"100":0,"500":0,"1000":0,"5000":0}},"getNewSearcherStatsInMillis":{"count":3,"min":35,"max":42,"sum":115,"avg":38,"distributionCounter":{"1":0,"10":0,"20":0,"50":3,"100":0,"500":0,"1000":0,"5000":0}}} 2022-09-06 16:44:04,430 WARN [runner.ScriptBindingsManager]: CAM 6 additional input [originalAssigneeId:null, userKey:JIRAUSER59200] 2022-09-06 16:44:04,430 WARN [runner.ScriptBindingsManager]: CAM 6 getFieldValuesHolder [formToken:null] 2022-09-06 16:44:04,430 WARN [runner.ScriptBindingsManager]: CAM 6 getErrorCollection Errors: {} Error Messages: [] 2022-09-06 16:44:04,430 WARN [runner.ScriptBindingsManager]: CAM 6 getWarningCollection []