Hi All,
I tried to use below codes found in atlassian community to hide transition from user. As in our team flow we have two issues Parent and child. Changing status in child issue type will initiate status change of parent issue type. But due to hiding transition in parent issue type, status not moving. Please provide any suggestions in existing codes or any alternate methods
Regards,
Jayaram.R.D
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.workflow.TransitionOptions
// replace with your issue here
def issue = issue
def issueService = ComponentAccessor.getIssueService()
def currentUser = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
def parameters = issueService.newIssueInputParameters()
// replace with id of the transition
def actionId = 111
def transitionOptions = new TransitionOptions.Builder()
.skipConditions()
.skipPermissions()
.skipValidators()
.build()
def result = issueService.validateTransition(currentUser, issue.id, actionId, parameters, transitionOptions)
if (result.isValid()) {
issueService.transition(currentUser, result)
} else {
log.warn result.errorCollection.errors
}
.