Repository navigation
[2.0] Fixes #38921: choose what happens when no one else can approve a step - #38986
Conversation
…a step Hand port of #38923 to 2.0. The workflow builder's approval step gets an "If no one else can approve" select for emptyAssigneeStrategy: Approve automatically (none, default) or Assign to admins. On a task workflow (noOp trigger) the default reads "Go to the asset's owners", since a task workflow never approves on its own. The doubled margin above the select is gone. The owner fallback for a task created with no assignee never assigns the task's creator: under assignAdmins with the requester as the only admin, it could hand the requester their own task, which as filer they cannot resolve. Differences from main: 2.0 has no wait strategy, so it is neither offered nor labelled. The later-approval-step fix is not ported: on 2.0 a later step also reuses the earlier step's task in CreateTask, which needs the lifecycle-gate changes (#34693) that 2.0 lacks.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High riskThe workflow option can automatically approve changes when no independent approver exists, potentially bypassing required human sign-off on governed updates. Adds an "If no one else can approve" setting to approval steps in the workflow builder, with VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #38921
Hand port of #38923 to
2.0. The release bot's cherry-pick conflicted (29 files), because 2.0 has nowaitstrategy and lacks the lifecycle-gate changes (#34693) that main's later-step fix builds on. The 2.1 backport is #38968, which merged.What is ported
none, default) or Assign to admins. On a task workflow (noOp trigger), the default reads Go to the asset's owners, because a task workflow never approves on its own. The doubled margin above the select is gone. The form uses the generatedEmptyAssigneeStrategytype.TaskRepository.setDefaultAssigneesFromEntityOwners): a task created with no assignee never falls back to its creator. UnderassignAdminswith the requester as the only admin, [2.0] Fixes 38699: Never give an approval back to its requester (#38708) #38829 keeps the task open with no assignee, and this fallback could then assign the requester, who as filer cannot resolve it.2026-11-25-an-approval-never-goes-to-its-requestergets a v2 amendment.Differences from main
wait: 2.0's enum isnoneandassignAdminsonly, sowaitis neither offered nor labelled.CreateTask.resolveRequestedTaskId) and copies its assignees. Fixing that needs Support lifecycle workflow configuration, metadata tasks and metric intake forms #34693. The ADR amendment records this: on 2.0 the hints describe an entity workflow's first approval step.UserApprovalForm.test.tsxhas nowaitcases, and its first case checks the stored strategy only. 2.0's form does not keep other unedited settings.WorkflowOssRestrictions.spec.tskeeps its workflow inert by triggering on table Updated with anincludefield no table has, instead of main's trigger filter. On 2.0 a stored filter disables the start node's add-filter button, which another test in that spec checks.Type of change:
Tests:
All run locally on this branch, on MySQL + Elasticsearch 9.3.0:
SetApprovalAssigneesImplTest17 +TaskRepositoryAssigneesTest4 (new) = 21 run, 0 failures.WorkflowDefinitionResourceIT(whole class, including the newtest_taskWithoutAssigneesNeverFallsBackToItsCreator): 92 run, 0 failures, 0 errors, 9 skipped. The 9 skips were already skipped on 2.0.TaskResourceIT+DataAccessRequestValidationIT: 295 run, 0 failures, 25 skipped.UserApprovalForm.test.tsx9/9, and theWorkflowDefinitionssuites pass. ESLint and Prettier are clean on the changed files.tscreports no errors in them.yarn i18nis in sync, and the 8 new keys are translated in all 20 locales.WorkflowOssRestrictions.spec.ts+NoOpWorkflowNodeConfig.spec.ts28 passed.lint:playwrightreports stale suppressions in unrelated 2.0 specs (TestDefinitionPermissions,GlossaryMutualExclusivity). They were already on 2.0, and this PR leaves them untouched.Checklist:
Fixes #38921above.REVIEW.mdfound no 🔴. Its two 🟡 caveats, the first-approval-step scope on 2.0 and creator vs requester, are written into the ADR amendment.🤖 Generated with Claude Code