Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I imbed the results of a JQL query in an email, so results are visible in the email?

Phansalkar, Smita
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2024

I have a list of specific Jira Ids that need follow up.  My query lists the specific ticketId filtered by the Assignee.  For example, list is 100 tickets, but only 10 are assigned to Mary. I want to execute the query and show the results in the email as a table with the relevant ticket fields.

I will give her the query, but if 2 weeks from now, I go back to the email, I want to see the results when I sent the email out (instead of updated results by executing the query again).  So I want the email to her to contain a snapshot of the results.

 

1 answer

2 votes
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2024

Hi @Phansalkar, Smita 

Does a Subscription not work? This allows you to search for a set of issues, save them as a filter, then send them via email on a recurring basis.

See this help page for how to manage filters/subscriptions, and this blog which describes Subscriptions (albeit, from 10 years ago).

---

Or is this the functionality which is refreshing each time you open the email?

The alternative is to use Automation. You could then...

  • Schedule an email on a recurring basis
  • Search for a specific set of issues
  • Send this via email, as a static list

There's two potential options for this rule:

Option 1:

  • Trigger: Scheduled
    • Every = 1 Days
    • When rule executes... = run a JQL search and pass results to subsequent conditions and actions
      • JQL - assignee = UserName
  • Action: Send Email
    • Subject = Issues Assigned to User
    • Content =
      • {{#issues}}
        {{key}} - {{summary}}
        {{/}}

Option 2:

  • Trigger: Scheduled
    • Every = 1 Days
    • When rule executes... = simply run the conditions and actions without providing issues
  • Action: Lookup Issues
    • JQL - assignee = UserName
  • Action: Send Email
    • Subject = Issues Assigned to User
    • Content = 
      • <ul>
        {{#lookupIssues}}
        <li><a href="{{url}}">{{key}} - {{Summary}}</a></li>{{/}}
        </ul>

---

There's two options as Lookup issues (Option 2) is a more recent Action in Jira DC, only available if you have A4J 9.0.1 / Jira 9.11.0 or later.

Also, I've provided two options for the content; for Option 1 there's a further example on this help page (under the title "Example: Sending an email with a list of issues"). You can experiment here with different variations of smart field values, and HTML.

Also, 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events