Sometimes, even with Advanced JQL in a Jira search, the data you need just isn't available. 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:"
In this case, Jira's powerful automation functionality 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:
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
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"
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! If you have any questions about this process, reach out to Isos Technology today!