Hi
Would really appreciate some help. I need to create a Service Desk Customer (as opposed to a 'user') via a Groovy script, but simply can't figure out how to use the builder correctly or find an example to work from. I'm on JSM v4.20.9 Data Centre.
I've tried every permutation I can think of. The very cut down version below yields "The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script2.groovy: 12: unable to resolve class newCreateBuilder"
Any help gratefully received!
import com.atlassian.servicedesk.api.user.CheckedUser
import com.atlassian.servicedesk.api.customer.CustomerService
import com.atlassian.servicedesk.api.customer.CustomerCreateParameters
import com.atlassian.jira.bc.user.UserService
import com.atlassian.jira.component.ComponentAccessor
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
CustomerCreateParameters.Builder customerPara = new newCreateBuilder();
def customer = customerPara('demo.email@yahoo.com','A Name').build()
def created = customerService.createCustomer(loggedInUser, customer)