/
Use the 'email this issue' plugin to send the content of a grid by mail
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.
Looking for labels? They can now be found in the details panel on the floating action bar.
Related content
Grid on issue view
Grid on issue view
More like this
Access the grid data using REST
Access the grid data using REST
More like this
How to add a View Field grid
How to add a View Field grid
More like this
Use Better PDF Explorer for Jira from Midori to export a table grid to PDF
Use Better PDF Explorer for Jira from Midori to export a table grid to PDF
More like this
How to change background color of grid cells depending on its content
How to change background color of grid cells depending on its content
More like this
Java API: Groovy script examples
Java API: Groovy script examples
More like this