Skip to content

Feature Checklist: Assigning users to tasks #667

@begedin

Description

@begedin

Problem

This issue should serve as a checklist and sub-issue aggregate for the feature of being able to assign users to individual tasks. This feature would initially mostly mimic github's user assignment feature, but will likely get refined as we go along.

What we need

Models

  • UserTask model`
    • user_id, task_id, potentially due_date
    • create_changeset
      • accepts [:user_id, :task_id, :due_date]
      • requires [:user_id, :task_id]
        -constrain uniqueness to user and task, so only one user can be assigned to a task. however, multiple tasks can be assigned to the same user.
    • update_changeset
      • accepts [:due_date]
      • requires nothing, so :due_date can be unset

Endpoints

  • GET /user-tasks - index, should support coalescing for hasMany
  • GET /user-tasks/:id - show
  • POST /user-tasks - create endpoint
  • PATCH /user-tasks/:id - change due date
  • DELETE /user-tasks/:id - removes assignment

Authentication

  • GET endpoints should be public
  • POST, PATCH and DELETE should be authenticated only

Authorization (policies)

  • [:show, :index] should have none, everyone is able to do it
  • [:create, :patch, :delete] - All contributors can do this. We do not want to constrain the system too much. GitHub behaves similarly and it seems to work fine.

All of this is up for discussion, so feel free to add any suggestions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions