3 answers
- 10-1
I resolved my issue. I found that the below script gives me the sprint Id
def remoteSprintId = replica.customFields.Sprint?.value?.find { it -> it.state.toUpperCase() != "CLOSED" }?.id
if(remoteSprintId){
issue.customFields."Sprint".value = remoteSprintId.toLong()
}Add your comment... - 10-1
Hi, I have issue with sync sprints as well
https://docs.exalate.com/docs/how-to-sync-sprints
this part
def remoteSprintId = replica.customFields.Sprint?.value?.find { it -> it.state.toUpperCase() !=
"CLOSED"
}?.id
always come up as null
Has anyone here ever had a working sync sprint script for Cloud?
Thanks
Add your comment... - 10-1
Did you ever find a solution for this issue?
- Jonathon Sisson
Using this snippet I have been able to at least check if the sprint is currently closed which helped a lot with dealing with this issue:
def remoteSprintId = replica.customFields.Sprint?.value?.find { it.state.toUpperCase() != "CLOSED" }?.id if(remoteSprintId){ def localSprintId = nodeHelper.getLocalIssueKeyFromRemoteId(remoteSprintId, "sprint")?.id if(localSprintId){ def currentState = httpClient.get("/rest/agile/1.0/sprint/"+localSprintId)?.state?.toLowerCase() if(currentState && currentState != "closed"){ issue.customFields.Sprint.value = localSprintId } } }
Add your comment...
Hello,
the sprint sync script from the documentation does not account for the local sprint being closed:
If localSprint is closed then exalate will throw the following error:
services.jcloud.exception.UpdateIssueJiraCloudException: Could not update issue
because Closed sprints cannot be assigned to issues. How to solve this here?