Skip to content

jira: use standard parent field and document hierarchy level constraints - #606

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
cblecker:fix/jira-create-use-parent-field
Jul 8, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
cblecker:fix/jira-create-use-parent-field

Conversation

@cblecker

@cblecker cblecker commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace customfield_10014 (Epic Link) and customfield_10018 (Parent Link) with the standard Jira parent field for all parent-child relationships (Story→Epic, Task→Epic, Bug→Epic, Epic→Feature, Feature→Outcome)
  • Remove the elaborate 5-step fallback, error tables, and format guidance that existed only because of custom field fragility
  • Document the Jira hierarchyLevel system (Outcome=3, Feature=2, Epic=1, Story/Task/Bug=0, Sub-task=-1) and the constraint that parents must be exactly one level higher
  • Fix pre-validation table: Task's parent is Epic only (not Story, which is the same hierarchy level), add missing rows for Bug and Feature
  • Add guidance for changing issue types across hierarchy levels — parent must be unset before changing type, then re-set afterward

Why: Empirical testing on redhat.atlassian.net confirmed that {"parent": {"key": "PARENT-KEY"}} works for all hierarchy levels. The parent field is simpler, more portable, and eliminates the need to know instance-specific custom field IDs. The hierarchy level documentation prevents silent failures when setting invalid parent-child relationships.

Test plan

  • Run /jira:create story GCP "Test parent linking" --parent GCP-248 and verify the Story is linked to the Epic
  • Run /jira:create epic GCP "Test epic parent" --parent GCP-100 and verify the Epic is linked to the Feature
  • Verify make lint passes

Summary by CodeRabbit

  • Documentation
    • Streamlined Jira issue-creation guidance for setting parent-child relationships using additional_fields and clarified hierarchy-level constraints.
    • Updated fallback flow to create first when parent-related errors occur, then link via an edit step; clarified how changing issue type across hierarchy levels must be handled.
    • Refreshed Epic/Feature linking and custom field/format examples across Jira reference docs, including CNTRLPLANE and GCP HCP conventions.
  • Chores
    • Bumped Jira plugin version to 0.8.3 in marketplace and embedded site documentation.

@openshift-ci
openshift-ci Bot requested review from Prashanth684 and stleerh July 7, 2026 06:26
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f064c9bb-d1a0-45ad-9a32-7e93f0bbafe0

📥 Commits

Reviewing files that changed from the base of the PR and between 1ec5073 and 2bcf3d9.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/jira/.claude-plugin/plugin.json
  • plugins/jira/reference/cntrlplane.md
  • plugins/jira/reference/create-epic.md
  • plugins/jira/reference/gcp-hcp.md
  • plugins/jira/skills/create/SKILL.md
✅ Files skipped from review due to trivial changes (4)
  • plugins/jira/.claude-plugin/plugin.json
  • plugins/jira/reference/create-epic.md
  • docs/index.html
  • plugins/jira/reference/gcp-hcp.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • plugins/jira/reference/cntrlplane.md
  • .claude-plugin/marketplace.json

Walkthrough

This PR bumps Jira plugin version metadata to 0.8.3 and updates Jira create/reference documentation to use structured parent linking through additional_fields instead of custom-field-based Epic/Parent Link guidance.

Changes

Jira metadata and documentation updates

Layer / File(s) Summary
Version metadata bump
.claude-plugin/marketplace.json, docs/index.html, plugins/jira/.claude-plugin/plugin.json
Updates the Jira plugin version from 0.8.2 to 0.8.3 in marketplace, docs, and plugin manifest metadata.
Create skill parent linking
plugins/jira/skills/create/SKILL.md
Replaces relationship-link custom-field guidance with hierarchy-based parent linking, simplifies fallback handling, and updates field-format examples.
Reference doc updates
plugins/jira/reference/cntrlplane.md, plugins/jira/reference/create-epic.md, plugins/jira/reference/gcp-hcp.md
Removes explicit Epic Link/Parent Link field mappings and updates the Jira reference docs to point to the new parent-linking approach.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: lgtm

