I'm using Jira server ver 8.13.3
I have a text based custom field called "Deliverables" and I'm trying to create a Custom scheduled job to create an issuetype story every day with the "Deliverables" field set to "insert custom text".
Deliverables = customfield_13518
I've tried the following but it never actually injects the text into the custom field
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = Component.Accessor.customFieldManager()
def issueService = ComponentAccessor.issueService
def projectManager = ComponentAccessor.projectManager
def user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
def issueInputParameters = issueService.newIssueInputParameters()
issueInputParameters.with {
projectId = projectManager.getProjectObjByKey("PROJ").id
summary = "reoccurring task"
issueTypeId = "21"
reporterId = user.name
description = "Daily Task Checklist"
customfield_13518 = "Submit Form 1362"
}
def validationResult = issueService.validateCreate(user, issueInputParameters)
assert !validationResult.errorCollection.hasAnyErrors()
def issueResult = issueService.create(user, validationResult)
log.info "Issue created: ${issueResult.issue}"