1
0
-1
2 answers
- 10-1
Hi Vojtěch Veselý!
After some research, we found a way to bring the groupIds.def request = new JiraClient(httpClient) .http( "GET", "/rest/api/3/issue/${issue.key}", [:], null, ["Accept": ["application/json"], "Content-type" : ["application/json"]] ) { response -> if (response.code >= 400) throw new com.exalate.api.exception.IssueTrackerException("Failed") else (new groovy.json.JsonSlurper()).parseText(response.body) } def groupIds = request.fields.customfield_10010.requestType.groupIds replica.customKeys."Group IDS" = groupIds
Add this to your Outgoing Script, and it should work to retrieve the groupIds as per your example and be able to send it.
BR
Tomas Lalanne
Add your comment... - 10-1
The issue."Request Type" doesn't have the "groupIds" property either. IT has just:
[serviceDeskProjectKey, class, requestTypeKey, serviceDeskProjectName, serviceDeskId, representationValue, requestTypeName, requestTypeId, portalKey]Add your comment...
Hello there,
I need to get IDs of Groups to which Request from JSM belongs to. Typically from REST API I could just access the field "Request Type" which has the "groupIds" property. Below is an example how the "Request Type" field looks returned from a REST API.
As you can see to access groupIds I would just simply use path customfield_10010.requestType.groupIds.
How do I achieve that in the outgoing sync script? Tried:
issue.customFields."Request Type".requestType.groupIds
issue.customFields."Request Type".value.requestType.groupIds
issue.customFields."Request Type".value - this returned null/null for some reason even though the script ran on a Request
Thanks