<commit_before>---
description: Connect JQL to Redash easily and query in JQL, visualize and share it in moments.
---

# Querying JIRA (JQL)

Simple query, just return issues with no filtering:

```
{
}
```

Return only specific fields:

```
{
    "fields": "summary,priority"
}
```

Return only specific fields and filter by priority:

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

Count number of issues with `priority=medium`:

```
{
    "queryType": "count",
    "jql": "priority=medium"
}
```<commit_msg>new field mapping features for JQL query runner<commit_after>---
description: Connect JQL to Redash easily and query in JQL, visualize and share it in moments.
---

# Querying JIRA (JQL)

Simple query, just return issues with no filtering:

```
{
}
```

Return only specific fields:

```
{
    "fields": "summary,priority"
}
```

Return only specific fields and filter by priority:

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

Count number of issues with `priority=medium`:

```
{
    "queryType": "count",
    "jql": "priority=medium"
}
```

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:

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

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": {
            "name": "my_custom_field_name"
        }
    }
}
```

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": {
            "name": "my_custom_field_name"
        },
        "priority": {
            "member": "id"
        },
        "fixVersions": {
            "member": "name",
            "name": "my_fix_version"
        }
    }
}
```

If a field contains a list of values all are returned concatenated with ",".
{'fraction_non_alphanumeric': 0.13856427378964942, 'fraction_numerical': 0.009181969949916527, 'mean_word_length': 3.090443686006826, 'pattern_counts': {'":': 31, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '659160', 'n_tokens_mistral': 781, 'n_tokens_neox': 731, 'n_words': 233}