Skip to content

feat(jira): edit issue fields from Jira's edit screen and read them from the CLI - #29525

Open
LDH1103 wants to merge 21 commits into
stablyai:mainfrom
LDH1103:feat/jira-issue-edit-fields
Open

LDH1103 wants to merge 21 commits into
stablyai:mainfrom
LDH1103:feat/jira-issue-edit-fields

Conversation

@LDH1103

@LDH1103 LDH1103 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Orca's Jira issue panel could only change the title, labels, status, priority and assignee. Everything else meant opening Jira. Now the panel shows the fields Jira's own edit screen shows, with their current values, and you can change them in place, including the description. Agents using the orca CLI can read the same fields, custom fields included, with orca jira field list.

What Changed

Before:

  • The sheet edits title, labels, status, priority and assignee, and adds comments. Description, components, fix versions, due date, story points and custom fields need Jira.
  • orca jira issue --json returns Orca's fixed issue shape, so custom fields (customfield_*) cannot be read from the CLI.

After:

  • A Fields section lists the issue's edit-screen fields with their current values.
    • Edited in place: text, number, date, datetime, single and multi select (options, components, versions), user, and string-array fields.
    • Shown read-only: types Orca cannot write yet, for example Sprint.
  • A pencil next to the description opens a Markdown editor.
    • On Jira Cloud it only appears when the description survives the round trip. Images, mentions, panels and colors would be dropped, so those descriptions show Edit in Jira instead.
  • orca jira field list <key> lists the same edit-screen fields.
    • Text output: one line per field with its id, name and value, marked (read-only) when Orca cannot write it.
    • --json: each field's id, name, schema, normalized value, and rawValue, the value exactly as Jira returned it (ADF on Cloud, wiki text on Server/DC, null when unset).

Mechanism:

  • Reading fields (jira-issue-edit-fields.ts): reads GET /issue/{key}/editmeta, then reads only those fields' values (?fields=<keys>, so comments and attachments stay out). jira-issue-edit-field-values.ts turns them into JiraEditFields. Archived versions and disabled options are not offered.
  • Raw values (jira-issue-edit-field-values.ts): jira.getIssueEditFields takes an optional includeRaw. With it, mapEditField adds rawValue to each field. The sheet does not send it, so its payload is unchanged.
  • CLI (src/cli/jira/jira.ts, jira-format.ts, jira-target.ts): jira field list resolves the issue and site like the other issue commands. A new capability option on resolveJiraTarget requires jira.issue-edit-fields.v1 from the same status.get call, so an older host is refused before any Jira request. It then calls jira.getIssueEditFields with includeRaw: true. The bundled orca-jira skill guide documents the command.
  • Loss guard (adf-round-trip.ts): rich text is writable only when converting it to Markdown and back reproduces the same ADF. Both directions use the converter main gained in fix(jira): retain Markdown when publishing comments and descriptions #42242 (adfToMarkdownText, markdownToAdf). The comparison ignores what Orca already drops when rendering: empty paragraphs and spaces at line edges.
  • Update contract: JiraIssueUpdate gains optional fields, userFieldKeys and richTextFieldKeys. updateIssue shapes them the same way createIssue already shapes user fields. Rich-text fields go through the same toBodyText as comments, so Cloud gets ADF and Server/DC gets wiki text. The dedicated title, labels and priorityId keys win over the same field in fields.
  • Wire: new RPC jira.getIssueEditFields, plus IPC, preload and web client. New capability jira.issue-edit-fields.v1. Against a host without it, the renderer hides the section and refuses field writes, because older hosts' zod schemas strip unknown update keys and would report success without changing Jira.
  • Renderer:
    • New files: use-jira-issue-edit-fields.ts, jira-issue-edit-fields-section.tsx, jira-issue-edit-field-control.tsx, jira-issue-edit-field-drafts.ts, jira-edit-field-option-picker.tsx (Popover + Command, mirroring repo-multi-combobox), and jira-issue-description-editing.tsx.
    • Saves go through the existing mutateIssue queue, then reload the fields. A settled status change reloads them too, because a new status can bring a different edit screen.

