Created
September 24, 2021 16:57
-
-
Save atombrella/fa645d3a2d84bbc07ac30f7a93fdc095 to your computer and use it in GitHub Desktop.
Fetch Issue in Script Console
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
@com.onresolve.scriptrunner.parameters.annotation.ShortTextInput(description = "Enter Jira to execute the script on - leave empty for non-debug modes", label = "Jira Request Issue") | |
String jiraDebugIssue | |
Logger logger = Logger.getLogger("sacos.s5k.evalcreate") | |
logger.setLevel(Level.ALL) | |
IssueService issueService = ComponentAccessor.getIssueService() | |
IssueManager issueManager = ComponentAccessor.getIssueManager() | |
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters(); | |
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager() | |
ProjectManager projectManager = ComponentAccessor.getProjectManager() | |
WatcherManager watcherManager = ComponentAccessor.getWatcherManager() | |
IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager() | |
OptionsManager optionsManager = ComponentAccessor.getOptionsManager() | |
Issue issue // enable this line for editor to function correctly | |
if ( jiraDebugIssue != "" ){ | |
issue = issueManager.getIssueObject(jiraDebugIssue) // Add an issue for testing | |
logger.setLevel(Level.ALL) // ALL, WARN | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment