Conversation
Tasks could become permanently un-completable. The updateTask gate that blocks "mark as done" when a task has an approverId never consulted the org's evidenceApprovalEnabled flag, while the UI hides the approver dropdown and submit-for-review flow whenever approval is disabled. A task carrying a stale approverId (e.g. approveTask leaves it set, then the recurring task-schedule cron resets the task off "done" without clearing it) was wedged: no UI path to clear the approver, yet the API refused a direct "done" — surfacing the misleading "Submit for review instead". - updateTask: load evidenceApprovalEnabled (folded into the existing task query), only enforce the in_review / approver locks when approval is enabled, and self-heal a stale approverId when approval is off (unless the caller explicitly sets one). - updateTasksStatus (bulk): same blind spot — the in_review / approverId where-clause constraints silently dropped tasks. Gate them on the flag. - Add tasks.service.spec.ts covering the regression, the preserved approval-enabled workflow, the symmetric in_review case, and edge cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(tasks): respect evidenceApprovalEnabled when gating task completion
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Contributor
|
🎉 This PR is included in version 3.83.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.
Summary by cubic
Fixes tasks getting stuck by respecting the org’s
evidenceApprovalEnabledflag when gating status changes, and unblocks completing tasks when approval is off. Also tightens bulk update logic and adds tests.evidenceApprovalEnabledis true inupdateTaskandupdateTasksStatus.approverIdwhen approval is off (unless explicitly provided).in_reviewonly when approval is on to avoid wedging tasks.tasks.service.spec.ts).Written for commit 9576e49. Summary will update on new commits.