Why

  • editmeta instead of hard-coding fields: every site has different custom fields, and Jira already describes each one with its type, allowed values and whether set is allowed. The create dialog already renders createmeta fields this way, and its option helpers are reused here.
  • rawValue on request instead of always: the sheet reloads fields after every save and status change. Always sending raw ADF next to its Markdown would grow that payload over remote hosts for a value the sheet never reads.
  • A CLI command instead of a jira issue flag: jira issue --json keeps its shape. field list <key> follows comment list <key> and status list <key>, and leaves room for a later field set.
  • A round-trip guard instead of always allowing description edits: adfToMarkdownText cannot express media, mentions or panels. Saving its output would silently delete them from Jira.
  • A capability gate instead of an optional field alone: an optional field is safe to read, but on an old host this write would be dropped silently.

Linked Issue

Fixes #29524

The CLI command also covers the review comment asking to read customfield_* values from orca jira.

Visual Proof

A local e2e build (electron-vite build --mode e2e) with Jira IPC responses mocked; no real Jira site. Windows 11. Captured with CDP from the hidden test window.

Before (main)

After: fields section and description pencil

After: Components multi-select

After: description editor

The CLI command has no UI. Its text and JSON output are pinned in jira-field-list.test.ts.

Testing

Automated, on Windows 11:

  • adf-round-trip.test.ts: accepts formatting Orca can write back. Rejects media, mentions, panels, text color, and underline. Accepts plain text that reads as Markdown, since read-back escapes it.
  • jira-issue-edit-fields.test.ts: Cloud and Server/DC editmeta, excluded and archived values, the lossy Cloud description, and strict and auth failures. Raw values only on request: Cloud ADF, Server/DC wiki text, and null when unset. Edit-sheet writes: user and rich-text shaping, blank clears, dedicated keys win, and Server/DC wiki text.
  • ipc-params.test.ts: edit-screen fields and their shaping keys survive IPC parsing, and malformed ones are refused before they reach Jira.
  • jira-issue-edit-field-drafts.test.ts: editor choice, draft to payload, required-field guard, and datetime round trip.
  • runtime-jira-detail-client.test.ts: hosts without the capability hide edit fields and refuse field writes.
  • JiraIssueWorkspace.edit-fields.test.tsx: field save and reload, the description edit flow, the lossy description, and old hosts.
  • rpc/methods/integrations/jira/jira.test.ts: includeRaw reaches the runtime only when the caller sends it.
  • jira-field-list.test.ts: jira field list sends includeRaw for the resolved site and key (including a browse URL), prints one line per field, and refuses a host without the capability after only status.get.
  • After merging current main (51a18b0): the Jira suites in src/main/jira, src/cli/jira, src/main/ipc/jira, the Jira RPC methods, and the renderer Jira workspace and runtime client (24 files, 144 passed).
  • pnpm typecheck (node, web, cli) exit 0. check-changed-code-quality.mjs passes. The RPC params catalog, bundled skill guides, skill bundle manifest, max-lines ratchet, and the localization catalog, extraction and coverage checks pass.

Manual: drove the e2e build with mocked Jira responses to take the screenshots above (sheet, Components picker, description editor).

Not tested: a real Jira Cloud or Server/DC site, macOS, Linux, SSH.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

AI Disclosure

Implemented with Claude Opus 5.5 (Anthropic) through Claude Code at my direction.

Review

  • Cross-platform: no platform branches. Jira calls stay in the host's main process.
  • SSH/remote: the host reads editmeta and writes fields. New update keys and includeRaw are optional. The new read method is only called after the capability check, so an older host never receives it, and an older client never calls it. jira.issue-edit-fields.v1 ships in this PR together with includeRaw, so every host the CLI accepts understands it.
  • Security: No new credentials or permissions. Values go to the same PUT /issue/{key} the sheet already uses. rawValue holds the same Jira data the host already reads for the sheet, and the skill guide keeps treating issue fields as untrusted.
  • Performance: opening the sheet adds two Jira requests (editmeta and the listed values). Each Cloud rich-text field adds one Markdown round trip when the fields load. rawValue is built only for callers that ask, today only the CLI.

