Skip to content

#4254 task labels#4256

Open
wavehassman wants to merge 17 commits into
developfrom
#4254-task-labels
Open

#4254 task labels#4256
wavehassman wants to merge 17 commits into
developfrom
#4254-task-labels

Conversation

@wavehassman

@wavehassman wavehassman commented May 29, 2026

Copy link
Copy Markdown
Contributor

Changes

Adds a full task labels feature:

  • Adds a TaskLabel model to schema
  • Attaches labels to task creation/editing forms across the task list, calendar, and Gantt views, and displays label pills on task cards
  • In admin tools, admins can manage the available labels
  • A filter was built into the task list page so users can filter tasks by one or more labels.

Test Cases

Setting labels on a task:

  • Successfully sets labels on a task
  • Throws NotFoundException when a label ID does not exist
  • Throws DeletedException when a label is deleted
  • Throws InvalidOrganizationException when a label belongs to a different org

Create task label:

  • Successfully creates a label as admin
  • Throws AccessDeniedException for non-admins

Edit task label:

  • Successfully edits a label as admin
  • Throws AccessDeniedException for non-admins
  • Throws NotFoundException when label doesn't exist
  • Throws DeletedException when label is already deleted
  • Throws InvalidOrganizationException when label belongs to a different org

Delete task label:

  • Successfully deletes a label as admin
  • Throws AccessDeniedException for non-admins
  • Throws NotFoundException when label doesn't exist
  • Throws DeletedException when label is already deleted
  • Throws InvalidOrganizationException when label belongs to a different org

Screenshots

Screenshot 2026-05-31 at 12 13 03 PM Screenshot 2026-05-31 at 12 08 51 PM Screenshot 2026-05-31 at 12 18 17 PM Screenshot 2026-05-31 at 12 09 05 PM Screenshot 2026-05-31 at 12 10 54 PM Screenshot 2026-05-31 at 12 17 41 PM Screenshot 2026-05-31 at 12 12 51 PM Screenshot 2026-05-31 at 12 11 25 PM

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4254

@wavehassman wavehassman self-assigned this May 29, 2026
@wavehassman wavehassman marked this pull request as draft May 29, 2026 21:23
@wavehassman wavehassman marked this pull request as ready for review May 31, 2026 17:08
@wavehassman wavehassman requested a review from chpy04 May 31, 2026 17:08
}
}

static async getTasksByWbsNumAndLabels(req: Request, res: Response, next: NextFunction) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would we not just use the existing filter endpoint and add labels to that?

@wavehassman wavehassman Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter endpoint is scoped to the calendar view, so it requires a date range and returns CalendarTask[] which has lead/manager fields needed for calendar permissions
I don't think it makes sense to join the two since they are totally different use cases

Comment thread src/backend/src/prisma-query-args/tasks.query-args.ts Outdated
Comment thread src/backend/src/prisma-query-args/tasks.query-args.ts Outdated
* @param organization the organization that the user is currently in
* @returns array of tasks that have at least one matching label
*/
static async getTasksByWbsNumAndLabels(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we should really move the labels part of this to the filters endpoint. Filtering by wbs is a seperate endpoint because that is what we are inherently doing on every page, but that is not the case for labels

Comment thread src/frontend/src/pages/AdminToolsPage/ProjectsConfig/TaskLabelFormModal.tsx Outdated
Comment thread src/frontend/src/pages/AdminToolsPage/ProjectsConfig/TaskLabelFormModal.tsx Outdated
@wavehassman wavehassman requested a review from chpy04 June 11, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tasks] - Add a Label to Tasks

2 participants