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
@@ -150,6 +150,36 @@ Prompt for missing required information based on issue type:
150
150
- Expected results (correct behavior)
151
151
- Additional info (logs, screenshots)
152
152
153
+
### ✅ Phase 5.5: Summary Validation
154
+
155
+
Before security validation, validate the summary format to catch common mistakes:
156
+
157
+
**Check for anti-patterns:**
158
+
1. Summary starts with "As a" (user story format belongs in description)
159
+
2. Summary contains "I want" or "so that" (belongs in description)
160
+
3. Summary exceeds 100 characters (likely too long, may be full user story)
161
+
162
+
**Action if anti-pattern detected:**
163
+
1. Detect that user put full user story in summary field
164
+
2. Extract the key action/feature from the summary
165
+
3. Generate a concise alternative (5-10 words)
166
+
4. Prompt user for confirmation:
167
+
```
168
+
The summary looks like a full user story. Summaries should be concise titles.
169
+
170
+
Current: "As a cluster admin, I want to configure ImageTagMirrorSet in HostedCluster CRs so that I can enable tag-based image proxying"
171
+
172
+
Suggested: "Enable ImageTagMirrorSet configuration in HostedCluster CRs"
173
+
174
+
Use the suggested summary? (yes/no/edit)
175
+
```
176
+
177
+
5. If user says yes, use suggested summary
178
+
6. If user says edit, prompt for their preferred summary
179
+
7. If user says no, use their original summary (but warn it may be truncated in Jira)
180
+
181
+
**Note:** This validation should happen BEFORE creating the issue, to avoid having to update the summary afterward.
182
+
153
183
### 🔒 Phase 6: Security Validation
154
184
155
185
Scan all content (summary, description, comments) for sensitive data:
@@ -188,6 +218,8 @@ Use the `mcp__atlassian__jira_create_issue` MCP tool with collected parameters.
188
218
189
219
The MCP tool parameters come from the combined guidance of type-specific, project-specific, and team-specific skills, with universal requirements always applied.
190
220
221
+
**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.
222
+
191
223
### 📤 Phase 8: Return Result
192
224
193
225
Display to user:
@@ -407,6 +439,47 @@ Would you like to edit the description?
407
439
-**"Permission denied"** → User may lack permissions, suggest contacting admin
408
440
-**"Issue type not available"** → Project may not support this issue type
409
441
442
+
### Epic Link Creation Failure
443
+
444
+
**Scenario:** Story/task creation fails when including epic link field.
445
+
446
+
**Action:**
447
+
Refer to project-specific skills for epic linking fallback strategies:
448
+
-**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