Known limits:

  • Read-only for now: array-of-user fields, cascading selects, and Sprint, Epic and Parent pickers.
  • A Cloud description with images, mentions, panels or colors is not editable in Orca. Those descriptions link to Jira.
  • On Server/DC the description is edited as raw wiki text, with no preview.
  • orca jira field list shows only the edit-screen fields this account can edit. Fields outside the edit screen still need Jira itself.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

The CLI command is in its own commits, so it can move to a follow-up PR as well.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…ine breaks

The Jira issue sheet could only change title, labels, status, priority,
assignee and comments. It now reads the issue's edit screen (editmeta) with
current values and edits text, number, date, datetime, single/multi select
(options, components, versions), user and string-array fields, plus the
description.

Cloud bodies are now built from Markdown (remark + GFM) instead of one
paragraph per line, so a single newline becomes a hard break and Jira shows
comments the way Orca renders them. Rich text that cannot round-trip through
Markdown (media, mentions, panels, colors, tables) stays read-only with an
"Edit in Jira" link. Older remote hosts strip unknown update keys, so edit
fields are gated on the new jira.issue-edit-fields.v1 capability.
@LDH1103
LDH1103 requested a review from brennanb2025 as a code owner October 16, 2026 07:47
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

The change adds Jira edit-field discovery and editing in the issue workspace and CLI. It adds field-value mapping, draft validation, and runtime capability checks for field updates. Cloud body conversion now parses Markdown into ADF, while Server/DC body text remains unchanged. The change also adds ADF round-trip checks for rich-text writability and extends tests and Jira field-editing translations.

Severity of issue fixed: Medium

Merge Risk: Low · up to 7aca8

