Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add My Tasks view & dashboard widget #1285

Open
wants to merge 82 commits into
base: develop
Choose a base branch
from
Open

Conversation

nicolachr
Copy link

@nicolachr nicolachr commented Aug 12, 2024

Summary

Currently, when methodology cards are assigned to users, the assigned users do not have a way to see which cards are assigned to them unless they manually go through each card. This is tedious and prone to letting cards fall through the cracks.

The proposed solution, allows the users to:

  1. Use the dashboard widget to see the five tasks with the highest priority that are assigned to them. Highest priority is given to tasks that are overdue, and lowest priority to tasks that don't have a due date.
  2. Access a dedicated "My Tasks" view that displays all the tasks that are assigned to them in the form of a table.

This will allow users to have better command of their tasks, make the process of finding a task easier, and will help the users stay on top of things.

Copyright assignment

I assign all rights, including copyright, to any future Dradis
work by myself to Security Roots.

Check List

  • Added a CHANGELOG entry

nicolachr and others added 30 commits August 12, 2024 11:43
<ul class="list-group tasks">
<% @tasks.each do |task| %>
<li class="d-flex flex-column list-group-item">
<%= link_to project_board_list_card_path(current_project, task.board, task.list, task), class: "list-group-item-action text-truncate" do %>
Copy link
Contributor

@caitmich caitmich Sep 4, 2024

Choose a reason for hiding this comment

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

The idea is to extend this to include other assignable record types in the future correct?

In order to leave this open for extension as easily as possible, we should check for record type before rendering the link_to and the <li> content since it will vary between record types

Copy link
Contributor

Choose a reason for hiding this comment

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

We can add a switch statement or a new helper method for this once we introduce another record type as a task

cards = current_user.cards.order(Arel.sql('due_date IS NULL, due_date ASC'))

if project_id
cards.select { |card| card.project.id == current_project.id }
Copy link
Contributor

@caitmich caitmich Sep 25, 2024

Choose a reason for hiding this comment

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

If we're passing project_id we should use it here otherwise it could have unexpected results

Suggested change
cards.select { |card| card.project.id == current_project.id }
cards.select { |card| card.project.id == project_id }

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.

3 participants