I want to create a mail notification with a table of Asset objects

Flavien Gache
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 12, 2024

Hello everyone.

I am using JSM with Asset. On the CMDB I am using, every object has two attributes : Serial number and End of warranty date.
I wanted to create a mail notification to send an programmed email every week with a table of all the objects whose Warranty will expire in two months.

I am using a lookupObjects action bloc who searches the object and I have an issue to format the HTML.

I used this (screenshot because I am struggling to NOT format it here): Capture d’écran 2024-12-12 à 13.34.32.png

I am struggling to know where to put the lookupObjects and the result is not really pleasant visually in the email.
Capture d’écran 2024-12-12 à 13.37.47.png

Does any of you know how toformat it correctly ? 
Do you have another idea to request quickly a list of different objects in Asset ? I am having troubles finding a workaround to the absence of AQL global request.

 

1 answer

0 votes
Christopher Yen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2024

I've struggled with this too so I usually use lists which are a little easier but I would try inserting the lookup smart value after <tbody> and before <tr> and see how that renders and have the headers outside of the <tbody> in a <thead> section 

If you can get by with a list this format has worked for me 

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

or you can give this a shot for a table

2024-12-15 16_12_39-Window.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events