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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

issue looping in email with #{{issues}} tag and other criteria such as status

I have an email report consisting of issues resulting from a JQL query.

I'm being asked to separate this list by status into different tables in the email.

I'm wondering if there is a way to apply some form of conditions to the issues loop to restrict to a specific status and then do that as many times as needed to get the separated status tables.

the loop right now is basic as shown below. But can I somehow restrict each loop to a specific status?

{{#issues}}
<tr style="border: 1px solid black;">
<td style="border: 1px solid black; padding:5px 10px 5px 5px; "><a href="{{toURL}}">{{key}}-{{Summary}} </a></td>
<td style="border: 1px solid black; padding:5px 10px 5px 5px; ">{{status.name}}</td>
<td style="border: 1px solid black; padding:5px 10px 5px 5px; ">{{assignee.name}}</td>
<td style="border: 1px solid black; padding:5px 10px 5px 5px; ">{{updated.format("yyyy-MM-dd")}}</td>

</td>
</tr>
{{/}}
</table>  

 Any help or suggestions would be appreciated.

Thanks in advance,

Greg

4 answers

0 votes
Boris Berenberg - Atlas Authority
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.
Nov 12, 2020

You can use Notification Assistant for Jira for this. We support JQL bounded tables as a common email type.

0 votes
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.
Nov 11, 2020

Hi @Greg Bailey 

How about this approach:

  • copy your JQL for the issue list, adding a clause to select a status (or status category), for example: ... AND status = NotStarted
  • use the Lookup Issues action to grab the items using the JQL
  • use the Create Variable action to parse the items into markup.  For an example...
    • Create Variable named myIssuesNotStarted
    • Value is: 
<ul>{{#lookupIssues}}<li><a href="{{url}}">{{key}} - {{summary}}</a></li>{{/}}</ul>
  • Repeat for each status (or status category) of interest
  • Create your email to reference the variables, such as {{myIssuesNotStarted}} as you wish.

I tried this with three sections showing the Todo, In Progress, and Done issues listed.

Best regards,

Bill

Thanks so much @Bill Sheboy

 

I'm out of the office today, but this will be top of my list tomorrow AM.

 

Regards,

Greg

Like Bill Sheboy likes this

Color me sad... 
we are on Jira Server, not Cloud and the lookup issues action is not available for server.

Back the drawing board.  ;-(

 

btw here's the ticket to bring lookup issues to the server version.  Please add votes! 

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.
Nov 12, 2020 • edited

Greg, sorry that I missed you were on server version.

I wouldn't hold out for the server version getting that soon.  Atlassian is stopping sales of that product soon (Feb 2021) and will sunset after that (Feb 2024):

https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html

__Bill

Hi Hana,

Thanks for that.  I had a feeling it may be the case this was not possible.

yeah, the emailed report is already sorting by status so we at least have that.  And no we don't want to send multiple emails. ;-)

 

Thanks for the response,

Greg

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 05, 2020

Hi @Greg Bailey ,

unfortunatelly, I don't think this is possible.

What about to sort the issues by status, would it help a little bit?

The second possibility I can see is to send more emails, for each status one email, but that's not very nice solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events