Syntax to set Component and Label on Automatic Ticket creation

Rich Wolverton
Contributor
November 12, 2019

We are using Scriptrunner to automatically create an Issue on a specific date/time for recurring tasks. We have not been able to figure out the correct syntax to set a Label and a Component. Here is the basic code we have:

def cfcustreq = customFiledmanager.getCustomFieldObjectByName("Customer Request Type")
issueInputParameters.with {
projectId = projectManager.getProjectObjByKey("DP").id
summary = "Log Time for ServiceNow ticket work " + sdf.format(today) + " - " + sdf.format(nextweek)
issueTypeId = issueType.getId()
component = projectComponentManager.findByComponentName(project.getId("DP"),"b-cx-engagement")
reporterId = "mimi.kantor"
assigneeId = "mimi.kantor"


description = """|JIRA Key|(-) = to do|(i) = in progress|(!) = blocked|(/) = done|(x) = cannot be completed|
h2. User story

Thanks for any help pointing us in the right direction.  

0 answers

Suggest an answer

Log in or Sign up to answer