-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: handle tasks scheduled without a specific time #4089
base: master
Are you sure you want to change the base?
feat: handle tasks scheduled without a specific time #4089
Conversation
isMoveToBacklog: false, | ||
}); | ||
actions.push(schedule); | ||
if (taskChanges.hasPlannedTime === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasPlannedTime
never gets assigned anywhere, so it will never be false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces the ability to schedule tasks without a specific time, so that such tasks will be planned for the day rather than being assigned a precise time. Key changes include:
- Adding a new boolean property "hasPlannedTime" to the task model.
- Modifying the short-syntax effect to dispatch a planTaskForDay action when a task is scheduled without a specific time.
- Adjusting task scheduling logic to differentiate between tasks with and without a specific planned time.
Reviewed Changes
File | Description |
---|---|
src/app/features/tasks/store/short-syntax.effects.ts | Adds logic to check "hasPlannedTime" and dispatch actions accordingly. |
src/app/features/tasks/task.model.ts | Introduces a new optional property "hasPlannedTime" to support the feature. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/app/features/tasks/store/short-syntax.effects.ts:138
- Ensure that the 'hasPlannedTime' property is explicitly set for tasks scheduled without a specific time. If left undefined, the condition may fail to trigger the intended planning logic, leading to incorrect task scheduling.
if (taskChanges.hasPlannedTime === false) {
src/app/features/tasks/task.model.ts:80
- [nitpick] Consider adding an inline comment or documentation in the task model to clearly describe the intended use of 'hasPlannedTime' for future maintainability.
hasPlannedTime?: boolean;
I forgot to commit the changes for setting |
I've removed the default 9am from tasks scheduled without time. For example, adding "Task |
Description
With this PR, when a user schedules a task with short syntax but doesn't give a specific time, the task will simply be planned for the day, without any time attached.
Under the hood, scheduled tasks without a specific time will dispatch
planTaskForDay
action. This is in contrast to scheduled tasks with a specific time which will triggerscheduleTask
action.Visually, the task scheduled without time will be located at the top, underneath the relevant day column in the Planner view.
Issues Resolved
List any existing issues this PR resolves: #4049
Check List