Suggested reviewers: bryan-cox

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: switching Jira to the standard parent field and documenting hierarchy-level constraints.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed Touched docs/commands only use technical or project terms; no real-person names appear as style references or examples.
No Assumed Git Remote Names ✅ Passed The PR diff only changes Jira parent-link docs and version bumps; no hardcoded git remote names or remote commands were added.
Git Push Safety Rules ✅ Passed PASS: The patch only updates Jira docs/version metadata; no git push, main/master push, or force-push commands were added.
No Untrusted Mcp Servers ✅ Passed Diff only updates Jira docs/version metadata; no new MCP server installs, npm deps, or npx @/mcp-server- patterns appear in changed files.
Ai-Helpers Overlap Detection ✅ Passed No separate overlapping PR found: the only exact match is the PR under review (#606), and other Jira PRs differ in title/files; existing-doc similarity is low.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@cblecker
cblecker force-pushed the fix/jira-create-use-parent-field branch from 5cf498e to 5be8944 Compare July 7, 2026 06:30

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/jira/.claude-plugin/plugin.json`:
- Around line 2-4: The plugin manifest is missing the required author metadata,
so update the jira plugin’s plugin.json to include an author field alongside
name, description, and version. Use the existing manifest structure in
plugin.json and add author as a JSON object with a name key, matching the
contract expected for plugins/*/.claude-plugin/plugin.json.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 390b8271-2ca8-4fe3-ba0a-f1eddb9943f5

📥 Commits

Reviewing files that changed from the base of the PR and between fb6434a and 5be8944.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/jira/.claude-plugin/plugin.json
  • plugins/jira/reference/cntrlplane.md
  • plugins/jira/reference/create-epic.md
  • plugins/jira/reference/gcp-hcp.md
  • plugins/jira/skills/create/SKILL.md

Comment thread plugins/jira/.claude-plugin/plugin.json
@cblecker
cblecker force-pushed the fix/jira-create-use-parent-field branch from 5be8944 to 1ec5073 Compare July 7, 2026 15:01
@cblecker cblecker changed the title jira: use standard parent field instead of custom field IDs jira: use standard parent field and document hierarchy level constraints Jul 7, 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/jira/skills/create/SKILL.md (1)

175-181: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Use Jira component objects here components should be an array of objects, not bare strings; e.g. [{ "id": "..." }] or [{ "name": "Name" }] depending on the Jira instance.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/jira/skills/create/SKILL.md` around lines 175 - 181, The SKILL.md
field format example for components is incorrect because it shows bare string
values instead of Jira component objects. Update the Component row in the field
format errors section to use an array of component objects in the create
payload, and reference the surrounding examples in the create skill docs so it
clearly shows the expected shapes such as id or name objects rather than plain
strings.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/jira/skills/create/SKILL.md`:
- Around line 138-155: The hierarchy-change flow in the SKILL.md guidance is
currently a partial-update sequence that can leave an issue mid-transition if
`editJiraIssue` fails after unsetting the parent or changing the type. Update
the instructions around the “Changing Issue Type Across Hierarchy Levels”
section to require guarded execution in `editJiraIssue` and to explicitly define
recovery: either restore the original parent/type on failure or clearly surface
that the issue is in a partial state before proceeding. Ensure the guidance
references the separate `parent` and `issuetype` edits so implementers can
locate the sequence easily.

---

Outside diff comments:
In `@plugins/jira/skills/create/SKILL.md`:
- Around line 175-181: The SKILL.md field format example for components is
incorrect because it shows bare string values instead of Jira component objects.
Update the Component row in the field format errors section to use an array of
component objects in the create payload, and reference the surrounding examples
in the create skill docs so it clearly shows the expected shapes such as id or
name objects rather than plain strings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2a659a2d-3b2c-47e6-abc5-41b4152ac63d

📥 Commits

Reviewing files that changed from the base of the PR and between 5be8944 and 1ec5073.

📒 Files selected for processing (7)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/jira/.claude-plugin/plugin.json
  • plugins/jira/reference/cntrlplane.md
  • plugins/jira/reference/create-epic.md
  • plugins/jira/reference/gcp-hcp.md
  • plugins/jira/skills/create/SKILL.md
✅ Files skipped from review due to trivial changes (6)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/jira/.claude-plugin/plugin.json
  • plugins/jira/reference/create-epic.md
  • plugins/jira/reference/gcp-hcp.md
  • plugins/jira/reference/cntrlplane.md

Comment thread plugins/jira/skills/create/SKILL.md
@cblecker

cblecker commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/cc @billmvt @katherinekeane

@openshift-ci
openshift-ci Bot requested review from billmvt and katherinekeane July 7, 2026 15:24
@katherinekeane

Copy link
Copy Markdown
Contributor

Overall: Solid simplification. Replacing instance-specific custom field IDs with the standard parent field is the right call, and the hierarchy level documentation is a genuine improvement. A few minor suggestions below.


1. Consider retaining a duplicate guard in the fallback

The new fallback (SKILL.md, Parent Linking Fallback section) says: if creation fails with a parent-related error, create without the parent and then link via editJiraIssue. The old fallback included a "duplicate guard" step — search by summary before retrying, because the original call may have partially succeeded.

Jira Cloud typically returns validation errors before writing, so partial success is unlikely in practice. That said, network timeouts can still leave a server-side record with no client-side confirmation. You might consider adding a brief note like: "Before retrying, search for an existing issue with the same summary to avoid creating a duplicate." Low priority, but the guard existed for a reason.

2. Consider defining what counts as a "parent-related error"

The fallback trigger is "if creation fails with a parent-related error," but doesn't specify what that looks like in the API response. The old error table listed concrete message strings (customfield_10014 is not valid, Cannot link to issue of type X, etc.) so the skill knew exactly when to apply the fallback. With the new parent field, the error messages will be different — worth documenting so the AI doesn't apply the fallback on unrelated failures or miss it when it should apply.

3. Confirm GCP Epic test was run, not just planned

The test plan includes /jira:create epic GCP "Test epic parent" --parent GCP-100, which is exactly the right test for the removed "Do NOT include parent link at creation" guidance in gcp-hcp.md. The checkboxes are currently unchecked — worth confirming those items were actually executed before merge, since removing that caution is a behavior change.

4. Minor: create-epic.md could cross-reference additional_fields

The updated create-epic.md now says Epic→Feature uses {"parent": {"key": "FEATURE-KEY"}} in additional_fields. A brief note pointing to SKILL.md or the createJiraIssue tool's additional_fields parameter would make it more self-contained for someone who only reads the Epic-specific reference. Totally optional.

@cblecker

cblecker commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the thorough review! Addressing each point:

1. Duplicate guard: Declining — the old guard triggered on 4xx validation errors, which are synchronous rejections before issue creation. Jira's single-issue create is all-or-nothing at validation time, so the partial-success scenario doesn't apply to this error class. The network-timeout risk is real broadly, but it applies to any POST call and would be better addressed as generic retry guidance rather than a parent-linking-specific guard. The guard's trigger condition (custom field errors for customfield_10014/customfield_10018) was also removed entirely with the switch to the standard parent field.

2. Parent-related error definition: Declining — the old concrete error strings (customfield_10014 is not valid, etc.) were specific to the now-removed custom fields and can't be meaningfully updated for the standard parent field without empirical testing. The AI agent consuming this skill has the full error response and can reason about whether an error is parent-related from context.

3. GCP Epic test: Confirmed — we ran these tests and verified the standard parent field works at creation time for GCP epics. Will check the boxes in the PR description.

4. create-epic.md cross-reference: Declining — create-epic.md is only reachable via SKILL.md's dispatch table, so the agent always has the hierarchy/fallback context loaded already. None of the other 5 type-specific reference guides have back-links either, so adding one here would be inconsistent.

The standard Jira parent field works for all hierarchy levels
(Story→Epic, Epic→Feature) and is simpler than setting custom
field IDs directly. Remove customfield_10014/customfield_10018
references and the fallback complexity that existed only because
of custom field fragility.

Document the Jira hierarchyLevel system (Outcome=3, Feature=2,
Epic=1, Story/Task/Bug=0, Sub-task=-1) and the constraint that
parents must be exactly one level higher. Fix the pre-validation
table: Task's parent is Epic only (not Story, which is the same
level), and add missing rows for Bug and Feature.

Add guidance for changing issue types across hierarchy levels —
the parent must be unset before changing the type, then re-set
afterward, because Jira validates the one-level-higher constraint
on every edit.

Assisted-by: Claude:claude-opus-4-6
@cblecker
cblecker force-pushed the fix/jira-create-use-parent-field branch from 1ec5073 to 2bcf3d9 Compare July 8, 2026 17:00

@katherinekeane katherinekeane 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.

LGTM

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2026
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cblecker, katherinekeane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit c3f880e into openshift-eng:main Jul 8, 2026
6 checks passed
@cblecker
cblecker deleted the fix/jira-create-use-parent-field branch July 8, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants