Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

To Hide Transition from a user

Jayaram R.D
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 31, 2019

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 }


1 answer

0 votes
Sreenivasaraju P
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.
January 31, 2019

Suggest an answer

Log in or Sign up to answer