Task list hierarchy - #350
Merged
Merged
Conversation
… clickable launch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
deleteAccountAndRelatedDatato remove orphaned records, and improved logging and error handling. [1] [2]cleanupOrphanAccountDatafunction, called during post-startup maintenance indbinit.js, to purge records with invalidaccount_idreferences from all major tables. [1] [2]Account scoping and query improvements:
project.jsto always filter by validaccount_id(i.e., those present inusers), preventing orphaned or invalid data from being returned in project and update listings. [1] [2] [3] [4] [5]Task and subtask handling:
getChildTasksto require and useaccount_idfor child lookups, ensuring tasks are only checked within the correct account. Updated all relevant callers. [1] [2] [3] [4] [5] [6]getSubtasksForParentutility for retrieving subtasks scoped by account and project, with color and timesheet aggregation.Notification daemon robustness:
These changes collectively improve data consistency, prevent orphaned records, and ensure that all data access and manipulation is correctly scoped to existing accounts.