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
Adjust jira skills for handling formatted descriptions (#31)
* Adjust jira skills for handling formatted descriptions
Assisted-by: Claude Opus 4.6
Signed-off-by: John Collier <jcollier@redhat.com>
* fix: apply ruff formatting to jira-wiki-to-adf.py
Assisted-by: Claude Opus 4.6
* fix: address PR #31 review feedback from Paul
- to-issue.md: story_points → customfield_10028 (field cannot be set via display name on writes)
- SKILL.md Gotcha #6: point agents at jira-wiki-to-adf.py instead of hand-rolling ADF
- to-epic/feature/issue.md: use $(mktemp) variable for ADF output files for portability
- to-epic/feature/issue.md: drop /tmp/ prefix from converter input paths (bare filename works cross-platform)
- to-epic.md: soften parent link wording — both customfield_10018 and parent.key work; warn only against issuelinks
- jira-wiki-to-adf.py: switch to argparse with --help, add encoding="utf-8" on file I/O, remove unused sys import
- tests/unit/test_jira_wiki_to_adf.py: 10 unit tests against epic-example.txt (heading, bulletList, taskList, inline marks)
- acli-commands.md, templates.md, support.md: fix old plain-text create flow to use ADF conversion step
Assisted-by: claude-sonnet-4-6
---------
Signed-off-by: John Collier <jcollier@redhat.com>
Copy file name to clipboardExpand all lines: skills/rhdh-jira/SKILL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,7 @@ Before attempting any REST API or GraphQL call:
88
88
|`scripts/parse_issues.py`| Flatten, enrich, and filter acli JSON output. Solves the core problem: `acli search --json` can't return custom fields (team, story points, sprint). Pipe search results in, get clean data out. Use `--enrich` to fetch full fields, `-f team="X"` to filter by team. |
89
89
|`scripts/command-metadata.json`| Single source of truth for sub-command descriptions and argument hints. |
90
90
|`scripts/validate_components.py`| Validate `references/fields.md` component catalog against live Jira projects (RHIDP + RHDHPLAN). Reports drift in both directions. Run with `--json` for structured output. |
91
+
|`scripts/jira-wiki-to-adf.py`| Convert a filled Jira wiki markup template to Atlassian Document Format JSON for use with `acli --description-file`. Handles `hN.` headings, `* ` bullets, `# ` ordered lists, `(?)` / `(/)` task items, `*bold*`, `_italic_`, `{{monospace}}`, backtick code. Usage: `python scripts/jira-wiki-to-adf.py input.txt > output.adf.json`|
91
92
92
93
## Projects
93
94
@@ -150,7 +151,7 @@ Load only what the current task requires.
150
151
3.**`--yes` is mandatory for mutations.** All `edit`, `transition`, `assign`, and `link create` commands prompt interactively without it. Always pass `--yes`.
151
152
4.**`--fields` is restrictive on search.** Only accepts `key`, `summary`, `status`, `assignee`, `issuetype`, `priority`, `description`, `labels`. For components, sprint, fixVersions, and all custom fields — use `--json` or `scripts/parse_issues.py --enrich`.
152
153
5.**Team field has two JQL syntaxes.**`customfield_10001` cannot be used in JQL WHERE clauses. However, `"Team[Team]" = {teamId}` (using the team UUID, not display name) works. Use the UUID syntax for JQL filtering; use `customfield_10001.name` in post-processing only when you need the display name from JSON output.
153
-
6.**ADF vs plain text.** Reading descriptions via `--json` returns Atlassian Document Format (nested JSON). Creating/editing with `--description` accepts plain text. Don't try to round-trip ADF through `--description`.
154
+
6.**ADF is required for formatted descriptions.** Reading descriptions via `--json` returns Atlassian Document Format (nested JSON). Jira Cloud's editor is ADF-native — plain text and Jira wiki markup (`h1.`, `*bold*`) both render as literal characters in the UI. For formatted descriptions, fill a wiki markup template then run `scripts/jira-wiki-to-adf.py <input.txt> <output.json>` to convert to ADF, then pass via `--description-file`. Both `acli create` and `acli edit` accept ADF JSON via `--description-file`. Do not use Jira wiki markup in description files expecting it to render.
154
155
7.**Acceptance Criteria field is almost always null.** Scan the description for "Requirements", "Acceptance Criteria", or bullet-style criteria instead of checking `customfield_10718`.
155
156
8.**`--enrich` is MANDATORY for custom fields AND labels.** Both `acli search --json` and `acli view KEY --json` (without `--fields "*all"`) return only basic fields (assignee, issuetype, priority, status, summary). Labels, story points, team, sprint, size, and components will all appear as empty/null — looking like the data isn't set when it actually is. Always use `scripts/parse_issues.py --enrich` to get custom field data. Skipping `--enrich` is the #1 cause of false "missing data" reports.
156
157
9.**`acli` cannot set arbitrary custom fields.**`acli jira workitem edit` does not have a `--custom` flag. Fields like Team, Size, Story Points, and Release Note Type can only be updated via the Jira REST API. Use `PUT /rest/api/3/issue/{key}` with the field payload (see `references/rest-api-fallback.md` for curl examples and payload formats). Find the token file at `.jira-token` next to the `acli` executable (discover the path with `readlink -f "$(which acli)"` or `where acli`). Never read the token file into context.
@@ -162,6 +163,7 @@ Load only what the current task requires.
162
163
15.**Don't remove `rhdh-X.Y-candidate` labels.** Candidate labels track release targeting. Removing them without PM approval can silently drop a feature from release tracking.
163
164
16.**Feature→Epic child links use Parent Link, not issuelinks.** Cross-project parent-child relationships (RHDHPLAN Feature → RHIDP Epic) use the `Parent Link` field (`customfield_10018`), not `issuelinks`. To find child Epics of a Feature, use JQL: `project = RHIDP AND type = Epic AND "Parent Link" = RHDHPLAN-XXX`. Checking `issuelinks` will show zero results and produce false "no child Epics" reports.
164
165
17.**REST `/rest/api/3/search` returns 410 Gone.** This endpoint has been removed. Use POST to `/rest/api/3/search/jql` with body `{"jql": "...", "fields": [...], "maxResults": N}` instead. This only affects direct REST calls — `acli search` still works.
166
+
18.**`acli workitem create` does not support `--priority`, `--component`, or `--yes`.** These flags exist on `edit`, `transition`, and `assign` but not on `create` — passing them causes "unknown flag" errors. After creating an issue, set priority, components, size (`customfield_10795`), and parent link (`customfield_10018`) together in a single `PUT /rest/api/3/issue/{key}` call.
Copy file name to clipboardExpand all lines: skills/rhdh-jira/references/acli-commands.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,7 @@ acli jira filter get --id 10001
240
240
| Labels | Not available via `--fields`| Array of strings |
241
241
| Fix versions | Not available via `--fields`| Array of version objects |
242
242
243
-
When writing descriptions, use `--description "plain text"`. When reading, be aware `--json` returns ADF — don't try to round-trip it.
243
+
When writing formatted descriptions, fill a wiki markup template then convert with `scripts/jira-wiki-to-adf.py` and pass via `--description-file` (see Gotcha #6 in SKILL.md). When reading, be aware `--json` returns ADF — don't try to round-trip it.
Then set priority, components, size, and parent Feature link together in one REST call. Cross-project parent links accept either `customfield_10018` or `parent.key` — do not use `issuelinks` (see Gotcha #16):
102
106
103
107
```bash
104
108
curl -s -X PUT -u "$AUTH" -H "Content-Type: application/json" \
Copy file name to clipboardExpand all lines: skills/rhdh-jira/references/to-feature.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,19 +96,37 @@ If a likely duplicate Feature is found, present it and ask: "This may already ex
96
96
97
97
### Step 7 — Create Feature
98
98
99
-
Fill the template with grill results. Save to a temp file. Create the issue:
99
+
Fill the template with grill results. Save to a temp file. Then convert to ADF using the helper script (see Gotcha #6). `acli create` accepts ADF via `--description-file`:
100
+
101
+
```bash
102
+
FEATURE_ADF=$(mktemp)# on Windows: use %TEMP% or Python tempfile
Copy file name to clipboardExpand all lines: skills/rhdh-jira/references/to-issue.md
+28-15Lines changed: 28 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,36 +119,49 @@ Run the pre-creation check from `references/duplicates.md`. Scope to the target
119
119
120
120
### Step 9 — Create Issue
121
121
122
-
Fill the template. Create the issue:
122
+
Fill the appropriate template (`assets/templates/story.txt`, `task.txt`, or `bug.txt`) with grill results, then convert to ADF using the helper script (see Gotcha #6). `acli create` accepts ADF via `--description-file`:
123
+
124
+
```bash
125
+
ISSUE_ADF=$(mktemp)# on Windows: use %TEMP% or Python tempfile
0 commit comments