Query Jira custom fields

Still need help?

The Atlassian Community is here for you.

Ask the community

In Jira Software and Jira Service Management, users with the proper permissions have the ability to create custom fields in projects. A custom field can be created to collect information that isn’t available in the default system fields.

Custom fields are always optional fields. This means that you can create a new custom field without requiring existing issues to be changed. The existing issues will contain no value for the new custom field, even if a default value is defined.

Not all custom fields are currently supported in the Atlassian Data Lake, such as the Team field and Marketplace app fields. View open suggestions to watch for updates.

Querying custom fields in Atlassian Analytics

Watch the video below to learn how to query your custom fields, or continue reading the article.

The “Issue field” table contains data for both standard Jira fields and custom Jira fields. Custom fields in Atlassian Analytics can be found in the the following columns from the “Issue field” table:

  • Name - This column has the name of the custom field (ie: Change type)

  • Value - This column has the contents of the custom field (ie: for Change type the values would be ‘Standard’, ‘Normal’, ‘Emergency’)

Some commonly used Jira Service Management custom fields (like “Change type” and “Change risk”) are broken out as individual columns within the “Jira Service Management Change” or “Jira Service Management Incident” tables. The custom fields still appear listed in the “Issue field” table though.

In this example, we’re going to create a chart calculating the number of issues per each value of our custom field named ‘Work category’. We’ll create a chart with the following steps:

1. Open up the Visual SQL interface by creating a new chart or editing an existing chart.

2. In visual mode, add the Value column from the Issue field table to the query.

 

3. Then add a filter where the Name column from the Issue field table equals your custom field name. In our example, we’ll use Name = 'Work Category' since that is what our custom field is named.

4. Optional: Add extra columns (like “Issue key”, “Labels”, etc.) or additional filters to the query. Since we want to know the count of issues per each ‘Work category', we’ll add the Issue Key column from the Jira Issue table as well.

5. Run the query!

Now we’re able to see how many issues are in each ‘Work category’ within our projects.

Querying a custom fields in a “Dropdown” variable control

Querying a custom field within a “Dropdown control” is similar to querying a custom field in a chart.

You’ll need to create your “Dropdown” control with the control editor. Otherwise you won’t be able to filter by your specific custom field.

1. Add a “Dropdown control” from your dashboard and select Switch to control editor.

2. Add the Value column from the Issue field table to the query.

3. Optional: You can rename the column to match the name of your custom field.

4. Filter the query where Name from the Issue field table equals the custom field name, then run the query. In this example, we’ll use Name = 'Work Category' since that is what our custom field is named.

5. Configure the settings of your “Dropdown” control and then save it to your dashboard.

6. Connect your “Dropdown” control to chart(s) on your dashboard using the Value column from the Issue field table and the appropriate filter operator.


Then you’ll be able to filter your chart(s) with your Jira custom field values.











Changing the data type of a custom field

If your custom field isn’t a string data type then you might need to change the data type of the field before post-query transformations can be applied. To change the data type of your custom field you can use the steps outlined in this article.

Last modified on Jul 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.