Skip to content

[Feature]: Jira lanes — reliable drag-and-drop between columns, and editing Dev/QE assignments plus other fields beyond the row #98

Closed

Description

@nplez1

Problem or use case

Two related gaps in Orca's Jira task surface.

1. Dragging between lanes is unreliable and mostly silent about why

The report that started this: dragging tasks between lanes doesn't work. What the code does today is narrower than it looks, and every non-move failure that isn't a thrown error is invisible.

The only lane-drop surface is the sprint view of a board with an active sprint — TaskPageJiraBoardColumns receives the drag props only from that branch (src/renderer/src/components/task-page/jira/Board.tsx:258-302). The Backlog view renders a flat issue list with no drag at all (BacklogView.tsx:89-101). The drop decision tree is Board.tsx:134-176:

  • dropping on the lane that already holds the issue's status is a silent no-op (:147-149);
  • available transitions are matched to the lane by target status (getTaskPageJiraBoardTransitionTargets, src/renderer/src/components/task-page-jira-board-model.ts:90-96): none → a single generic toast "Jira has no available transition to X for Y" (:157-164); exactly one → applied; more than one → picker dialog (TransitionPicker.tsx);
  • while one drop is still resolving, further drops are silently ignored (:143-145, the movingIssueKey guard — and resolving can mean a live jiraListTransitions call);
  • "Other statuses" is a render-only bucket: it accepts no drop and offers no target status (BoardColumns.tsx:201) even though cards there are still draggable outward;
  • on success the board is refetched (Board.tsx:126) rather than the card moving; nothing is optimistic, so on a slow host the card visibly snaps back to its old lane until the refresh lands;
  • below all of that, errors are result.error — a flattened string out of the Jira client (src/main/jira/jira-issue-mutations.ts:130-138). Jira's per-field transition failures (a required resolution, screen requirements), permission problems and validation errors all collapse into one toast with no field-level detail. The transitions request carries only transition: { id } (:123-128), so a workflow that requires fields on a transition can never be completed from Orca at all.

The ask: a drop either moves the issue or says precisely why it can't; 'Other statuses' gets an explicit rule; the card moves optimistically and rolls back visibly on error; transitions that need fields ask for them.

2. Editing stops at what the row displays — Dev/QE are unreachable

JiraIssueUpdate is {title, labels, assigneeAccountId, priorityId, transitionId} (src/shared/jira-types.ts:189-195); the issue detail and the right-sidebar pane edit exactly those, plus transitions (jira-issue-workspace-detail-state.ts:169-229, jira-issue-workspace-chrome.tsx:138-216, JiraLinkedIssuePane.tsx:112-339). Description isn't editable at all — create-only (jira-issue-mutations.ts:57-59).

The Dev and QE assignments are user-picker custom fields (site-specific customfield_NNNNN ids), and Orca cannot set them on an existing issue: the update path has no custom-field support at all (updateIssue, jira-issue-mutations.ts:88-139). Create does have the machinery — arbitrary customFields plus userFieldKeys, shaped into Jira's {accountId} / {name} reference objects by userFieldRef / toUserFieldValue (src/shared/jira-types.ts:208-218, jira-issue-mutations.ts:21-37) — and the create dialog renders create-meta fields generically (IssueDialog.tsx:276-345), but only required ones (isVisibleJiraCreateField, task-page-jira-create-fields.ts:24-26, applied at use-task-page-jira-creation-projects.ts:69-70). So an optional Dev/QE field never appears in create, and a required one is create-only.

Nothing reads custom fields back, either: JiraIssue (src/shared/jira-types.ts:162-181) and the field lists ISSUE_FIELDS / ISSUE_LIST_FIELDS / ISSUE_SUMMARY_FIELDS (src/main/jira/jira-issue-mapping.ts:22-51) never request them, so a value that exists in Jira never appears anywhere in Orca.

The stated need is narrow: set/clear Dev and QE from Orca's issue UI even though those fields are not (and need not be) columns in the row/summary view; other fields are welcome wherever Jira permits.

What the Jira API already gives us for this

  • GET /rest/api/3/issue/{key}/editmeta — the fields visible to and editable by the user for that issue: each entry's key (custom fields included), name, required, operations (set/add/remove), allowedValues, schema, defaultValue. This is the API's own answer to "what can we edit here", and it is the edit-side sibling of the createmeta read Orca already performs for create (listCreateFields → /issue/createmeta/{project}/issuetypes/{type} , src/main/jira/jira-issue-create-metadata.ts:59-106).
  • PUT /rest/api/3/issue/{key} with {fields: {...}} — sets system fields (summary, description, labels, dueDate, priority {id}, assignee {accountId}) and custom fields ("customfield_10001": {accountId} for user pickers); description and textarea custom fields take ADF.
  • POST /rest/api/3/issue/{key}/transitions accepts fields / update beside transition, so transitions with required input can be completed rather than refused.
  • The dedicated PUT /issue/{key}/assignee route Orca already uses stays the right tool for the system assignee.

Proposed solution

  1. Extend the update contract with customFields + userFieldKeys, mirroring create (src/shared/jira-types.ts:208-218), applied in updateIssue through the same {fields} PUT and the existing user-ref shaping.
  2. Add an editmeta read (host function, runtime command, renderer client) returning records in the existing JiraCreateField shape, and render the same controls the create dialog already has — user picker for schema.type === 'user' (jira-user-picker.tsx), select for allowedValues, text/number otherwise. Gate what is offered by editmeta, not by what the row displays.
  3. Dev/QE are resolved by field name from editmeta, so no site-specific field id is hardcoded.
  4. Drag: every drop gets an outcome — move, picker, or a specific Jira-derived reason; 'Other statuses' becomes an explicit rule (target picker or clearly non-droppable); optimistic lane move with rollback; field-level error text surfaced where the API returns it.

Acceptance criteria

  • Dev and QE (user-picker custom fields, found via editmeta) can be set and cleared from the Orca issue detail without those fields being displayed in the task row or summary view.
  • A rejected value surfaces Jira's own field-level error, not a generic failure string.
  • A lane drop either moves the card or states a specific, Jira-derived reason; the card moves optimistically and rolls back visibly on failure.
  • A transition whose workflow requires fields is completable from Orca (the fields are prompted) or refused with the missing field named.
  • Custom-field editing works on Jira Cloud and on Server/DC, where the same fields exist.

Alternatives or additional context

  • A generic "edit every Jira field" form is not required for the Dev/QE need; a small editmeta-driven form scoped to the issue detail covers it and generalizes to other custom fields later.
  • The multi-board work ([Feature]: Multiple Jira boards — add a set of boards and switch between them in the Tasks view #86) changes board selection but not this drop/edit path — both touch Board.tsx, so they should be sequenced rather than run in parallel.
  • The create dialog's field renderer (IssueDialog.tsx:276-345) is close to what an edit form needs; reusing it keeps the schema-to-control mapping in one place instead of a second, divergent copy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions