Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New field mapping features for JQL query runner #25

Merged
merged 3 commits into from
Jul 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions user-guide/queries/querying_jira_jql.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,45 @@ Count number of issues with `priority=medium`:
"jql": "priority=medium"
}
```

You can also use the field mapping to rename a field for the result - this is useful when working with custom fields:

```
{
"fields": "summary,priority,customfield_10672",
"jql": "priority=medium",
"fieldMapping": {
"customfield_10672": "my_custom_field_name"
}
}
```

Some fields returned by JIRA are JSON objects with multiple properties. You can define a field mapping to pick a specific member property you want to return (in this example 'id' member of the 'priority' field):

```
{
"fields": "summary,priority",
"jql": "priority=medium",
"fieldMapping": {
"priority.id": "priority"
}
}
```

More complex example combining the different filter options:

```
{
"fields": "summary,priority,customfield_10672,resolutiondate,fixVersions,watches,labels",
"jql": "project = MYPROJ AND resolution = unresolved ORDER BY priority DESC, key ASC",
"maxResults": 30,
"fieldMapping": {
"customfield_10672": "my_custom_field_name",
"priority.id": "priority",
"fixVersions.name": "my_fix_version",
"fixVersions.id": "my_fix_version_id"
}
}
```

If a field contains a list of values all are returned concatenated with ",".