Repository navigation
[2.1] Fixes #38363: open a form modal for inbox workflow transitions with required fields (backport 2.1 #38400) - #38445
Conversation
…ed fields (cherry picked from commit 44c61ab)
- Required-field guard treats false/0 as valid answers, not missing (only absent/null/empty-string block confirm), so a required boolean set to false or a required number set to 0 can be submitted. - Distinguish a failed schema lookup from a confirmed-missing schema: getResolvedTaskFormSchema gains an opt-in allowFallback flag; the inbox passes it for workflow-driven tasks so a fetch failure blocks the transition (with a retry) instead of falling back to the built-in default and letting a required-form transition fire with no payload. - Keep the form schema helpers and TaskPayloadSchemaFields real in the modal tests (mock only the modal shell and the heavy editor widgets); drop comments that restate the test calls. Addresses greptile review threads on #38400. (cherry picked from commit bb1c991)
… bulk resolve - Key the no-fallback lookup apart so other callers never get its undefined - Resolve the schema on click instead of hiding the inbox actions until it loads - Leave a bulk-resolved task whose transition form requires fields for the inbox - Type the modal test's task fixture so tsc passes (cherry picked from commit 70b6b62)
(cherry picked from commit a6d6214)
(cherry picked from commit 0e02467)
❌ 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 |
(cherry picked from commit 1b58e30)
Code Review ✅ Approved 🟡 Medium risk 4 closed / 4 findingsInbox transitions now submit required workflow-form payloads, enabling configured entity updates; impact is limited to tasks whose transitions declare required fields. Adds a form modal for inbox workflow transitions that require extra fields, so reviewers can fill them before the transition fires instead of sending it empty, and bulk resolve now skips those tasks. Four issues from earlier review were resolved: the required-field hint uses a valid error token, the modal Dialog sets ✅ 4 closed✅ Bug: Required-field hint uses nonexistent
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
Describe your changes:
Fixes #38363
Backport of #38400 to
2.1. When an inbox workflow transition's form declares required fields (for example a custom taskapprovethat needstargetField/proposedText), the inbox opens a form modal to collect them. Previously it fired the transition with no payload. The same check runs in My Tasks bulk resolve, which skips those tasks instead of resolving them without input. The task actions stay locked while the form schema loads, so a second click cannot send a duplicate or conflicting resolve. A transition that requires a comment as well as other form fields opens the form modal, which forwards the form'scommentfield; only an incident's resolve keeps the root-cause modal, which already collects its required reason.The six commits from #38400 are cherry-picked with
-x. They include the follow-ups that give the required-fields hint thedangercolour and the modaldividers="scroll", and that check a transition's form before its comment-only modal. The one conflict was theTaskDetailPanel.tsximport line, where2.1also importsuseQueryClient; it is resolved by keeping both. Thegenerated/antlrsymlink committed on #38400 by mistake is not included. This stays a draft until #38400 merges onmain; if review changes #38400, this branch picks up the same changes.Type of change:
Tests:
Unit tests
yarn testonTaskDetailPanel,TaskTransitionFormModal,useBulkResolveTasks,taskResolve.utilsandTaskFormSchemaUtils: 236 passed (after the follow-ups,TaskDetailPanelandTaskTransitionFormModalre-run: 134 passed).tsc --noEmit: no new errors. The 3 it reports, inExploreSortDropdown.tsxandOMSelectWidget.tsx, are onorigin/2.1too.Backend integration tests
Playwright (UI) tests
Checklist:
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge, with both earlier findings fixed and no new issues found.Summary
This backport collects required form answers before an Inbox workflow transition runs.
Both earlier, unnumbered findings are fixed: the form check now runs before the comment-only modal, and a requested comment must be nonblank before submit. No new findings or rule violations were identified. Tests and browser checks were not rerun.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User selects a transition] --> B{Incident root cause?} B -->|Yes| C[Open root-cause modal] B -->|No| D[Load form schema with actions locked] D -->|Lookup fails| E[Show error and allow retry] D --> F{Required form fields?} F -->|Yes| G[Collect form answers and requested comment] F -->|No| H{Comment required?} H -->|Yes| I[Collect comment] H -->|No| J[Send transition] C --> J G --> J I --> JReviews (6) · Last reviewed commit: "chore(playwright): regenerate the impact..." · Reviewed by Greptile