Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

creating a filter from automation result

Devashish Kedar March 19, 2025



image.png

 

I have recently developed an automation process that performs advanced filtering on issues. I would like to know if there is a way to add these filtered issues to a specific filter or a dashboard gadget. Additionally, I need guidance on the appropriate API request to use and the structure of the payload for this task.

 

2 answers

2 accepted

3 votes
Answer accepted
Felipe Perez _ServiceRocket_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

Hi Devashish!

I'm Felipe from ServiceRocket support team.

Great question!

In Jira Automation, while you can't directly add issues to an existing Jira filter from automation, you can achieve a similar result by using automation to modify issues in a way that they become visible within a specific JQL-based filter. Here's a recommended approach:

Option 1: Using Labels or Custom Fields

  1. Add a Label or Custom Field:
    • Within your automation rule, add an action step to set a specific label (e.g., automation-filtered) or update a custom field for issues that match your advanced filtering logic.
  2. Create a JQL Filter:
    • Next, create a Jira filter based on this label or custom field:
      labels = automation-filtered
      or
      "Custom Field Name" = "value-set-by-automation"
  3. Dashboard Gadget:
    • Use this new filter as the data source for your dashboard gadgets (like Filter Results, Two-dimensional Filter Statistics, Pie Chart, etc.).

Option 2: Advanced Approach Using API (External)

If you specifically want to manage filters programmatically through REST APIs (e.g., for automation from an external script), here's a general approach:

  • Creating or Updating Filters via Jira Cloud REST API:
    • Endpoint: POST /rest/api/3/filter
  • Payload Example:
    {

    "name": "Automated Filter",

    "jql": "labels = automation-filtered",

    "description": "Filter created via automation script",

    "favourite": true

    }
  • Official documentation: Create Filter REST API

Recommended Approach

In most cases, the first option (using labels/custom fields) is simpler and integrates seamlessly with Jira's native automation features.

Best,
Felipe

Devashish Kedar March 20, 2025

Hey Felipe,

Thank you for the solution. I have been looking to achieve something similar. You approach saved me a tons of time

Best regards,
Devashish

0 votes
Answer accepted
Devashish Kedar March 20, 2025

Hey Felipe,

Thank you for the solution. I have been looking to achieve something similar.

Best regards,
Devashish

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events