Skip to content

Create dialog renders empty form + generic 400 on submit when project Field Configuration ships an empty create screen (Jira DC) #1852

@lantik-ac74

Description

@lantik-ac74

Symptom

When opening the "Create Work Item" dialog in atlascode against a Jira DC project whose Field Configuration ships an empty create screen for a given issue type, two UX problems compound:

  1. Empty form, no explanation. atlascode calls GET /rest/api/2/issue/createmeta/<KEY>/issuetypes/<TYPE_ID>, receives {"values": [], "isLast": true, ...} (HTTP 200, valid response, just an empty fields array), and renders the create dialog with no fields beyond the universal Project / Issue Type selectors. No message hints at what's going on.

  2. Submit gives a generic 400 toast. If the user fills in summary in some way (e.g. the field appears because atlascode treats it as universal), submit hits POST /rest/api/2/issue which returns:

    {
      "errorMessages": [],
      "errors": {
        "summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown."
      }
    }

    atlascode surfaces this as Request failed with status code 400 — the per-field error message that would actually be actionable (the summary field is not on the configured create screen → ask your Jira admin) is dropped.

Environment

  • Jira: Data Center 10.3.19 (buildNumber 10030019, deploymentType Server)
  • atlascode: 4.0.30
  • Affected: any project whose Field Configuration scheme sets an empty create screen for a given issue type. Common on default templates that ship gestion-style projects in some DC deployments.

Reproduction

  1. On any Jira DC instance, identify or create a project whose Field Configuration sets an empty create screen for at least one issue type. Concretely: GET /rest/api/2/issue/createmeta/<KEY>/issuetypes/<ID> returns {"values": []}.
  2. In atlascode, "Create Work Item" → choose that project + that issue type.
  3. Observe the dialog renders without any fields beyond Project + Issue Type. No "this project's create screen has no fields configured" hint.
  4. If you submit anyway (or if the dialog auto-populates summary somewhere), the response is a generic 400 toast.

Expected behaviour

  • When createmeta returns values: [], atlascode should render an explanatory message in the dialog ("This project's create screen has no fields configured; contact your Jira admin to add the required fields") instead of an empty form.
  • When POST /rest/api/2/issue returns {"errors": {"<field>": "Field '<field>' cannot be set. It is not on the appropriate screen, or unknown."}}, atlascode should surface the per-field error message instead of replacing it with a generic Request failed with status code N. The field name is the actionable signal.

Related

This is a separate bug from #1851 (webview view-render crash on single-issue-picker-cf fields). #1851 is a code crash; this one is a UX gap on an unusual but valid server-side state. They share an underlying pattern (atlascode field-descriptor coverage on DC-specific scenarios) but should be triaged independently.

Notes

Lantik DC users currently work around the empty-create-screen state via POST /secure/QuickCreateIssue.jspa (the web UI's quick-create endpoint, bypasses field-configuration filtering). atlascode could do the same internally, but the maintainability cost of consuming an undocumented endpoint is high and probably not appropriate as a core fallback — error-surfacing is the right scope for the upstream fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions