Forums

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

Create issue at the start of each month.

Zachary
December 21, 2021

I am using Scriprunner to do this, script below.... This is literally copy/pasted from Scriptrunner's site.... so WHY isnt it resolving in either the console, or a custom job? Link: https://scriptrunner.adaptavist.com/latest/jira/custom-script-jobs.html

 

import com.atlassian.jira.component.ComponentAccessor

def issueService = ComponentAccesssor.issueService
def projectManager = ComponentAccessor.projectManager
def user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()

def issueInputParameters = issueService.newIssueInputParameters()

issueInputParameters.with {
projectID = projectManager.getProjectObjByKey("MPLX-AWAN").id
summary = "Update Virus Definitions"
issueTypeId = "10001"
reporterId = user.name
}

def validationResult = issueService.validateCreate(user, issueinputParameters)
assert !validationResult.errorCollection.hasAnyErrors()

def issueResult = issueService.create(user, validationResult)
log.info "Issue created: ${issueResult.issue}"

 

Error is : Failed type checking: Not all types of code can be checked. It's yelling about the first line. 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events