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

Hide custom field from Printable view (single-word.vm)

Tiffany Owen
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.
January 30, 2019

Is there a way to hide a particular custom field on the Printable view when exporting an issue? The code is from the single-word.vm file located at /JIRA-HOME/atlassian-jira/WEB-INF/classes/templates/plugins/issueviews. It loops through each custom field to display on the printable view, but there is one custom field in particular we do NOT want displayed when our agents print out issues. Is there a way to include in the  If statement to exclude a field?

This is the code:

## List custom fields
#foreach ($tabs in $fieldScreenRenderer.fieldScreenRenderTabs)
#foreach ($layoutItem in $tabs.fieldScreenRenderLayoutItems)
#if ($layoutItem.orderableField.hasValue($issue) && $layoutItem.orderableField.customFieldType.descriptor.viewTemplateExists == true)
<tr>
<td bgcolor="#f0f0f0" width="20%" valign="top"><b>$textutils.htmlEncode($layoutItem.orderableField.name):</b></td>
<td id="${layoutItem.orderableField.id}-${issue.id}-value" class="value" bgcolor="#ffffff" width="80%">$wordView.getCustomFieldHtml($layoutItem.fieldLayoutItem, $layoutItem.orderableField, $issue)</td>
</tr>
#end
#end
#end

 

1 answer

0 votes
Pete P
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.
October 17, 2019

Hey @Tiffany Owen , were you able to figure this one out?  I have similar need but instead of hide, I need to show approver name and time/date of approval which I am not getting in the Word Export.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events