Documentation for JIRA 4.3. Documentation for other versions of JIRA is available too.
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 their 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.