How to display the issue type name in issue navigator column beside the image icon
To achieve this use case, you need to modify the following velocity file <installation directory>\atlassian-jira\WEB-INF\classes\templates\jira\issue\field\issuetype-columnview.vm.
As an example, which tested in JIRA 5.2.11 and 4.4:
For your information
Please backup the original value vm file first before process any changes, which can allow you to easily roll back. Atlassian does not support customisations to Velocity templates or other JIRA files. For more information about Atlassian support, see Atlassian Support Offerings.The original value of the file in JIRA 5.2.11
##disable_html_escaping() TODO REENABLE
#if (!($displayParams && $displayParams.get('nolink')))
<a href="${requestContext.baseUrl}/browse/${issue.getKey()}">#end #if ($displayParams.textOnly)$textutils.htmlEncode($!issuetype.nameTranslation, false)#else #set ($iconurl = $issuetype.iconUrlHtml)#if ($iconurl.startsWith('http://') || $iconurl.startsWith('https://'))<img src="$iconurl" height="16" width="16" border="0" align="absmiddle" alt="$textutils.htmlEncode($issuetype.getNameTranslation(), false)" title="$textutils.htmlEncode($issuetype.getNameTranslation(), false) - $textutils.htmlEncode($!issuetype.getDescTranslation(), false)">#else<img src="${requestContext.baseUrl}${iconurl}" height="16" width="16" border="0" align="absmiddle" alt="$textutils.htmlEncode($issuetype.getNameTranslation(), false)" title="$textutils.htmlEncode($issuetype.getNameTranslation(), false) - $textutils.htmlEncode($!issuetype.getDescTranslation(), false)">#end#end#if (!($displayParams && $displayParams.get('nolink')))</a>#end
The modified issuetype-columnview.vm file
##disable_html_escaping() TODO REENABLE
#if (!($displayParams && $displayParams.get('nolink')))
<a href="${requestContext.baseUrl}/browse/${issue.getKey()}">#end #if ($displayParams.textOnly)$textutils.htmlEncode($!issuetype.nameTranslation, false)#else #set ($iconurl = $issuetype.iconUrlHtml)#if ($iconurl.startsWith('http://') || $iconurl.startsWith('https://'))<img src="$iconurl" height="16" width="16" border="0" align="absmiddle" alt="$textutils.htmlEncode($issuetype.getNameTranslation(), false)" title="$textutils.htmlEncode($issuetype.getNameTranslation(), false) - $textutils.htmlEncode($!issuetype.getDescTranslation(), false)">#else<img src="${requestContext.baseUrl}${iconurl}" height="16" width="16" border="0" align="absmiddle" alt="$textutils.htmlEncode($issuetype.getNameTranslation(), false)" title="$textutils.htmlEncode($issuetype.getNameTranslation(), false) - $textutils.htmlEncode($!issuetype.getDescTranslation(), false)">#end$textutils.htmlEncode($!issuetype.nameTranslation, false)#end#if (!($displayParams && $displayParams.get('nolink')))</a>#end
Please restart JIRA after the changes have been made.
The above modified .vm file can demonstrate the following effect as an example:
Atlassian does not support customisations to Velocity templates or other JIRA files. For more information about Atlassian support, see Atlassian Support Offerings.
Deploying Velocity Templates without a Restart
In a development instance, you can play with picking up velocity file changes without a restart.
From <jira-install>/atlassian-jira/WEB-INF/classes/velocity.properties
:
- Change class.resource.loader.cache from true to false
- Uncomment (remove the # sign from) #velocimacro.library.autoreload=true
Keep in mind that the next time you upgrade JIRA – or need a new installation for any reason – you will have to manually copy any changes you have made to the JSPs or tempates into the new installation of JIRA. If the JSPs or templates have changed in the newer version, you will have to port your customization into them.