Package pw.chew.clickup4j.api.entities
Interface Task
- All Known Implementing Classes:
TaskImpl
public interface Task
ClickUp Task
Tasks are the heart of ClickUp, and are the lowest level of organization in the hierarchy.
View the ClickUp Docs for more info.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents the priority of a task.static interface
Represents a status of a task. -
Method Summary
Modifier and TypeMethodDescriptiondelete()
Deletes this task.Returns a list ofusers
who are assigned to work on this task.Returns a list of checklists associated with this task.Returns the user who created this task.@NotNull List<ICustomField>
Returns all the custom fields for this task.@Nullable String
The custom ID for this task.@Nullable OffsetDateTime
Returns when this Task was closed.@NotNull OffsetDateTime
Returns when this Task was created.@NotNull OffsetDateTime
Returns when this Task was last modified.@Nullable String
Returns the complete description of this task.@Nullable OffsetDateTime
Returns the due date of this task, if there is one.@NotNull String
getId()
The unique ID of this task.@NotNull TaskManager
Return the manager of this task.@NotNull String
getName()
The name of this task.Returns the order index of this task.@Nullable String
Retrieves the parent ID of this task.@NotNull Task.Priority
The priority of this task.@Nullable OffsetDateTime
Returns the start date of this task, if there is one.@NotNull Task.Status
Returns the status of this task.Returns the text content of this task.Returns the estimated time to complete this task.Returns the time tracked to this task.@NotNull String
getUrl()
The URL link to this task.Returns the watchers for this task.resolve()
Resolves missing fields in this task.Retrieves the parent task of this task.uploadAttachment
(File file, String filename) Uploads the specifiedFile
to this task.
-
Method Details
-
getId
The unique ID of this task.All IDs are unique on ClickUp, so this can safely be used as a primary key.
- Returns:
- the ID of this task
-
getCustomId
The custom ID for this task.This feature is exclusive to the Business plan or above, so this is likely to be null.
- Returns:
- A possibly null custom ID for this task
-
getName
The name of this task. This is also referred to as the title.- Returns:
- the name of this task
-
getTextContent
String getTextContent()Returns the text content of this task.
The API seems to return the same asgetDescription()
.- Returns:
- the description of this task
- See Also:
-
getDescription
Returns the complete description of this task.- Returns:
- the description of this task
-
getStatus
Returns the status of this task.- Returns:
- the status of this task
-
getOrderIndex
String getOrderIndex()Returns the order index of this task.
The higher the index, the lower (vertically) the task will be.- Returns:
- the order index of this task
-
getDateCreated
Returns when this Task was created.
If this task was imported, it may show up as a date prior to ClickUp's creation date. Pretty neat!- Returns:
- the date this task was created
-
getDateUpdated
Returns when this Task was last modified.- Returns:
- the date this task was last modified
-
getDateClosed
Returns when this Task was closed.
If the task is not closed, this will be null.- Returns:
- the date this task was closed, or null if it is not closed
-
getCreator
User getCreator()Returns the user who created this task.- Returns:
- the user who created this task
-
getAssignees
Returns a list ofusers
who are assigned to work on this task.
If the space doesn't haveSpace.isMultipleAssignees()
enabled, this will return a list of one user.- Returns:
- a list of users assigned to work on this task
-
getWatchers
Returns the watchers for this task. This list will be empty if this task was retrieved fromClickUp4j.retrieveTasks(String)
, but will show up if this task was retrieved fromClickUp4j.retrieveTask(String)
.- Returns:
- the watchers for this task
-
getChecklists
Returns a list of checklists associated with this task.
This list will be empty if this task has no checklists.- Returns:
- a list of checklists associated with this task
-
getParentId
Retrieves the parent ID of this task.This will be null if this task is a top-level task.
To get the parent task, useretrieveParent()
.- Returns:
- the parent ID of this task
-
retrieveParent
Retrieves the parent task of this task.This will be null if this task is a top-level task.
- Returns:
- a requester to get the parent task
-
getPriority
The priority of this task. If there is no priority set, this will returnTask.Priority.NONE
.- Returns:
- the never-null priority of this task
-
getDueDate
Returns the due date of this task, if there is one.
If there is no due date, this will return null.- Returns:
- the possibly-null due date of this task
-
getStartDate
Returns the start date of this task, if there is one.
If there is no start date, this will return null.- Returns:
- the possibly-null start date of this task
-
getTimeEstimate
Duration getTimeEstimate()Returns the estimated time to complete this task.- Returns:
- the estimated time to complete this task
-
getTimeSpent
Duration getTimeSpent()Returns the time tracked to this task.
This requires the space to have theTime Tracking
ClickApp enabled.- Returns:
- the time spent on this task
-
getCustomFields
Returns all the custom fields for this task.
Custom Fields may not have a value set.- Returns:
- all the custom fields for this task
-
getListId
String getListId() -
getFolderId
String getFolderId() -
getSpaceId
String getSpaceId() -
retrieveSpace
-
uploadAttachment
Uploads the specifiedFile
to this task.- Parameters:
file
- the file to uploadfilename
- the name of the file- Returns:
- a requester to upload an attachment to this task
-
getUrl
The URL link to this task.- Returns:
- the URL link to this task
-
getManager
Return the manager of this task.
This is used to modify the task.- Returns:
- the manager of this task
-
resolve
Resolves missing fields in this task.
Due to API limitations, this excludes custom field values.- Returns:
- this task with all missing fields resolved
-
delete
Deletes this task.- Returns:
- a requester to delete this task
-