You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(jira): fix critical field mapping and validation issues in create plugin
Fix documentation gaps discovered during CNTRLPLANE-1961 creation that caused
multiple failures: epic linking, target version format, and summary validation.
Changes:
- Add Epic Link field (customfield_12311140) documentation to CNTRLPLANE skill
- Fix Target Version to show correct MCP format (array with ID) or recommend omitting
- Add prominent "Summary vs Description" warning to create-story skill
- Add summary validation and epic linking fallback to create.md command
- Consolidate duplicate content in create-story skill
- Move CNTRLPLANE-specific logic from create.md to CNTRLPLANE skill
- Replace real issue keys with generic placeholders in examples
The changes ensure correct Epic Link usage, proper field formats, and clearer
guidance on summary vs description to prevent common mistakes.
Related: CNTRLPLANE-1961
Copy file name to clipboardExpand all lines: plugins/jira/commands/create.md
+73Lines changed: 73 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,36 @@ Prompt for missing required information based on issue type:
164
164
3. Business requirements (customer impact, regulatory drivers, justification)
165
165
4. Affected packages and components (teams, operators, component mapping)
166
166
167
+
### ✅ Phase 5.5: Summary Validation
168
+
169
+
Before security validation, validate the summary format to catch common mistakes:
170
+
171
+
**Check for anti-patterns:**
172
+
1. Summary starts with "As a" (user story format belongs in description)
173
+
2. Summary contains "I want" or "so that" (belongs in description)
174
+
3. Summary exceeds 100 characters (likely too long, may be full user story)
175
+
176
+
**Action if anti-pattern detected:**
177
+
1. Detect that user put full user story in summary field
178
+
2. Extract the key action/feature from the summary
179
+
3. Generate a concise alternative (5-10 words)
180
+
4. Prompt user for confirmation:
181
+
```
182
+
The summary looks like a full user story. Summaries should be concise titles.
183
+
184
+
Current: "As a cluster admin, I want to configure ImageTagMirrorSet in HostedCluster CRs so that I can enable tag-based image proxying"
185
+
186
+
Suggested: "Enable ImageTagMirrorSet configuration in HostedCluster CRs"
187
+
188
+
Use the suggested summary? (yes/no/edit)
189
+
```
190
+
191
+
5. If user says yes, use suggested summary
192
+
6. If user says edit, prompt for their preferred summary
193
+
7. If user says no, use their original summary (but warn it may be truncated in Jira)
194
+
195
+
**Note:** This validation should happen BEFORE creating the issue, to avoid having to update the summary afterward.
196
+
167
197
### 🔒 Phase 6: Security Validation
168
198
169
199
Scan all content (summary, description, comments) for sensitive data:
@@ -202,6 +232,8 @@ Use the `mcp__atlassian__jira_create_issue` MCP tool with collected parameters.
202
232
203
233
The MCP tool parameters come from the combined guidance of type-specific, project-specific, and team-specific skills, with universal requirements always applied.
204
234
235
+
**Note:** Project-specific skills (e.g., CNTRLPLANE) may implement fallback strategies for handling creation failures (such as epic linking). Refer to the project-specific skill documentation for these strategies.
236
+
205
237
### 📤 Phase 8: Return Result
206
238
207
239
Display to user:
@@ -428,6 +460,47 @@ Would you like to edit the description?
428
460
-**"Permission denied"** → User may lack permissions, suggest contacting admin
429
461
-**"Issue type not available"** → Project may not support this issue type
430
462
463
+
### Epic Link Creation Failure
464
+
465
+
**Scenario:** Story/task creation fails when including epic link field.
466
+
467
+
**Action:**
468
+
Refer to project-specific skills for epic linking fallback strategies:
469
+
-**CNTRLPLANE:** See CNTRLPLANE skill "Epic Linking Implementation Strategy" section
@@ -31,25 +31,150 @@ This skill is automatically invoked by the `/jira:create` command when the proje
31
31
**Note:** Universal requirements (Security Level: Red Hat Employee, Labels: ai-generated-jira) are defined in the `/jira:create` command and automatically applied to all tickets.
32
32
33
33
### Target Version (customfield_12319940)
34
-
**Purpose:** Target release version for the feature/story/task
35
34
36
-
**Common default:**`openshift-4.21` (current development release)
35
+
**Status:**OPTIONAL (many issues in CNTRLPLANE have null target version)
37
36
38
-
**Override:** Teams may specify different versions based on their roadmap:
39
-
-`openshift-4.20` (maintenance release)
40
-
-`openshift-4.22` (future release)
41
-
-`openshift-4.23` (future release)
42
-
- Or team-specific version schemes
37
+
**Recommendation:****Omit this field** unless specifically required by the team or user explicitly requests it.
-**Value Format:** Epic key as string (e.g., `"CNTRLPLANE-123"`)
82
+
-**Used For:** Linking stories to epics
83
+
84
+
**IMPORTANT:** Do NOT use `additional_fields.parent` for epic-story relationships. The `parent` field has different semantics and will cause creation to fail.
85
+
86
+
### MCP Format for Epic Link
87
+
88
+
```python
89
+
additional_fields={
90
+
"customfield_12311140": "CNTRLPLANE-123", # Epic Link (use actual epic key)
91
+
"labels": ["ai-generated-jira"],
92
+
"security": {"name": "Red Hat Employee"}
93
+
}
94
+
```
95
+
96
+
### Epic Linking Implementation Strategy
97
+
98
+
When the `--parent` flag is provided for a story/task, use this implementation strategy:
99
+
100
+
#### Pre-Validation (Do This First)
101
+
102
+
Before attempting to create the issue:
103
+
1. Verify the parent epic exists using `mcp__atlassian__jira_get_issue`
104
+
2. If epic doesn't exist, prompt user:
105
+
```
106
+
Epic {epic_key} not found. Options:
107
+
1. Proceed without epic link
108
+
2. Specify different epic
109
+
3. Cancel creation
110
+
111
+
What would you like to do?
112
+
```
113
+
3. Only proceed if epic is valid or user chooses to proceed without link
114
+
115
+
#### Preferred Approach: Include Epic Link in Creation
116
+
117
+
Attempt to create the issue with Epic Link included:
118
+
```python
119
+
mcp__atlassian__jira_create_issue(
120
+
project_key="CNTRLPLANE",
121
+
summary="<story title>",
122
+
issue_type="Story",
123
+
description="<description>",
124
+
components="<component>",
125
+
additional_fields={
126
+
"customfield_12311140": "<epic-key>", # Epic Link (e.g., "CNTRLPLANE-456")
127
+
"labels": ["ai-generated-jira"],
128
+
"security": {"name": "Red Hat Employee"}
129
+
}
130
+
)
131
+
```
132
+
133
+
#### Fallback Strategy (If Creation Fails)
134
+
135
+
If creation fails with an error related to epic linking:
136
+
1. Detect error contains keywords: "epic", "parent", "customfield", or "link"
137
+
2. Inform user: "Epic link failed during creation, using fallback strategy..."
0 commit comments