Skip to content

Task Management (Stack9-core v3.0)

Overview

The Task Management feature was introduced on v2.5 and following CRUD best practices Stack9 was capable of deliver the ability to create, assignee, update, mark and remove tasks.

Parameters

Searching for a better understanding, below are the endpoints for each request:

  • Get task by entityID:
 GET /:entityKey/:entityId/task
  • Returns:
[
  {
    "id": 2,
    "entity_id": 1,
    "key": "test_notification",
    "description": "gfcyfytg",
    "is_completed": false,
    "due_date": null,
    "assigne_id": null,
    "type": "native",
    "payload": null,
    "_is_deleted": false,
    "_created_by": 1,
    "_updated_by": 1,
    "_created_at": "2021-11-30T00:50:54.260Z",
    "_updated_at": "2021-11-30T00:50:54.260Z",
    "updated_by": {
      "id": 1,
      "_is_deleted": false,
      "_created_by": null,
      "_updated_by": null,
      "_created_at": "2021-11-29T05:29:19.162Z",
      "_updated_at": "2021-11-29T05:29:19.162Z",
      "identity_provider_user_id": "8181878171ada",
      "first_name": "test",
      "last_name": "test",
      "full_name": "test test",
      "username": "test@test.com.au",
      "email": "test@test.com.au",
      "phone": null,
      "job_title": null,
      "is_contact": false,
      "security_role_id": 1,
      "is_active": false,
      "is_blocked": false,
      "blocked_at": null
    }
  }
]
  • Create new task to the entity:
 POST /:entityKey/:entityId/task
  • Payload example:
{
  "description": "string",
  "is_completed": false,
  "due_date": "2021-10-09 00:57:06",
  "assigne_id": 1,
  "type": "string",
  "payload": "string"
}
  • Returns:
{
  "id": 8
}

Task Related

Exploring the task management engine on Stack9 v3.0 it was added a task related entity, which means that the task can be linked to one or more entities.

  • Payload with related_entities:
{
  "description": "string",
  "is_completed": false,
  "due_date": "2021-10-09 00:57:06",
  "assigne_id": 1,
  "type": "string",
  "payload": "string",
  "related_entities": [
    {
      "key": "test",
      "entity_id": 1
    }
  ]
}

Note: Task related is an optional array of entities.

  • Update/Mark a task:
 PUT /:entityKey/:entityId/:taskId
  • Payload example:
{
  "description": "updated description",
  "is_completed": true,
}
  • Remove a task from the entity:
 DELETE /:entityKey/:entityId/:taskId/

Note: The PUT and DELETE requests returns a status code 204.