jiradc-cli 1.0.36 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +281 -114
- package/dist/index.js +189 -80
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# jiradc-cli
|
|
2
2
|
|
|
3
|
-
Command-line interface for [Jira Data Center](https://developer.atlassian.com/server/jira/platform/rest-apis/).
|
|
3
|
+
Command-line interface for [Jira Data Center](https://developer.atlassian.com/server/jira/platform/rest-apis/). 114 commands across 9 domains — issues, projects, components, boards, sprints, fields, users, tokens, and Xray.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -15,16 +15,15 @@ export JIRA_URL="https://jira.example.com" # Base URL of your Jira instance
|
|
|
15
15
|
export JIRA_TOKEN="your-personal-access-token" # HTTP Access Token from Jira
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Argument conventions
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
- **
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- `issue link-epic` is now variadic on the issue argument: `link-epic <issueKey...> --epic <epicKey>`. Single-issue calls keep working.
|
|
20
|
+
Every command in the suite follows the same shape, so a form learned on one noun works on the next:
|
|
21
|
+
|
|
22
|
+
- **One positional, and it is the group's subject** — `issue get <key>`, `sprint get <id>`, `component get <id>`.
|
|
23
|
+
- **Scope is a flag** — `--project <key>`, `--board <id>`.
|
|
24
|
+
- **Sub-entities are entity-qualified flags** — `--comment-id`, `--worklog-id`, `--attachment-id`. There is no `--id`.
|
|
25
|
+
- **Prose is `--body`** (or the field's own name), and every prose flag has a `--<name>-file <path|->` companion that reads a file or stdin.
|
|
26
|
+
- **Pagination is `--limit` + `--start`.**
|
|
28
27
|
|
|
29
28
|
## Commands
|
|
30
29
|
|
|
@@ -32,161 +31,329 @@ All commands output JSON. Add `--pretty` to pretty-print.
|
|
|
32
31
|
|
|
33
32
|
### issue
|
|
34
33
|
|
|
35
|
-
| Command | Description
|
|
36
|
-
| ------------------------------------- |
|
|
37
|
-
| `jiradc issue get <key>` |
|
|
38
|
-
| `jiradc issue search <jql>` |
|
|
39
|
-
| `jiradc issue create` |
|
|
40
|
-
| `jiradc issue update <key>` |
|
|
41
|
-
| `jiradc issue delete <key>` |
|
|
42
|
-
| `jiradc issue assign <key
|
|
43
|
-
| `jiradc issue transition <key>` |
|
|
44
|
-
| `jiradc issue transitions <key>` |
|
|
45
|
-
| `jiradc issue createmeta` |
|
|
46
|
-
| `jiradc issue editmeta <key>` |
|
|
47
|
-
| `jiradc issue
|
|
48
|
-
| `jiradc issue
|
|
49
|
-
| `jiradc issue
|
|
50
|
-
| `jiradc issue link <
|
|
51
|
-
| `jiradc issue
|
|
52
|
-
| `jiradc issue
|
|
53
|
-
| `jiradc issue
|
|
54
|
-
| `jiradc issue
|
|
55
|
-
| `jiradc issue
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
| `jiradc issue
|
|
62
|
-
| `jiradc issue
|
|
34
|
+
| Command | Description |
|
|
35
|
+
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
+
| `jiradc issue get <key>` | One issue. `--fields` selects fields by id or name, `--all-fields` returns everything Jira holds, `--expand` adds changelog/names |
|
|
37
|
+
| `jiradc issue search <jql>` | Issues matching a JQL query. `--all` collects every match (capped at 1,000); `description` and `comment` are excluded unless asked for via `--fields` |
|
|
38
|
+
| `jiradc issue create` | The new issue's key and id. Requires `--project`, `--type`, `--summary`; `--fields <json>` sets anything else |
|
|
39
|
+
| `jiradc issue update <key>` | Applies field changes. Shortcuts for `--summary`/`--description`/`--priority`/`--assignee`, list flags for `--labels`/`--components`/`--fix-versions` |
|
|
40
|
+
| `jiradc issue delete <key>` | Deletes the issue. `--delete-subtasks` to take its subtasks with it |
|
|
41
|
+
| `jiradc issue assign <key>` | Sets the assignee. `--assignee` takes a username, `me`, or `none` to unassign |
|
|
42
|
+
| `jiradc issue transition <key>` | Moves the issue. `--to` accepts a transition id, a transition name, or the target status name; `--fields` supplies screen fields, `--comment` a note |
|
|
43
|
+
| `jiradc issue transitions <key>` | The transitions available from the current status, each with the screen fields it requires |
|
|
44
|
+
| `jiradc issue createmeta` | The fields a new issue accepts and the values they allow. Requires `--project` and `--type` |
|
|
45
|
+
| `jiradc issue editmeta <key>` | The fields this issue's edit screen accepts, with their allowed values |
|
|
46
|
+
| `jiradc issue link` | Links two issues. Requires `--from`, `--to` and `--type` (a link type name) |
|
|
47
|
+
| `jiradc issue unlink <id>` | Removes one issue link by its link id |
|
|
48
|
+
| `jiradc issue link-types` | The link type names this instance accepts, for `issue link --type` |
|
|
49
|
+
| `jiradc issue link-epic <keys...>` | Links one or more issues to `--epic <epicKey>`; reports a `failed` array if any link is rejected |
|
|
50
|
+
| `jiradc issue changelog <key>` | The issue's change history |
|
|
51
|
+
| `jiradc issue batch-changelog <keys>` | Change history for several issues at once, from a comma-separated key list |
|
|
52
|
+
| `jiradc issue clone <key>` | Creates a duplicate. `--include-links`, `--include-attachments`, `--summary` and `--project` control what carries over |
|
|
53
|
+
| `jiradc issue batch-create` | Creates many issues from `--issues <json>` (an array of field objects) |
|
|
54
|
+
| `jiradc issue dev-status <key>` | Branches, pull requests, commits and builds linked to the issue. `--detail` for the full records |
|
|
55
|
+
|
|
56
|
+
#### issue comment
|
|
57
|
+
|
|
58
|
+
| Command | Description |
|
|
59
|
+
| ----------------------------------- | --------------------------------------------- |
|
|
60
|
+
| `jiradc issue comment list <key>` | Comments on the issue, paginated |
|
|
61
|
+
| `jiradc issue comment get <key>` | One comment, selected with `--comment-id` |
|
|
62
|
+
| `jiradc issue comment create <key>` | Adds a comment from `--body` or `--body-file` |
|
|
63
|
+
| `jiradc issue comment update <key>` | Rewrites the comment named by `--comment-id` |
|
|
64
|
+
| `jiradc issue comment delete <key>` | Deletes the comment named by `--comment-id` |
|
|
65
|
+
|
|
66
|
+
#### issue worklog
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `jiradc issue worklog list <key>` | Work logged against the issue, paginated |
|
|
71
|
+
| `jiradc issue worklog create <key>` | Logs time. `--time "2h 30m"` is required; `--started` backdates it, `--comment` annotates it |
|
|
72
|
+
| `jiradc issue worklog update <key>` | Edits the entry named by `--worklog-id`, with `--adjust-estimate` / `--new-estimate` for the remaining-estimate knobs |
|
|
73
|
+
| `jiradc issue worklog delete <key>` | Deletes the entry named by `--worklog-id`, with the same estimate knobs plus `--increase-by` |
|
|
63
74
|
|
|
64
75
|
#### issue attachment
|
|
65
76
|
|
|
66
|
-
| Command
|
|
67
|
-
|
|
|
68
|
-
| `jiradc issue attachment list <key>`
|
|
69
|
-
| `jiradc issue attachment download <key
|
|
70
|
-
| `jiradc issue attachment download-all <key>`
|
|
71
|
-
| `jiradc issue attachment upload <key
|
|
72
|
-
| `jiradc issue attachment delete <
|
|
77
|
+
| Command | Description |
|
|
78
|
+
| -------------------------------------------- | -------------------------------------------------------------------- |
|
|
79
|
+
| `jiradc issue attachment list <key>` | Attachments on the issue, with their ids |
|
|
80
|
+
| `jiradc issue attachment download <key>` | Writes one attachment to `--output`, selected with `--attachment-id` |
|
|
81
|
+
| `jiradc issue attachment download-all <key>` | Writes every attachment into the `--output` directory |
|
|
82
|
+
| `jiradc issue attachment upload <key>` | Uploads the files listed in `--files` (comma-separated paths) |
|
|
83
|
+
| `jiradc issue attachment delete <key>` | Deletes the attachment named by `--attachment-id` |
|
|
73
84
|
|
|
74
85
|
### project
|
|
75
86
|
|
|
76
|
-
| Command | Description
|
|
77
|
-
| ------------------------------- |
|
|
78
|
-
| `jiradc project list` |
|
|
79
|
-
| `jiradc project
|
|
87
|
+
| Command | Description |
|
|
88
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
89
|
+
| `jiradc project list` | Every project you can see. `--include-archived` to include archived ones |
|
|
90
|
+
| `jiradc project get <key>` | One project — lead, issue type names, and `{count, use}` summaries for components and versions rather than their full contents |
|
|
91
|
+
| `jiradc project versions <key>` | The project's versions |
|
|
80
92
|
|
|
81
93
|
### component
|
|
82
94
|
|
|
83
|
-
| Command | Description
|
|
84
|
-
| ----------------------------------- |
|
|
85
|
-
| `jiradc component list` |
|
|
86
|
-
| `jiradc component get <id>` |
|
|
87
|
-
| `jiradc component create` |
|
|
88
|
-
| `jiradc component update <id>` |
|
|
89
|
-
| `jiradc component
|
|
95
|
+
| Command | Description |
|
|
96
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------ |
|
|
97
|
+
| `jiradc component list` | Components in `--project <key>` |
|
|
98
|
+
| `jiradc component get <id>` | One component |
|
|
99
|
+
| `jiradc component create` | Creates one. Requires `--project` and `--name`; `--lead`, `--assignee-type` optional |
|
|
100
|
+
| `jiradc component update <id>` | Changes only the fields you pass |
|
|
101
|
+
| `jiradc component delete <id>` | Deletes it, optionally reassigning its issues with `--move-issues-to <id>` |
|
|
102
|
+
| `jiradc component issue-count <id>` | How many issues currently use the component |
|
|
90
103
|
|
|
91
104
|
### board
|
|
92
105
|
|
|
93
|
-
| Command
|
|
94
|
-
|
|
|
95
|
-
| `jiradc board list`
|
|
96
|
-
| `jiradc board
|
|
106
|
+
| Command | Description |
|
|
107
|
+
| -------------------------- | ------------------------------------------------------------------------------------ |
|
|
108
|
+
| `jiradc board list` | Agile boards, filterable by `--project`, `--name` and `--type` (scrum/kanban/simple) |
|
|
109
|
+
| `jiradc board get <id>` | One board |
|
|
110
|
+
| `jiradc board issues <id>` | Issues on the board, narrowed with `--jql` and trimmed with `--fields` |
|
|
97
111
|
|
|
98
112
|
### sprint
|
|
99
113
|
|
|
100
|
-
| Command
|
|
101
|
-
|
|
|
102
|
-
| `jiradc sprint list <
|
|
103
|
-
| `jiradc sprint
|
|
104
|
-
| `jiradc sprint
|
|
105
|
-
| `jiradc sprint
|
|
106
|
-
| `jiradc sprint
|
|
114
|
+
| Command | Description |
|
|
115
|
+
| --------------------------- | ----------------------------------------------------------------------- |
|
|
116
|
+
| `jiradc sprint list` | Sprints on `--board <id>`, filtered by `--state` (future/active/closed) |
|
|
117
|
+
| `jiradc sprint get <id>` | One sprint |
|
|
118
|
+
| `jiradc sprint issues <id>` | Issues in the sprint, narrowed with `--jql` |
|
|
119
|
+
| `jiradc sprint create` | Creates a sprint on `--board <id>` with `--name`, `--goal`, dates |
|
|
120
|
+
| `jiradc sprint update <id>` | Renames, re-goals, re-dates, or moves the sprint's `--state` |
|
|
121
|
+
| `jiradc sprint delete <id>` | Deletes it and returns its issues to the backlog |
|
|
107
122
|
|
|
108
123
|
### field
|
|
109
124
|
|
|
110
|
-
| Command | Description
|
|
111
|
-
| ------------------------------- |
|
|
112
|
-
| `jiradc field search <keyword>` |
|
|
125
|
+
| Command | Description |
|
|
126
|
+
| ------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
127
|
+
| `jiradc field search <keyword>` | Fields whose name or id matches — name and type, **not** allowed values (use `createmeta`/`editmeta` for those) |
|
|
113
128
|
|
|
114
129
|
### user
|
|
115
130
|
|
|
116
|
-
| Command
|
|
117
|
-
|
|
|
118
|
-
| `jiradc user me`
|
|
131
|
+
| Command | Description |
|
|
132
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------ |
|
|
133
|
+
| `jiradc user me` | The profile behind `JIRA_TOKEN` |
|
|
134
|
+
| `jiradc user get <username>` | One user by exact username, or by user key with `--by-key` |
|
|
135
|
+
| `jiradc user search <query>` | Users matching part of a username, display name or email. `--include-inactive` to widen it |
|
|
136
|
+
|
|
137
|
+
### token
|
|
138
|
+
|
|
139
|
+
Personal Access Token management authenticates with **basic auth**, not `JIRA_TOKEN` — set `--basic-username` / `--basic-password`.
|
|
140
|
+
|
|
141
|
+
| Command | Description |
|
|
142
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
143
|
+
| `jiradc token list` | Your tokens' names, ids and expiry — never the secrets |
|
|
144
|
+
| `jiradc token create` | Mints a token named `--name`, optionally `--expiration-duration <days>`. The secret is returned exactly once |
|
|
145
|
+
| `jiradc token revoke <tokenId>` | Revokes one token |
|
|
146
|
+
|
|
147
|
+
### xray
|
|
148
|
+
|
|
149
|
+
Full coverage of the [Xray for Jira DC](https://docs.getxray.app/display/XRAYCLOUD/REST+API) ("Raven") API. Xray entities are Jira issues, so `issue get` reads their summary and description; these commands read and write the Xray-specific parts.
|
|
150
|
+
|
|
151
|
+
#### xray test
|
|
152
|
+
|
|
153
|
+
| Command | Description |
|
|
154
|
+
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `jiradc xray test list` | Tests in a scope — `--project`, or membership of `--set`/`--plan`/`--execution`/`--precondition`/`--folder` |
|
|
156
|
+
| `jiradc xray test get <testKey...>` | Xray test data (type, steps, definition) for one or more test keys |
|
|
157
|
+
| `jiradc xray test create` | Creates a Test issue. `--type manual\|cucumber\|generic`, `--steps <json>`, `--gherkin`, `--definition` |
|
|
158
|
+
| `jiradc xray test update <testKey>` | Changes any of the same fields on an existing test |
|
|
159
|
+
| `jiradc xray test delete <testKey>` | Deletes the Test issue |
|
|
160
|
+
|
|
161
|
+
#### xray step
|
|
162
|
+
|
|
163
|
+
| Command | Description |
|
|
164
|
+
| ---------------------------------- | ---------------------------------------------------------------------- |
|
|
165
|
+
| `jiradc xray step list` | Manual steps of `--test <key>` |
|
|
166
|
+
| `jiradc xray step add` | Appends a step to `--test <key>` from `--action`, `--data`, `--result` |
|
|
167
|
+
| `jiradc xray step update <stepId>` | Rewrites one step of `--test <key>` |
|
|
168
|
+
| `jiradc xray step delete <stepId>` | Removes one step from `--test <key>` |
|
|
169
|
+
|
|
170
|
+
#### xray testset
|
|
171
|
+
|
|
172
|
+
| Command | Description |
|
|
173
|
+
| ------------------------------------- | -------------------------------------------------------- |
|
|
174
|
+
| `jiradc xray testset list` | Test Sets containing `--test <key>` (the inverse view) |
|
|
175
|
+
| `jiradc xray testset create` | Creates a Test Set issue in `--project` with `--summary` |
|
|
176
|
+
| `jiradc xray testset update <setKey>` | Edits the Test Set's summary/description |
|
|
177
|
+
| `jiradc xray testset delete <setKey>` | Deletes the Test Set issue |
|
|
178
|
+
| `jiradc xray testset add <setKey>` | Adds `--test <keys>` to the set |
|
|
179
|
+
| `jiradc xray testset remove <setKey>` | Removes `--test <keys>` from the set |
|
|
180
|
+
|
|
181
|
+
#### xray plan
|
|
182
|
+
|
|
183
|
+
| Command | Description |
|
|
184
|
+
| ----------------------------------- | ----------------------------------------------------------------- |
|
|
185
|
+
| `jiradc xray plan list` | Test Plans containing `--test <key>` (the inverse view) |
|
|
186
|
+
| `jiradc xray plan create` | Creates a Test Plan issue in `--project` with `--summary` |
|
|
187
|
+
| `jiradc xray plan update <planKey>` | Edits the plan's summary/description |
|
|
188
|
+
| `jiradc xray plan delete <planKey>` | Deletes the Test Plan issue |
|
|
189
|
+
| `jiradc xray plan add <planKey>` | Adds `--test <keys>` and/or `--execution <keys>` to the plan |
|
|
190
|
+
| `jiradc xray plan remove <planKey>` | Removes `--test <keys>` and/or `--execution <keys>` from the plan |
|
|
191
|
+
|
|
192
|
+
#### xray execution
|
|
193
|
+
|
|
194
|
+
| Command | Description |
|
|
195
|
+
| ---------------------------------------- | --------------------------------------------------------------------------- |
|
|
196
|
+
| `jiradc xray execution list` | Test Executions containing `--test <key>` (the inverse view) |
|
|
197
|
+
| `jiradc xray execution create` | Creates a Test Execution issue in `--project` with `--summary` |
|
|
198
|
+
| `jiradc xray execution update <execKey>` | Edits the execution's summary/description |
|
|
199
|
+
| `jiradc xray execution delete <execKey>` | Deletes the Test Execution issue |
|
|
200
|
+
| `jiradc xray execution add <execKey>` | Adds tests directly with `--test <keys>` and/or by expanding `--set <keys>` |
|
|
201
|
+
| `jiradc xray execution remove <execKey>` | Removes `--test <keys>` from the execution |
|
|
202
|
+
|
|
203
|
+
#### xray precondition
|
|
204
|
+
|
|
205
|
+
| Command | Description |
|
|
206
|
+
| ------------------------------------------ | --------------------------------------------------------------------------------------- |
|
|
207
|
+
| `jiradc xray precondition list` | Pre-Conditions applying to `--test <key>` |
|
|
208
|
+
| `jiradc xray precondition create` | Creates a Pre-Condition issue with `--condition` and `--type manual\|generic\|cucumber` |
|
|
209
|
+
| `jiradc xray precondition update <preKey>` | Edits the condition, type, summary or description |
|
|
210
|
+
| `jiradc xray precondition delete <preKey>` | Deletes the Pre-Condition issue |
|
|
211
|
+
| `jiradc xray precondition add <preKey>` | Applies the precondition to `--test <keys>` |
|
|
212
|
+
| `jiradc xray precondition remove <preKey>` | Detaches it from `--test <keys>` |
|
|
213
|
+
|
|
214
|
+
#### xray run
|
|
215
|
+
|
|
216
|
+
A test run is identified either by its `[runId]`, or by the `--execution <key>` + `--test <key>` pair.
|
|
217
|
+
|
|
218
|
+
| Command | Description |
|
|
219
|
+
| ----------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
220
|
+
| `jiradc xray run list` | Runs in `--execution <key>` |
|
|
221
|
+
| `jiradc xray run get [runId]` | One run, by id or by `--execution` + `--test` |
|
|
222
|
+
| `jiradc xray run update [runId]` | Sets `--status`, `--comment`, `--assignee`, or links `--defect <keys>` |
|
|
223
|
+
| `jiradc xray run step list [runId]` | Per-step results within the run |
|
|
224
|
+
| `jiradc xray run step update [runId]` | Sets `--status`, `--actual-result` or `--comment` on the step named by `--step-id` |
|
|
225
|
+
| `jiradc xray run evidence list [runId]` | Evidence attachments on the run |
|
|
226
|
+
| `jiradc xray run evidence add [runId]` | Attaches `--file <path>` as evidence |
|
|
227
|
+
| `jiradc xray run evidence delete [runId]` | Removes the attachment named by `--evidence-id` |
|
|
228
|
+
| `jiradc xray run defect add [runId]` | Links `--defect <keys>` to the run |
|
|
229
|
+
| `jiradc xray run defect remove [runId]` | Unlinks `--defect <keys>`, reporting per-key failures without aborting |
|
|
230
|
+
| `jiradc xray run field get [runId]` | The value of the run custom field named by `--field-id` |
|
|
231
|
+
| `jiradc xray run field set [runId]` | Writes `--value` into the run custom field named by `--field-id` |
|
|
232
|
+
|
|
233
|
+
#### xray folder
|
|
234
|
+
|
|
235
|
+
The test repository tree. Every folder command is scoped by `--project <key>`.
|
|
236
|
+
|
|
237
|
+
| Command | Description |
|
|
238
|
+
| -------------------------------------- | ------------------------------------------------------- |
|
|
239
|
+
| `jiradc xray folder list` | The project's test repository folder tree |
|
|
240
|
+
| `jiradc xray folder create` | Creates a folder `--name`, under `--parent-id` if given |
|
|
241
|
+
| `jiradc xray folder update <folderId>` | Renames (`--name`) or reorders (`--rank`) the folder |
|
|
242
|
+
| `jiradc xray folder delete <folderId>` | Deletes the folder |
|
|
243
|
+
| `jiradc xray folder add <folderId>` | Files `--test <keys>` into the folder |
|
|
244
|
+
| `jiradc xray folder remove <folderId>` | Removes `--test <keys>` from the folder |
|
|
245
|
+
|
|
246
|
+
#### xray import / export / discovery
|
|
247
|
+
|
|
248
|
+
| Command | Description |
|
|
249
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
250
|
+
| `jiradc xray import execution` | Imports results from `--file` in `--format` (xray, junit, testng, nunit, xunit, robot, cucumber, behave) |
|
|
251
|
+
| `jiradc xray import feature` | Imports a Gherkin `.feature` file into `--project` |
|
|
252
|
+
| `jiradc xray export feature` | Writes `.feature` files for `--test <keys>` to `--output`, `--zip` for a single archive |
|
|
253
|
+
| `jiradc xray status list` | The run statuses configured on this instance; `--step` for step statuses |
|
|
254
|
+
| `jiradc xray field list` | The Xray custom fields present on this instance |
|
|
119
255
|
|
|
120
256
|
## Pagination
|
|
121
257
|
|
|
122
|
-
|
|
258
|
+
List and search commands take `--limit <n>` (default 25; Jira DC caps agile endpoints at 50). Responses carry `nextPage` — pass it back as `--start` for the next page. When `nextPage` is `null`, there are no more results. `issue search --all` collects every match in one call instead, capping at 1,000 and failing rather than truncating above it.
|
|
123
259
|
|
|
124
260
|
## Examples
|
|
125
261
|
|
|
126
262
|
```bash
|
|
127
|
-
#
|
|
263
|
+
# Read an issue, whole or in part
|
|
128
264
|
jiradc issue get PROJ-123
|
|
129
|
-
|
|
130
|
-
# Get an issue with specific fields
|
|
131
|
-
jiradc issue get PROJ-123 --fields summary,status,assignee,customfield_10100
|
|
265
|
+
jiradc issue get PROJ-123 --fields summary,status,assignee,"Epic Link"
|
|
132
266
|
|
|
133
267
|
# Search with JQL
|
|
134
|
-
jiradc issue search 'project =
|
|
268
|
+
jiradc issue search 'project = PROJ AND status = "In Development" ORDER BY updated DESC'
|
|
269
|
+
jiradc issue search 'project = PROJ AND created >= -7d' --all
|
|
135
270
|
|
|
136
|
-
# Create an issue
|
|
271
|
+
# Create an issue, with and without extra fields
|
|
137
272
|
jiradc issue create --project PROJ --type Task --summary "Implement feature X" --description "Details here"
|
|
273
|
+
jiradc issue create --project PROJ --type Story --summary "User login" --fields '{"customfield_10100": "value"}'
|
|
138
274
|
|
|
139
|
-
#
|
|
140
|
-
jiradc issue create --project PROJ --type Story --summary "User login" --custom-fields '{"customfield_10100": "value"}'
|
|
141
|
-
|
|
142
|
-
# Transition by ID or by status name
|
|
275
|
+
# Transition by id, transition name, or target status name
|
|
143
276
|
jiradc issue transitions PROJ-123
|
|
144
277
|
jiradc issue transition PROJ-123 --to 31
|
|
145
278
|
jiradc issue transition PROJ-123 --to "In Review" --comment "Ready for review"
|
|
146
279
|
|
|
147
280
|
# Assign
|
|
148
|
-
jiradc issue assign PROJ-123 me
|
|
149
|
-
jiradc issue assign PROJ-123 jsmith
|
|
150
|
-
jiradc issue assign PROJ-123 none
|
|
281
|
+
jiradc issue assign PROJ-123 --assignee me
|
|
282
|
+
jiradc issue assign PROJ-123 --assignee jsmith
|
|
283
|
+
jiradc issue assign PROJ-123 --assignee none
|
|
151
284
|
|
|
152
|
-
# Update with shortcuts
|
|
285
|
+
# Update with shortcuts instead of --fields JSON
|
|
153
286
|
jiradc issue update PROJ-123 --summary "New title" --priority High
|
|
154
|
-
jiradc issue update PROJ-123 --assignee me
|
|
155
287
|
jiradc issue update PROJ-123 --labels backend,urgent # set mode
|
|
156
|
-
jiradc issue update PROJ-123 --labels +urgent,-backend
|
|
288
|
+
jiradc issue update PROJ-123 --labels +urgent,-backend # mutate mode
|
|
157
289
|
jiradc issue update PROJ-123 --components +Frontend
|
|
158
|
-
jiradc issue update PROJ-123 --fix-versions 1.0,2.0
|
|
159
290
|
|
|
160
|
-
#
|
|
161
|
-
jiradc issue
|
|
291
|
+
# Comments
|
|
292
|
+
jiradc issue comment create PROJ-123 --body "Fixed in commit abc123"
|
|
293
|
+
jiradc issue comment update PROJ-123 --comment-id 12345 --body "Fixed in abc123, verified in staging"
|
|
294
|
+
jiradc issue comment delete PROJ-123 --comment-id 12345
|
|
162
295
|
|
|
163
|
-
#
|
|
164
|
-
jiradc issue comment
|
|
296
|
+
# A long comment from a file, or from stdin
|
|
297
|
+
jiradc issue comment create PROJ-123 --body-file ./review-notes.md
|
|
298
|
+
cat notes.md | jiradc issue comment create PROJ-123 --body-file -
|
|
165
299
|
|
|
166
|
-
#
|
|
167
|
-
jiradc issue
|
|
300
|
+
# Link issues, and link them to an epic
|
|
301
|
+
jiradc issue link --from PROJ-123 --to PROJ-456 --type blocks
|
|
302
|
+
jiradc issue link-epic PROJ-456 PROJ-457 PROJ-458 --epic PROJ-100
|
|
168
303
|
|
|
169
|
-
#
|
|
170
|
-
jiradc issue
|
|
304
|
+
# Log and amend work
|
|
305
|
+
jiradc issue worklog create PROJ-123 --time "2h 30m" --comment "Code review"
|
|
306
|
+
jiradc issue worklog update PROJ-123 --worklog-id 9876 --time "3h"
|
|
171
307
|
|
|
172
|
-
#
|
|
173
|
-
jiradc issue
|
|
308
|
+
# Attachments
|
|
309
|
+
jiradc issue attachment list PROJ-123
|
|
310
|
+
jiradc issue attachment download PROJ-123 --attachment-id 45678 --output ./design.png
|
|
311
|
+
jiradc issue attachment upload PROJ-123 --files ./design.png,./notes.txt
|
|
174
312
|
|
|
175
|
-
#
|
|
176
|
-
jiradc
|
|
313
|
+
# Boards and sprints
|
|
314
|
+
jiradc board list --project PROJ --type scrum
|
|
315
|
+
jiradc sprint list --board 42 --state active
|
|
316
|
+
jiradc sprint issues 100 --fields summary,status
|
|
177
317
|
|
|
178
|
-
#
|
|
179
|
-
jiradc
|
|
318
|
+
# Discovery
|
|
319
|
+
jiradc field search "story points"
|
|
320
|
+
jiradc component list --project PROJ
|
|
321
|
+
jiradc issue dev-status PROJ-123
|
|
180
322
|
|
|
181
|
-
#
|
|
182
|
-
jiradc
|
|
323
|
+
# Xray
|
|
324
|
+
jiradc xray test list --project PROJ --limit 50
|
|
325
|
+
jiradc xray test get PROJ-500
|
|
326
|
+
jiradc xray step list --test PROJ-500
|
|
327
|
+
jiradc xray run get --execution PROJ-600 --test PROJ-500
|
|
328
|
+
jiradc xray run update --execution PROJ-600 --test PROJ-500 --status PASS --comment "Green on staging"
|
|
329
|
+
```
|
|
183
330
|
|
|
184
|
-
|
|
185
|
-
jiradc issue clone PROJ-123
|
|
331
|
+
## Breaking changes in this release
|
|
186
332
|
|
|
187
|
-
|
|
188
|
-
|
|
333
|
+
- **`field options` is removed.** It called a Jira 9 endpoint and returned 404 for every field on Jira 8.x. Jira scopes a custom field's options to a context, so there is no context-free replacement — use `issue createmeta --project <key> --type <name>` (create screen), `issue editmeta <key>` (edit screen), or `issue transitions <key>` (transition screen).
|
|
334
|
+
- **`issue transitions` no longer reports `required`** on screen fields. Jira reports field-configuration requiredness there, which cannot see the workflow validator that actually gates the transition, so it returned `false` for fields that then rejected the transition. Supply everything in a transition's `fields` block. (`required` from `createmeta`/`editmeta` reflects field configuration and is reliable.)
|
|
335
|
+
- **`issue get` / `issue search` return issue-picker custom fields as a bare key string** (or an array of keys) instead of the whole nested issue. `fields.customfield_NNNNN.key` becomes `fields.customfield_NNNNN`.
|
|
336
|
+
- **`issue create --custom-fields` is now `--fields`**, matching `issue update`. The old name still works as a deprecated alias; passing both is a usage error.
|
|
337
|
+
- **`--fields` accepts field names as well as ids**, and rejects what it cannot resolve — an unrecognised or ambiguous name is a usage error listing the candidates, instead of a 200 silently missing the field.
|
|
338
|
+
- **`issue search` no longer returns `description` or `comment` by default** (86% smaller pages). Ask for them with `--fields`. `issue get` still returns both.
|
|
339
|
+
- **Argument mistakes now exit 2/3/6** (`usage`/`not_found`/`auth`) instead of 1.
|
|
340
|
+
- `issue transitions` now returns a bare JSON array of transitions (previously wrapped in `{ transitions: [...] }`). Each transition is reduced to `{ id, name, to, fields? }`.
|
|
341
|
+
- `component list` now requires `--project <key>` instead of a positional `<projectKey>` argument.
|
|
342
|
+
- `issue link-epic` is now variadic on the issue argument: `link-epic <issueKey...> --epic <epicKey>`. Single-issue calls keep working.
|
|
189
343
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
344
|
+
### Renamed in 2.0.0
|
|
345
|
+
|
|
346
|
+
The argument surface was unified across the whole CLI suite: verbs became `create`/`update`/`delete`, and every id is either the group's positional subject or an entity-qualified `--<entity>-id` flag. The bare `--id` flag is gone everywhere. There are no deprecation shims for these:
|
|
347
|
+
|
|
348
|
+
| Before | Now |
|
|
349
|
+
| --------------------------------------------- | ----------------------------------------------------- |
|
|
350
|
+
| `issue assign <key> <user>` | `issue assign <key> --assignee <user>` |
|
|
351
|
+
| `issue comment add\|edit <key>` | `issue comment create\|update <key>` |
|
|
352
|
+
| `issue comment update\|delete <key> --id <n>` | `issue comment update\|delete <key> --comment-id <n>` |
|
|
353
|
+
| `issue worklog add\|edit <key>` | `issue worklog create\|update <key>` |
|
|
354
|
+
| `issue worklog update\|delete <key> --id <n>` | `issue worklog update\|delete <key> --worklog-id <n>` |
|
|
355
|
+
| `issue attachment download <key> --id <n>` | `issue attachment download <key> --attachment-id <n>` |
|
|
356
|
+
| `issue attachment delete --id <n>` | `issue attachment delete <key> --attachment-id <n>` |
|
|
357
|
+
| `issue attachments <key>` | `issue attachment download-all <key>` |
|
|
358
|
+
| `issue get-worklog <key>` | `issue worklog list <key>` |
|
|
359
|
+
| `token revoke --id <tokenId>` | `token revoke <tokenId>` |
|