Created
July 14, 2020 14:45
-
-
Save jechlin-adaptavist/648d0258c33ea3d21544d6dfc190dba2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.onresolve.scriptrunner.runner.customisers.PluginModule | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.servicedesk.api.requesttype.RequestTypeService | |
@PluginModule | |
RequestTypeService requestTypeService | |
def request = requestTypeService.newQueryBuilder() | |
.issue(event.issue.id) | |
.build() | |
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser | |
requestTypeService.getRequestTypes(loggedInUser, request).findFirst().ifPresent { | |
log.debug(it.name) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment