Skip to content

Commit

Permalink
docs(README): add info to jira output (#329)
Browse files Browse the repository at this point in the history
* docs(README): add info to jira output

Added info about using 'unknowns' field in jira output

* docs(readme): changed jira output information

added instruction for get field name from Jira UI

* chore(images): jira ui images for README.md saved in repo
  • Loading branch information
DmitriyLewen authored Mar 28, 2022
1 parent 4673422 commit dcb66be
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,63 @@ Key | Description | Possible Values

For Jira you can also specify custom fields that will be populated with values.
Use the `unknowns` parameter in cfg.yaml for custom fields.
Under the `unknowns` parameter, specify the list of fields names to provide value for.
Under the `unknowns` parameter, specify the list of fields **names** to provide value for. Field name can contains spaces.

Possible options for getting the field name:

<details> <summary> Get field name from Jira UI </summary>

1. Move to your jira.
2. Navigate to **Settings**(![cog](https://user-images.githubusercontent.com/91113035/159643662-b7a21717-58f0-4a5e-87a0-0d840046e215.png)) > **Issues** > **Custom fields** under the Fields section:
![Custom_fields](docs/img/jira-custom_fields.png)
3. Click on the required field.

![Field_information](docs/img/jira-field_information.png)

4. Get value from **Name** field.


</details>

<details> <summary> Get field name from Jira REST API </summary>


1. Get all Jira fields [according to instructions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-get)
2. Find needed field:

```
...
"id": "customfield_10014",
"key": "customfield_10014",
"name": "Epic Link",
"untranslatedName": "Epic Link",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[10014]",
"Epic Link"
],
"schema": {
"type": "any",
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 10014
}
},
...
```
3. Get value from **Name** field.

</details>

Example of using the `unknowns` parameter in the cfg.yaml file:

```yaml
unknowns:
Epic Link: "K8S-1"
```
You can add "-numeric-field", "-multiple-value", "multiple-line-text-field", "-date-time-picker" and "-field-url" as suffix to the custom field name, to specify what is the field type.
For example:
Expand Down
Binary file added docs/img/jira-custom_fields.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/jira-field_information.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dcb66be

Please sign in to comment.