Skip to content

Add roles and time tracking to tasks tab - #160

Open
icole wants to merge 11 commits into
mainfrom
feature/roles-time-tracking
Open

Add roles and time tracking to tasks tab#160
icole wants to merge 11 commits into
mainfrom
feature/roles-time-tracking

Conversation

@icole

@icole icole commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds community role management within the existing Tasks tab
  • Roles have duties, descriptions, groups (HOA Officers, Garden, Facilities, Community), terms, and holder/backup assignments
  • Time tracking per-task and monthly reconciliation against roles
  • Recurring task templates auto-generate tasks assigned to current role holders
  • Workload sentiment model for monthly self-assessment
  • PaperTrail audit log on roles and assignments
  • Self-service role management (any member can edit, changes are audited)

New models

  • Role — title, duties, description/guide, group, type (role vs committee), term length, vacancy tracking
  • RoleAssignment — links users to roles as holder/backup/co-holder with term dates
  • TimeEntry — hours logged against tasks or roles (per-task or monthly reconciliation)
  • RecurringTaskTemplate — auto-generates tasks on a schedule (daily/weekly/biweekly/monthly/quarterly)
  • WorkloadSentiment — monthly too-much/just-right/too-little self-report per role

UI

  • People icon in Tasks tab header opens Roles directory
  • Roles grouped by category with vacancy badges
  • Role detail view: holders, duties, guide, time summary, linked tasks, audit history
  • Role select dropdown on task creation form
  • Time entry logging and monthly summary views

Test plan

  • 487 tests passing, 1233 assertions
  • Rubocop: no offenses
  • Brakeman: no security warnings
  • Manual: verify roles directory renders correctly
  • Manual: create a role, assign a user, log time
  • Manual: verify roles icon appears in tasks tab on mobile

icole added 11 commits May 17, 2026 19:03
Foundation for Roles & Time Tracking feature. Includes validations
for title, role_type, and group; scopes for filtering; Discardable
soft-delete support; and PaperTrail versioning.
Implements the join model between roles and users with assignment_type
(holder/backup/co_holder), date tracking, and active status. Includes
a callback to keep role vacancy status in sync and a partial unique
index to prevent duplicate active holders.
Create time_entries table for tracking hours spent on roles and tasks.
Supports task and reconciliation entry types with month-based scoping.
Uncomment has_many :time_entries in Role model.
Create model with validations (title, frequency, role), generate_task!
method, and due_for_generation? logic. Frequencies: daily, weekly,
biweekly, monthly, quarterly. Role association on generated tasks
deferred to Task 5 when role_id column is added to tasks table.
Add role_id foreign key to tasks table, enable Role has_many :tasks,
permit role_id in tasks controller, and fix RecurringTaskTemplate to
include role when generating tasks.
Implements full CRUD for community roles with DaisyUI views,
soft-delete support, and nested routes for future role_assignments,
time_entries, and recurring_task_templates controllers.
Implements nested resource controller for assigning users to roles
with holder/backup/co_holder types and optional term dates.
Implements time logging for roles with task and reconciliation entry
types. Includes views for listing entries with monthly summaries and
a form for creating new entries.
Add a Community Roles icon link in the tasks page header alongside
the Add button, and include a role select dropdown in the task form
so tasks can be optionally associated with a role.
Allows users to record monthly sentiment (too_much, just_right, too_little)
per role, with uniqueness constraint ensuring one response per user/role/month.
Job iterates over RecurringTaskTemplate records, checks if each is due
for generation based on its frequency, and creates a Task assigned to
the role's current active holder.
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.

1 participant