Sometimes, even with Advanced JQL in a Jira search, the data you need isn’t available without (or is just easier with) an add-on. I recently helped to solve a problem like this for a client and thought I’d share how it was done.

Scenario: Client XYZ needed a report that showed a list of the “Emails Handled”.

Definition of “Emails Handled”:

  • Issues of the type “Email Issue” that are “responded to” within two days
  • “Responded to” means the status changed from “New” to any other status within 2 days (48 hours) of issue creation

One of my favorite go-to apps (add-ons) is Automation for Jira (available for cloud/server/datacenter). In this case, Automation for Jira allows us to easily search for issues that have transitioned from one status to any other within two days of issue creation and then take automated action on that set of issues.

Here’s how to do it:

1. Set up a new custom field:

A Jira Administrator will need to set up a new custom field for your report:

Field Type: Text box (single line)

Field Name: Email Handled within 2 Days

2. Go to the project Settings (the gear icon)

3. Set up Project Automation:

a. Click “Project Automation” (not Automation – that’s different)

b. Click “Create Rule” in the upper right corner of the screen

c. For the Trigger, select “Issue Transitioned”

d. Under “From status” select “New”

e. Leave the “To status” as it is and click “Save”

f. On the “Add Component” screen, click “New Condition”

g. On the “New Condition” screen, click “JQL condition”

h. Enter the following in the JQL window: “created > -2d” or “created > -48h” (without the quotes)

i. Click Validate query to make sure it doesn’t throw an error and the issue count is what you’d expect.

j. If the query doesn’t return the # of issues you expected to see, type that query into a Jira issue search and play with it there until you get it right; then come back here, paste it in, and validate it.

k. When you’re confident the search is returning the right results, click “Save”.

l. On the “Add Component” screen, click “New Action”

m. On the “New action” screen, click “Edit issue”

n. On the “Edit issue” screen, type the name of your new custom field that you created in Step 1, and hit enter or return.

o. In the dropdown just below it, type the name of the custom field, “Email Handled within 2 Days”

p. In the box below that, type “Yes” (without the quotes), and click “Save”.

q. Name this automation, “Set Email Handled within 2 Days to Yes”, and click “Turn it on”.

4. Set up your JQL filter that will return the search results that you’ve just created.

a. Type the following query into a Jira issue search (with the quotes): “Email Handled within 2 Days” ~ Yes

b. Save your search as “Email Handled within 2 Days’ and be sure to mark it as a Favorite so you will be able to find it quickly in the future.

That’s it!