-
Notifications
You must be signed in to change notification settings - Fork 4
[NAE-2231] Unable to change behavior of taskRef on finish event witho… #307
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
Conversation
…ut error message - fix reloading a non-existing task
WalkthroughAdds optional executable-state flags to the FinishTaskEventOutcome and Task interfaces; finish flow now forwards that flag into task-state updates. TaskContentService stores the flag and uses it to gate TASK_REF-triggered task data reloads. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as User / UI
participant F as FinishTaskService
participant B as Backend
participant T as TaskContentService
UI->>F: trigger finish task
F->>B: POST /tasks/{id}/finish
B-->>F: outcomeResource { outcome, success, isTaskStillExecutable }
alt success
F->>T: updateStateData(outcome, outcome.isTaskStillExecutable)
T->>T: this._task.isStillExecutable = outcome.isTaskStillExecutable
else failure
F-->>UI: emit error/result
end
sequenceDiagram
participant UI as UI (field update)
participant T as TaskContentService
UI->>T: updateField(field)
alt field.type == TASK_REF and (this._task.isStillExecutable === true or undefined)
T->>T: trigger task data reload
else
T->>T: skip reload (task not executable)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-07-18T15:00:21.234ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
projects/netgrif-components-core/src/lib/event/model/event-outcomes/task-outcomes/finish-task-event-outcome.ts(1 hunks)projects/netgrif-components-core/src/lib/resources/interface/task.ts(1 hunks)projects/netgrif-components-core/src/lib/task-content/services/task-content.service.ts(2 hunks)projects/netgrif-components-core/src/lib/task/services/finish-task.service.ts(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
projects/netgrif-components-core/src/lib/task/services/finish-task.service.ts (1)
projects/netgrif-components-core/src/lib/event/model/event-outcomes/task-outcomes/finish-task-event-outcome.ts (1)
FinishTaskEventOutcome(4-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Matrix Test (18)
- GitHub Check: Matrix Test (14)
- GitHub Check: Matrix Test (16)
- GitHub Check: Test with SonarCloud
🔇 Additional comments (3)
projects/netgrif-components-core/src/lib/event/model/event-outcomes/task-outcomes/finish-task-event-outcome.ts (1)
5-5: LGTM!The property addition aligns with the PR objective to track task executability through event outcomes.
projects/netgrif-components-core/src/lib/task-content/services/task-content.service.ts (1)
209-216: LGTM! Default value ensures backward compatibility.The
isStillExecutableparameter defaults totrue, which means existing code paths that don't explicitly pass this flag will assume tasks remain executable. This is appropriate for backward compatibility.projects/netgrif-components-core/src/lib/task/services/finish-task.service.ts (1)
136-137: LGTM! Correctly propagates executable state.The changes properly extract the
isTaskStillExecutableflag from the finish response and pass it toupdateStateData, completing the flow to prevent reloading finished tasks.
projects/netgrif-components-core/src/lib/task-content/services/task-content.service.ts
Show resolved
Hide resolved
|
|





Description
The problem was, that if you finish the task, which updates any taskRef, that is referenced in the task you are finishing, frontend tries to do reload. I have updated the implementation, that backend sends information, that the task which is being finished, does not exist and the frontend will not reload the task itself.
Fixes NAE-2231
Dependencies
No new dependencies were introduced
Third party dependencies
No new dependencies were introduced
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
Manually
Test Configuration
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.