Skip to content

Task list hierarchy - #350

Merged
suraj-yadav0 merged 11 commits into
release/v1.3.3from
task-list-hierarchy
Sep 14, 2026
Merged

suraj-yadav0 merged 11 commits into
release/v1.3.3from
task-list-hierarchy

Conversation

@suraj-yadav0

Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements to data integrity, orphan record cleanup, and account scoping throughout the codebase. The main themes are: improved deletion and maintenance routines to prevent orphan data, stricter account scoping in queries, enhanced child task lookups, and a more robust notification daemon bootstrap process.

Database integrity and orphan data cleanup:

  • Added post-deletion sweeps in deleteAccountAndRelatedData to remove orphaned records, and improved logging and error handling. [1] [2]
  • Introduced a new cleanupOrphanAccountData function, called during post-startup maintenance in dbinit.js, to purge records with invalid account_id references from all major tables. [1] [2]

Account scoping and query improvements:

  • Updated queries in project.js to always filter by valid account_id (i.e., those present in users), preventing orphaned or invalid data from being returned in project and update listings. [1] [2] [3] [4] [5]

Task and subtask handling:

  • Refactored getChildTasks to require and use account_id for child lookups, ensuring tasks are only checked within the correct account. Updated all relevant callers. [1] [2] [3] [4] [5] [6]
  • Added a new getSubtasksForParent utility for retrieving subtasks scoped by account and project, with color and timesheet aggregation.

Notification daemon robustness:

  • Improved the notification daemon bootstrap logic to detect and update outdated systemd service files, ensuring the correct path is always used. [1] [2]

These changes collectively improve data consistency, prevent orphaned records, and ensure that all data access and manipulation is correctly scoped to existing accounts.

@suraj-yadav0 suraj-yadav0 self-assigned this Sep 14, 2026
@suraj-yadav0 suraj-yadav0 added bug Something isn't working enhancement New feature or request feature labels Sep 14, 2026
@suraj-yadav0
suraj-yadav0 merged commit 494a48b into release/v1.3.3 Sep 14, 2026
1 check passed
@suraj-yadav0
suraj-yadav0 deleted the task-list-hierarchy branch September 14, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant