Hello everyone,
I am trying to create a new issue by groovy script in post function. I added all necessary fields but when I execute validateCreate function I received the error:
Error Messages: [Summary: You must specify a summary of the issue.
My code is:
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters();
issueInputParameters
.setProjectId( issue.getProjectObject().getId() )
.setSummary( "[Rel Request]" )
.setDescription(transitionComment)
.setIssueTypeId(issueTypeID)
.setPriorityId(parentPriority)
.setReporterId(reporterID)
.setAssigneeId(assigneeID)
log.error("Summary: " + issueInputParameters.getSummary())
ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
CreateValidationResult createValidationResult =
issueService.validateCreate(user, issueInputParameters)
if (createValidationResult.isValid())
{
log.error("entrou no createValidationResult")
IssueResult createResult = issueService.create(
user, createValidationResult)
if (!createResult.isValid())
{
log.error("Error while creating the issue.")
}
}
What's the error? Anybody can help me?
Thank you guys.