comments
with
BLOCKER
severity. App developers should use CommentService
to
create, retrieve and update BLOCKER
comments; this service is now just a facade for that one.@Deprecated public interface TaskService
Task
s.
As of 7.0, tasks have been deprecated and replaced with CommentSeverity.BLOCKER
Comment
s. As part of
that replacement, this service has been reimplemented as a facade for CommentService
. App developers who use
tasks are strongly encouraged to update their code to use CommentService
directly as soon as possible.
Note: CommentSeverity.BLOCKER
comments have existed since 6.7, however, prior to 7.0 they are not
treated as tasks. Apps that wish to retain semantic compatibility with 6.x must continue using the
TaskService
until support for pre-7.0 releases can be dropped.
Implementing tasks as BLOCKER
comments imposes two semantics-breaking changes despite remaining
API-compatible with previous releases:
BLOCKER
comments created using the CommentService
directly are included in task results,
unless they are root comments (i.e. they have no parent). It was not, and still is not, possible to
create a task without an anchoring comment, so root BLOCKER
comments cannot be treated as tasks because
they would violate the nullability contract for Task.getAnchor()
BLOCKER
comments created and/or updated using the task API still have their whitespace normalizedBLOCKER
reply on the anchoring commentBLOCKER
replyBLOCKER
replyModifier and Type | Method and Description |
---|---|
Task |
create(TaskCreateRequest request)
Deprecated.
Create a task.
|
void |
delete(long taskId)
Deprecated.
Delete a task.
|
Task |
getById(long taskId)
Deprecated.
Get a task by its ID.
|
Task |
update(TaskUpdateRequest request)
Deprecated.
Update a task.
|
@Nonnull Task create(@Nonnull TaskCreateRequest request)
Since 7.0, this method creates a BLOCKER
comment as a reply to the specified
anchor comment
.
request
- request detailing the task's propertiesvoid delete(long taskId)
Since 7.0, this method deletes the BLOCKER
comment with the specified ID.
Warning: Since 7.0, the semantics of this method have changed: Pull request authors may no longer delete tasks created by other users. As with comments, tasks can only be deleted by their authors and repository administrators.
taskId
- the ID of the task to delete@Nullable Task getById(long taskId)
Since 7.0, this method retrieves the BLOCKER
comment with the specified ID.
Due to the nullability contract of Task.getAnchor()
, if the BLOCKER
comment is a root comment
(i.e. has no parent), it cannot be retrieved using this API.
taskId
- the ID of the task to retrievenull
if none matches or the task is not visible to the current user@Nonnull Task update(@Nonnull TaskUpdateRequest request)
Since 7.0, this method updates the state and/or text of the BLOCKER
comment.
Warning: Since 7.0, the semantics of this method have changed: Pull request authors and repository administrators may no longer change the text of tasks created by other users. As with comments, task text can only be changed by the task's author.
request
- the properties to updateCopyright © 2021 Atlassian. All rights reserved.