> For the complete documentation index, see [llms.txt](https://lewe.gitbook.io/lewe-jira-connector-for-wordpress/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lewe.gitbook.io/lewe-jira-connector-for-wordpress/shortcodes/jco-filter.md).

# jco-filter

## Description

With the jco-filter shortcode you can display a sortable table with the result of a Jira JQL filter.

## Examples and Outputs <a href="#examples-and-outputs" id="examples-and-outputs"></a>

{% code overflow="wrap" %}

```
[jco-filter host="1071" jql="project=ADMIN AND resolution=unresolved" fields="issuetype,priority,key,summary,status" showcount="true"]
```

{% endcode %}

<figure><img src="/files/00iXHpkBxS4uS6nNZcqB" alt=""><figcaption></figcaption></figure>

## Format

{% code overflow="wrap" %}

```
[jco-filter parameter="value" ...]
```

{% endcode %}

|            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |            |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| fields     | <p>A comma separated list of Jira fields to display. The following fields are supported:</p><ul><li>issuetype</li><li>priority</li><li>key</li><li>summary</li><li>description</li><li>reporter</li><li>assignee</li><li>created</li><li>duedate</li><li>versions</li><li>fixVersions</li><li>resolution</li><li>status</li></ul><p>If you did not yet specify a default list of fields in the global options, you must use this parameter. Otherwise the table will be empty.</p> | *no value* |
| headers    | A comma separated list of the column headers to display. If you use this optional parameter, it should contain as much entries as the fields= parameter. If omitted, the field names are used as column headers.                                                                                                                                                                                                                                                                   | *no value* |
| host       | <p><mark style="color:red;"><strong>\*</strong></mark> Mandatory.</p><p>The post ID of the Jira host</p>                                                                                                                                                                                                                                                                                                                                                                           | *no value* |
| jql        | <p><mark style="color:red;"><strong>\*</strong></mark> Mandatory.</p><p>The JQL query you want to run on the host</p>                                                                                                                                                                                                                                                                                                                                                              | *no value* |
| maxresults | How many results (matching issues) to display                                                                                                                                                                                                                                                                                                                                                                                                                                      | 50         |
| showcount  | <p>Show a count of the query result above the table. </p><p></p><p><strong>Example</strong></p><p><em>Showing 20 of 7650 results (match 1 to 20)</em></p><p></p><p>In the above example:</p><p>20 = maxresults<br>1 = (startat-1)</p>                                                                                                                                                                                                                                              | false      |
| startat    | Which result is the first to show. 0 is the first result. (If you want to start at the 51st result you need to set this to 50).                                                                                                                                                                                                                                                                                                                                                    | 0          |

{% hint style="info" %}
If you do not want to provide the fields parameter, you can define the default fields in the options of the Lewe Jira Connector in the WordPress back-end.

If you provide the fields parameter, none of the default fields will be shown. In that case you need to specify all the fields you want to see.
{% endhint %}

## Custom Fields

Custom fields can be added to your jql= parameter in the format of:

`cf{{1234}}`

The above example is translated by the Lewe Jira Connector into `cf[1234]` which is the correct JQL format.

In the fields= parameter you must use the format `customfield_1234` to add the column to the output.

Jira only delivers back the value of your custom field, not its name in your Jira instance. If you want your column to have a speaking name, you can add on via the headers= parameter.

Let's say you have a custom field "Customer" in your Jira instance with ID 1234. The following shortcode would display the field with a proper column header:

{% code overflow="wrap" %}

```
[jco-filter host="398" jql="project=ADMIN AND resolution=unresolved AND cf{{1234}} = ACME" fields="issuetype,priority,key,summary,status,customfield_1234" showcount="true" headers="T,P,Key,Summary,Status,Customer"]
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lewe.gitbook.io/lewe-jira-connector-for-wordpress/shortcodes/jco-filter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
