Adding Custom Field to Issue Summary

On the View Issue page some of the issue's details are displayed in the top-left corner. With some minor customisation it is possible to display a custom field there as well. To do this please add the following code to the includes/panels/issue/view_details.jsp file found under the JIRA web application:

<webwork:iterator value="/fieldScreenRenderTabs" status="'status'">
    <%-- Show tab's fields --%>
    <webwork:iterator value="./fieldScreenRenderLayoutItems">
        <webwork:property value="./orderableField">
            <%-- don't display custom fields with no values --%>
            <webwork:if test="./id == 'customfield_<id>' && ./value(/issueObject) != null && ./customFieldType/descriptor/viewTemplateExists != false">
                <tr id="rowFor<webwork:property value="./id" />">
                    <td valign=top><b><webwork:property value="name" />:</b></td>
                    <td valign=top>
                        <webwork:property value="/customFieldHtml(../fieldLayoutItem,., /issueObject)" escape="false" />
                    </td>
                </tr>
            </webwork:if>
        </webwork:property>
    </webwork:iterator>
</webwork:iterator>

Note, that the <id> in the above code needs to be replaced with the valid numeric id of the custom field you wish to display. For example, 'customfield_10000'.

On newer editions of JIRA (3.7+), view_details.jsp is no longer used and has been supplanted by velocity templates. The file you'll want to modify will be: WEB-INF/classes/templates/jira/issue/summary/issuesummary.vm. The syntax for the changes will be different from above. You can see a community contributed example on our forums here.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport