Hi all,
i am using bit bucket server rest api to get tasks created in pull request.
http://localhost:7990/rest/api/1.0/projects/TES/repos/codeextractor/pull-requests/1/tasks
when i call this url it will return empty value array even though pull request has two open tasks.
using bitbucket server version - 7.1.1
any help appreciated.
thanks
Ishara
You're likely seeing an empty list because those are tasks without a parent comment. The ability to add top level tasks (tasks without a comment) was added in Bitbucket 7 and up, and as of 7.1.1, a REST API for fetching these hasn't been implemented. We're implementing that shortly, watch out for 7.2 and up!
We are using Bitbucket Server 7.8. I've noticed that tasks without a parent comment show up; however, it doesn't appear much different than an actual comment.
If I want to be able to differeniate between a "task" type and a "comment" top at the parent level, how do I do that? I noticed the "severity" field in the JSON REST API response says "blocker" for an open task.
Is the severity field a field that we could key on to differenitate, or will Atlassian update the REST response in the future to indicate if it is a task vs. a comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know it may be late to help Aaron, but if anyone winds up here as I did looking for a solution I hope this may help them.
https://docs.atlassian.com/bitbucket-server/rest/7.14.0/bitbucket-rest.html#idp355
Shows that the API is deprecated and we should use a blocker-comment as such there, and you'll see something similar as we have.
{"RESOLVED":6,"OPEN":7}
Deprecated since 7.2. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments?count=true instead.
The root where I found the solution is here.
https://docs.atlassian.com/bitbucket-server/rest/7.14.0/bitbucket-rest.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.