Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to Create a Customer Request with request participant via Service Desk API

Edited

I'm trying to create request via Service Desk API. But i can't add request participant.

This is part of my code:

Set<String> requestParticipants = ... // set of jira usernames


static CustomerRequest createServiceDeskRequest(ApplicationUser user, ApplicationUser author, Project project, int requestTypeId, Map<FieldId, FieldInputValue> mapFieldValues, Set<String> users = []) {

ServiceDesk serviceDesk = serviceDeskManager.getServiceDeskForProject(project)
def customerRequest = null

customerContextService.runInCustomerContext {
def requestBuilder = serviceDeskCustomerRequestService.newCreateBuilder()

def requestTypeQuery = requestTypeService.newQueryBuilder()
.serviceDesk(serviceDesk.getId())
.requestType(requestTypeId)
.build()

def requestTypes = requestTypeService.getRequestTypes(user, requestTypeQuery)

def type = requestTypes.findFirst()

def requestCP = requestBuilder.customerRequestChannelSource(CustomerRequestChannelSource.EMAIL)
.fieldValues(mapFieldValues)
.requestType(type.get())
.serviceDesk(serviceDesk)
.requestParticipants(users)// This is not working
.build()



customerRequest = customerRequestService.createCustomerRequest(author, requestCP)
}

return customerRequest
}

Request is created, but request participants is empty.
Why?




 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

696 views 5 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you