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

Send an email with the list of issues matching with a JQL

Jeremy Derbord February 1, 2024

Hello !

I have a little problem configuring an automation.

I'm trying to send the list of tickets that have the component field empty.

Using the following method, I received the list I wanted, but JIRA sent me over 200 emails. Can you help me?

  • Trigger : Scheduled 
  • Lookup Issues : project = SRXRD and issuetype in (Bug, Story, ReWork) and component IS EMPTY
  • Send Email : <b><u>List of issues:</u></b>

    <ul>
    {{#lookupIssues}}
    <li><a href="{{url}}">{{key}}</a></li>{{/}}
    </ul>

 

I also wouldlike to request the reporter, issue type and summary, Have i just to replace "{{key}}" for "{{issue.type}}{{key}}{{summary}}, reported by {{reporter.displayName}}" ? 

 

image.pngimage.png

1 answer

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 1, 2024

Hi @Jeremy Derbord and welcome to the community!

Since you're using the Lookup Issues action you don't need the additional query in the trigger.  Change the Trigger to Simply run the conditions and actions without providing issues.

Bill Sheboy
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.
February 1, 2024

Hi @Jeremy Derbord -- Welcome to the Atlassian Community!

Yes, and...to Mark's answer:

Some fields like issue type have several attributes.  If you wanted the human-readable name for the issue type in your lookup, please use this:

{{issuetype.name}}

To learn more about the smart values and their attributes, please see this documentation: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Kind regards,
Bill

Jeremy Derbord February 2, 2024

Hi @Mark Segall , hi @Bill Sheboy 

Thank you both a lot for your answers. It actually works great !

I have another question, I wouldlike to put the list of stories in form in a <table> html attribute. I used : 

{{#lookupIssues}}
<table>
<tbody>
<tr>
<td><strong>Key;</strong></td>
<td><strong>Resume</strong></td>
<td><strong>Type</strong></td>
<td><strong>Reporter</strong></td>
</tr>
<tr>
<td>{{issue.key}}</td>
<td>{{issue.resume}}</td>
<td>{{issuetype.name}}</td>
<td>{{reporter.displayName}}</td>
</tr>
</tbody>
</table>

The mail is blank. I guess I did something wrong ? 

image.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2024

So there are a couple tweaks:

  1. The LookupIssues should be moved down just before your rows
  2. When using a smart value list, the header {{lookupIssues}} is implied
  3. You need to close out the list

Try this:

<table>
<tbody>
<tr>
<td><strong>Key;</strong></td>
<td><strong>Resume</strong></td>
<td><strong>Type</strong></td>
<td><strong>Reporter</strong></td>
</tr>
<tr>
{{#lookupIssues}}
<td>{{key}}</td>
<td>{{resume}}</td>
<td>{{issueType.name}}</td>
<td>{{reporter.displayName}}</td>
{{/}}
</tr>
</tbody>
</table>

 

Like Bill Sheboy likes this
Jeremy Derbord February 2, 2024

Thank you for your answer @Mark Segall, I'm not a developper, sorry for my html level.

I tried your code and apparently it doesn't works.

image.png

image.png

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2024

I think you can remove the tbody tags from your table and looks like I placed the {{#lookupIssues}} in the wrong place.  See if this provides a better result.

<table>
<tr>
<td><strong>Key;</strong></td>
<td><strong>Resume</strong></td>
<td><strong>Type</strong></td>
<td><strong>Reporter</strong></td>
</tr>
{{#lookupIssues}}
<tr>
<td>{{key}}</td>
<td>{{resume}}</td>
<td>{{issueType.name}}</td>
<td>{{reporter.displayName}}</td>
</tr>
{{/}}
</table>  

 

Like Jeremy Derbord likes this
Jeremy Derbord February 5, 2024

Thank you @Mark Segall , I've follow your advice and it works better like this.

Have a nice day ! 

Like # people like this
Jeremy Derbord February 6, 2024

Hi @Mark Segall @Bill Sheboy ,

I'd like to thank you once again for the invaluable help you've given me.

Now that the ticket list is working, I'm stuck on the primary objective behind the creation of this topic: to get a list of issues committed at the start of a sprint.

I've changed my manual trigger to "Sprint Started".
I kept the "Lookup" function to query issues in an open Sprint.

I would like to :
1/ Get the name of the sprint, its start and end dates, its objective
2/ Have the table return the issues list that are in the sprint when it is launched.

 

image.pngI know that my solution isn't the right one and I'm continuing to look for my own, thanks to the community, although I can't yet find a topic that has dealt with this subject.

 

Bill Sheboy
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.
February 17, 2024

Hi @Jeremy Derbord 

Just checking if this answered your question.  If so, please mark this one as "answered" to help others find solutions faster.  If not...

With the Sprint started trigger, that should be a single sprint value, not a list of values.  And so the smart values for your email would be:

{{sprint.name}}
{{sprint.startDate.jiraDate}}
etc.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/#--sprint--

 

For the table of issues from the lookup results, what is not working as you expected?  Knowing that will help the community to offer more suggestions.

 

Thanks, and kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events