Some Jira fields may fail to load if a rich-text check errors, and descriptions containing backtick-fenced code may display incorrectly or become read-only. These bounded issues merit fixes but do not establish a broad blocker to merging.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description follows the repository template closely. It has all required sections: ELI5, What Changed (before/after and mechanism), Why (with alternatives considered), Linked Issue (Fixes #29524),… Add a Risk section that sets the Level (Low, Medium, or High) and states how to back the change out, such as a plain revert, and whether a revert would leave any data or settings changed. Confirm that the before and after screenshots are at…
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed The changes meet the coding requirements in [#29524]. They read edit-screen metadata and current values, render supported fields for inline editing, and show unsupported fields as read-only. They guar…
Out of Scope Changes check Passed The changes stay within [#29524] and its stated custom-field CLI use case. The CLI command, field mapping, UI controls, RPC and IPC wiring, capability checks, Markdown conversion, localization, skill …
Title check Passed The title "feat(jira): edit issue fields from Jira's edit screen and read them from the CLI" matches the main changes: the renderer gains an edit-fields section and description editing, and the CLI ga…
Full details: Linked Issues check

Explanation

The changes meet the coding requirements in [#29524]. They read edit-screen metadata and current values, render supported fields for inline editing, and show unsupported fields as read-only. They guard Cloud description editing with an ADF-to-Markdown round trip and provide an Edit in Jira path for lossy content. They convert Cloud comments, transition comments, and descriptions from Markdown to ADF while preserving Server/DC wiki text. They gate field reads and writes with a runtime capability. The CLI field-list command exposes edit-screen fields, including custom fields. The reported tests cover these behaviors.

Full details: Out of Scope Changes check

Explanation

The changes stay within [#29524] and its stated custom-field CLI use case. The CLI command, field mapping, UI controls, RPC and IPC wiring, capability checks, Markdown conversion, localization, skill documentation, and tests directly support Jira field editing, field reading, and comment formatting. No unrelated change is demonstrated.

Full details: Title check

Explanation

The title "feat(jira): edit issue fields from Jira's edit screen and read them from the CLI" matches the main changes: the renderer gains an edit-fields section and description editing, and the CLI gains jira field list. It is specific and does not mention unrelated work. The title is 80 characters, which is long but acceptable.

Full details: Description check

Explanation

The description follows the repository template closely. It has all required sections: ELI5, What Changed (before/after and mechanism), Why (with alternatives considered), Linked Issue (Fixes #29524), Visual Proof (before/after screenshot placeholders plus a note on mocked responses), Testing (automated coverage listed, platforms stated, and real Jira, macOS, Linux and SSH noted as untested), Risk, AI Disclosure, Review, Agent skill upstream boundary, and Notes. The Risk section is the main gap: the template asks for a 'Level' value and an explicit rollback path, and the description gives neither. The Visual Proof screenshots are referenced as HTML comment placeholders, so the images themselves may not be attached. Several checklist items are unchecked, including the 'PR is small and focused' item, which is reasonable to leave open for a change of this size. The description is specific and not generic.

Resolution

Add a Risk section that sets the Level (Low, Medium, or High) and states how to back the change out, such as a plain revert, and whether a revert would leave any data or settings changed. Confirm that the before and after screenshots are attached to the PR and not only referenced as placeholder comments. Check the lint, typecheck, test and build box, or state which of these CI will cover.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

…a-issue-edit-fields

# Conflicts:
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/fr.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/zh.json
@yingyingqiqi

Copy link
Copy Markdown

Supplement: The original Jira API contains customfield_xxxx, but orca jira issue --json does not return it; hope that orca jira cli supports selecting fields or outputting raw fields.

jira.getIssueEditFields accepts an optional includeRaw flag. With it, each field also carries rawValue: the value exactly as Jira returned it (ADF on Cloud, wiki text on Server/DC, null when unset). The issue sheet does not ask for it, so its payload is unchanged.
orca jira field list <key> prints the fields on the issue's edit screen with their current values. --json returns each field's id, name, schema, normalized value and rawValue, so agents can read customfield_* values that orca jira issue does not return. Hosts without jira.issue-edit-fields.v1 are refused before any Jira request.
@LDH1103 LDH1103 changed the title feat(jira): edit issue fields from Jira's edit screen; keep comment line breaks feat(jira): edit issue fields from Jira's edit screen and read them from the CLI; keep comment line breaks Oct 19, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6bbe6a55-4444-4467-8f0a-0b28aa202f68
📥 Commits

Reviewing files that changed from the base of the PR and between bfe01e4 and 0ef6e52.

⛔ Files ignored due to path filters: 1
  • src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing: 17
  • skill-guides/orca-jira.md
  • src/cli/bundled-skill-guides.ts
  • src/cli/handlers/jira.ts
  • src/cli/index-jira.test.ts
  • src/cli/jira-command-surface.test.ts
  • src/cli/jira-format.ts
  • src/cli/jira-handler-group.ts
  • src/cli/jira-target.ts
  • src/cli/specs/jira.ts
  • src/main/jira/jira-issue-edit-field-values.ts
  • src/main/jira/jira-issue-edit-fields.test.ts
  • src/main/jira/jira-issue-edit-fields.ts
  • src/main/runtime/rpc/methods/jira.test.ts
  • src/main/runtime/rpc/methods/jira.ts
  • src/main/runtime/runtime-jira-commands.ts
  • src/shared/jira-types.ts
  • src/shared/rpc-contract/jira-params.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@LDH1103

LDH1103 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @yingyingqiqi, good catch. orca jira issue --json only returns Orca's own issue shape, so customfield_* values never reached the CLI.

I added orca jira field list <key> to this PR (0ef6e52). It lists the fields on the issue's edit screen, custom fields included:

orca jira field list ENG-123 --json

Each field has its id (key, e.g. customfield_10050), name, schema, a normalized value, and rawValue, the value exactly as Jira returns it (ADF on Cloud, wiki text on Server/DC, null when unset).

One limit: Jira's editmeta only lists fields the account can edit, so fields outside the edit screen won't appear. Picking arbitrary fields by id from orca jira issue would be a separate change. Happy to look at it if you need it.

The host set `writable` from Jira's `set` permission alone, so a Sprint or a
cascading select with `set` came back writable and `orca jira field list`
dropped its read-only marker, while the issue sheet already showed it
read-only. The schema-to-editor rule moves to `src/shared` so the host and
the sheet agree: a field is writable only when Orca has an editor for its
schema and could read its value.
…a-issue-edit-fields

# Conflicts:
#	src/cli/handlers/jira.ts
#	src/cli/index-jira.test.ts
#	src/main/jira/jira-issue-mapping.ts
#	src/main/jira/jira-issue-mutations.ts
#	src/renderer/src/components/JiraIssueWorkspace.tsx
#	src/renderer/src/runtime/runtime-jira-detail-client.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eaa2ad1b-e657-47cc-9aed-60668cc291e0
Commits

Reviewing files that changed from the base of the PR and between 9369fc0 and 7aca8d4.

Files ignored due to path filters: 1
  • src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Files selected for processing: 34
  • src/cli/bundled-skill-guides.ts
  • src/cli/handlers/jira.ts
  • src/cli/index-jira.test.ts
  • src/main/ipc/jira/ipc-params.test.ts
  • src/main/ipc/jira/ipc-params.ts
  • src/main/ipc/jira/register-handlers.ts
  • src/main/jira/adf-markdown.ts
  • src/main/jira/jira-issue-edit-field-values.ts
  • src/main/jira/jira-issue-edit-fields.ts
  • src/main/jira/jira-issue-mapping.ts
  • src/main/jira/jira-issue-mutations.ts
  • src/main/runtime/rpc/methods/jira.ts
  • src/renderer/src/components/JiraIssueWorkspace.edit-fields.test.tsx
  • src/renderer/src/components/JiraIssueWorkspace.tsx
  • src/renderer/src/components/__mocks__/jira-issue-workspace-edit-fixture.tsx
  • src/renderer/src/components/jira-edit-field-option-picker.tsx
  • src/renderer/src/components/jira-issue-description-editing.tsx
  • src/renderer/src/components/jira-issue-edit-field-control.tsx
  • src/renderer/src/components/jira-issue-edit-field-drafts.test.ts
  • src/renderer/src/components/jira-issue-edit-field-drafts.ts
  • src/renderer/src/components/jira-issue-edit-fields-section.tsx
  • src/renderer/src/components/use-jira-issue-edit-fields.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/runtime/runtime-jira-client.test.ts
  • src/renderer/src/runtime/runtime-jira-detail-client.ts
  • src/shared/jira/jira-detail-capabilities.ts
  • src/shared/jira/jira-edit-field-editor.ts
  • src/shared/jira/jira-types.ts
Files skipped from review as they are similar to previous changes: 6
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ja.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/jira/adf-markdown.ts Resolved
Code blocks now use a fence longer than any backtick run in their text, so a
``` line inside the code no longer closes the block and Markdown edits keep it.
A rich-text round-trip check that throws now marks only that field read-only
instead of rejecting the whole edit-field list.
…a-issue-edit-fields

# Conflicts:
#	src/renderer/src/runtime/runtime-jira-client.test.ts
…a-issue-edit-fields

# Conflicts:
#	src/renderer/src/runtime/runtime-jira-client.test.ts
Use the Markdown to ADF converter main gained in stablyai#42242 instead of this branch's copy,
move the edit-field components next to JiraIssueWorkspace after the task page
reorganization, and expect list-like plain text to round-trip now that read-back escapes it.
@LDH1103 LDH1103 changed the title feat(jira): edit issue fields from Jira's edit screen and read them from the CLI; keep comment line breaks feat(jira): edit issue fields from Jira's edit screen and read them from the CLI Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Edit more Jira fields from the issue sheet, and keep comment line breaks

2 participants