I've tried four ways to remove an issue from a sprint and none of them will do it. They all return an empty response (which the documentation indicates is "success"). But the issue remains in the sprint. What is the correct way to do it?
1. com.atlassian.jira:jira-rest-java-client-app:5.2.2
final IssueInput request = new IssueInputBuilder()
.setFieldValue(FIELD_SPRINT, null)
.build();
final IssueRestClient issues = client.getIssueClient();
issues.updateIssue(issue.getKey(), request).claim();
2. PUT directly to the REST endpoint
/rest/api/2/issue/{issueKey}
body:
{
"fields": {
"customfield_471": null
}
}
3. POST directly to another endpoint I found mentioned elsewhere
/rest/agile/1.0/backlog/issue
body:
{
"issues": [
"PRJ-27"
]
}
4. PUT directly to yet another endpoint I found mentioned elsewhere
/rest/greenhopper/1.0/sprint/rank
body:
{
"idOrKeys": [
"PRJ-27"
],
"customFieldId": "customfield_471",
"addToBacklog": "true"
}
Are you working with issues in a Company Managed project or a Team Managed project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you confirm that the identity used to run the API can successfully remove an issue from a sprint via the UI?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looking at what you specified for the third method you tried (agile API 1.0) I notice that you are missing the closing double-quote between issues and the following colon. Is that a paste error here in your post, or is that an error in the code you are actually using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, the missing double-quote was an error in this post (I've corrected it). In the actual code we use an ObjectMapper to serialize / deserialize JSON.
The identity used by the API should be able to remove an issue from a sprint in the UI, it is an admin. But I will verify that! Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, just tested that. In the UI, I was able to add / remove an issue from the sprint while logged in as the identity used by the API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.