Class TaskListItemModel
java.lang.Object
io.meeds.task.mcp.model.TaskListItemModel
A task in a list: what tells the card apart on its board, as a search
result does, with its assignee, due date, creation date, priority and
comments count, without its description, coworkers or other dates, which
get_task_by_id returns. The creation date tells apart the tasks created
since a date; the date of the latest comment tells apart those nobody has
commented on since. On request, the description as cut plain text.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskListItemModel(long id, String title, String link, boolean completed, Long projectId, String projectName, ProjectStatus status, List<ProjectLabel> labels, TaskAssigneeModel assignee, String dueDate, String createdDate, Integer daysOverdue, Priority priority, int commentsCount, List<TaskChange> changes) A list item without its latest comment, whichsetLastComment(String, TaskAssigneeModel)adds, nor its description, whichsetPlainTextDescription(String)adds on request. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetLastComment(String date, TaskAssigneeModel author) Sets when and by whom its latest comment was written.voidsetPlainTextDescription(String plainText) Sets the description from its plain text, cut atTaskDescriptionText.MAX_LENGTHcharacters, withdescription_truncatedwhen it was cut.
-
Constructor Details
-
TaskListItemModel
public TaskListItemModel(long id, String title, String link, boolean completed, Long projectId, String projectName, ProjectStatus status, List<ProjectLabel> labels, TaskAssigneeModel assignee, String dueDate, String createdDate, Integer daysOverdue, Priority priority, int commentsCount, List<TaskChange> changes) A list item without its latest comment, whichsetLastComment(String, TaskAssigneeModel)adds, nor its description, whichsetPlainTextDescription(String)adds on request.- Parameters:
id- the tasktitle- its titlelink- its linkcompleted- whether it is completedprojectId- its project, null for a personal taskprojectName- the name of its projectstatus- its statuslabels- its labelsassignee- its assigneedueDate- its due datecreatedDate- its creation datedaysOverdue- its days overdue, null when not overduepriority- its prioritycommentsCount- its comments count, replies includedchanges- its changes since a date, null for none
-
-
Method Details
-
setPlainTextDescription
Sets the description from its plain text, cut atTaskDescriptionText.MAX_LENGTHcharacters, withdescription_truncatedwhen it was cut.- Parameters:
plainText- the description as plain text, null for none
-
setLastComment
Sets when and by whom its latest comment was written.- Parameters:
date- the date of its latest comment, formatted as created_dateauthor- its author
-