Repository navigation
fix(jira): leave an issue alone when Jira hides its assignee (#290) - #337
Conversation
A project whose field scheme leaves out Assignee answers
GET /issue/{key}?fields=assignee with no `fields` object, or with no
`assignee` key, even when someone holds the issue. assignJiraIssue read
that as unassigned and wrote the caller over a colleague. `assignee: null`
is now the only answer that lets the write through; a missing key returns
the new `assignee-hidden` outcome, which warns, writes nothing, reports
`assigned: false` and still creates the worktree.
Closes #290
There was a problem hiding this comment.
code-reviewer: minor issues
This makes assignJiraIssue write only when Jira answers "assignee": null. A missing fields, a fields: null or a missing assignee key now returns a new assignee-hidden outcome, which branch turns into a warning with assigned: false; docs, help text, tests and a changeset are updated to match. The core check is correct: the explicit !== null guard covers typeof null === "object", and the hidden check runs before anything can reach the PUT. I found nothing blocking: one doc sentence says the wrong thing, and one cheap test is missing.
Reviewed 984ca24 for baldurpan · claude-opus-5-5 · 9 files · $0.55
…signee (#290) Also reword the branch page's hidden-assignee sentence so it no longer reads as if the issue were reported as already yours.
There was a problem hiding this comment.
code-reviewer follow-up: looks good
Since my last review, the branch.mdx sentence about a hidden assignee is now a standalone sentence that says the issue is left alone and reports assigned: false. The tests add a fields: null case beside the no-fields case and a Data Center hidden-assignee test. Both earlier comments are dealt with, the new tests exercise the right paths, and I have nothing further to raise.
Earlier comments
- Fixed; yours to resolve: Suggestion: "So is" says a hidden-assignee issue is reported as already yours
- Fixed; yours to resolve: Suggestion: No test pins the
fields: nullbranch of the hidden check
Reviewed 5af06fb (changes since 984ca24) for baldurpan · claude-opus-5-5 · 2 files · $0.35
Closes #290
What changed
worktree branch --jira <KEY> --assignno longer replaces someone else's assignment when the issue's project leaves Assignee out of its field scheme. In that case Jira answersGET /issue/{key}?fields=assigneewith nofieldsobject, or with noassigneekey, even though the issue can still have an assignee. Before this fix, both answers read asundefinedand fell through to thePUT.src/integrations/jira.ts:assignJiraIssuenow writes only on"assignee": null, which is a free issue. A missingfields, afields: nullor a missingassigneekey returns a newJiraAssignmentoutcome,assignee-hidden. That check runs before theisMineandheld-by-otherchecks, and nothing is written. Cloud and Data Center are handled the same way.src/commands/branch.ts: the new outcome warns "Jira does not show who holds KEY (its project's field scheme leaves out Assignee), so it was left alone. Assign it in Jira if it should be yours." It is recorded inwarnings, the document reportsassigned: false, and the worktree is still created. The--helptext forassignednames the new reason.assignee-hiddenand noPUT. A second test replays the issue's exact site answer ({id, key}with nofields). Abranchtest checks the warning,assigned: falseand that the worktree is created.assignedfield's description now gives the third reason it can befalse, inREADME.md,docs/.../commands/branch.mdxandskills/worktree/SKILL.md. The Jira guide's Assigning the issue section gains a bullet, and thebranch.mdxJira bullet and the SKILL example comment mention the case too..changeset/hidden-assignee-left-alone.md,patch, confirmed.src/**andskills/**each owe a note undercontext/release.md, and this one covers both.docs/**owes none.Gates
Gate 1 (from
context/verify.md): every command below exited 0.pnpm checkpnpm typecheckpnpm --filter docs typecheckpnpm buildpnpm docs:buildpnpm --filter docs worker:bundle-checkpnpm docs:audit-dist(28 pages pass)pnpm test(3807 passed)pnpm docs:test(748 passed)Gate 2 used the bundled
reviewersubagent. It needed one loopback:FAIL. One blocking item: four places that document--jsonassignedstill listed only two reasons it could befalse. Those wereREADME.md,commands/branch.mdx,skills/worktree/SKILL.mdand the--helptext. All four are fixed.PASS WITH NOTES. Nothing was blocking.Non-blocking notes that were not acted on:
fields: nulland the Data Center path have no hidden-assignee test of their own. The code handles both.commands/branch.mdx, the new "So is an issue whose assignee Jira does not show…" sentence follows the "already yours" sentence, so "So is" can be misread.--assignflag summaries (README.md:333,branch.ts:156) still mention only the held-by-someone-else case.--helpwording "a Jira assignee Jira hides" repeats "Jira".The coder ran in-host, not as a subagent.