Use the 'email this issue' plugin to send the content of a grid by mail

Introduction 

The 'email this issue' add on allows to send custom formatted emails. This faq details out how to add the content of a grid to the templates

 

 

Code to add to the template

Assume that the customfield id of the grid field is 10100.

<!-- Customfield_10100 --> #set ($customfieldId = 'customfield_10100') #set ($customfield = $!customFieldManager.getCustomFieldObject($customfieldId)) #set ($moduleDescriptor = $!customfield.getCustomFieldType().getDescriptor()) #set ($fieldLayoutItem = $!{fieldLayout.getFieldLayoutItem($customfieldId)}) <!-- HTML view --> #set ($htmlMarkup = $!moduleDescriptor.getViewHtml($!customfield, "htmlMarkup", $!issue, $!fieldLayoutItem)) <tr valign="top"> <td style="font-size:12px;white-space:nowrap;font-family:Arial,FreeSans,Helvetica,sans-serif;padding:0 10px 10px 0"> <strong style="font-weight:normal;color:#505050">${customfield}:</strong> </td> <td style="border: 1px solid #CCCCCC;padding: 2px;" width="80%" bgcolor="#f0f0f0" class="value"> $!htmlMarkup </td> </tr> <tr><td colspan="2" height="10"></td></tr> <!-- End of HTML view --> <!-- End of customfield_10100 -->

 

 

Result

 

Below is a screenshot from an email sent out by our test system.  It contains 2 'dummy' grids G1 and G2.

Â