I would like to see the issue type " NAME" in my list view report, not only the issue type icon. How can I make that happen?
thanks
John
A quick fix could be to fix it with javascript. The real fix would be to customize the Issue Type field template. Both of these methods can be 'hacked' or implemented as plugins in the Server installation. There's really no help for JIRA Cloud folks on this matter.
For instance, you could toss this javascript in your announcement banner –
<script>AJS.toInit(function(){ // Our function that appends the image alt text to the image element function appendAltToImg(){ AJS.$("td.issuetype > a > img").each(function(){ $issueTypeElement = AJS.$(this); altTextReplacement = "<span> " + $issueTypeElement[0].alt + "</span>"; $altTextReplacement = AJS.$(altTextReplacement); AJS.$(this).parent().append($altTextReplacement[0]) }); }; // Call our function initally on page load appendAltToImg() // Also call the function when the navigator is refreshed JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context, reason) { if (reason == JIRA.CONTENT_ADDED_REASON.issueTableRefreshed) { appendAltToImg() }; }); }); </script>
Or you could include a similar version of it as a webresource in a plugin within the Issue Navigator context.
Alternatively you can edit the template JIRA uses to display this field, located in the following path –
<JIRA INSTALL DIRECTORY>/atlassian-jira/WEB-INF/classes/templates/jira/issue/field/issuetype-columnview.vm
You'd probably add something like <span> $textutils.htmlEncode($issuetype.getNameTranslation()</span>
in between the <img> element and the end of the <a> element, something like this as the result –
#if (!($displayParams && $displayParams.get('nolink'))) <a class="issue-link" data-issue-key="${issue.getKey()}" 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)"><span> $textutils.htmlEncode($issuetype.getNameTranslation()</span>#end#end#if (!($displayParams && $displayParams.get('nolink')))</a>#end
Again, you could also package something similar to it up as a plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Steven, you are brilliant!!!! I used the banner code above and BOOM. You make me look like a pro!!
Thank you
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's no problem, glad I could help. Consider marking my answer as correct!
A lot of the rendering is done client-side (anything that's not needed to be server-side validated) so Javascript in general is something you can use fairly heavily. It's good to either use a framework for it or to install it as plugins though, it's difficult to manage a lot of customizations in the announcement banner. Though for a quick fix it's nice.
I've faced this same question from a big customer in the past and had already performed some of this so adapting it for you was simple enough. Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll note, a second glance at my logic in the if statement looks wonky. Looks like i was scripting late at night again. It's working but I am not performing the right check on the right reason.
(reason !== JIRA.CONTENT_ADDED_REASON.issueTableRowRefreshed)
Should be
(reason == JIRA.CONTENT_ADDED_REASON.issueTableRefreshed)
The final script would be as follows, I'll edit my original response.–
<script>AJS.toInit(function(){ // Our function that appends the image alt text to the image element function appendAltToImg(){ AJS.$("td.issuetype > a > img").each(function(){ $issueTypeElement = AJS.$(this); altTextReplacement = "<span> " + $issueTypeElement[0].alt + "</span>"; $altTextReplacement = AJS.$(altTextReplacement); AJS.$(this).parent().append($altTextReplacement[0]) }); }; // Call our function initally on page load appendAltToImg() // Also call the function when the navigator is refreshed JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context, reason) { if (reason == JIRA.CONTENT_ADDED_REASON.issueTableRefreshed) { appendAltToImg() }; }); }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We use version 6.4.10 on server version on windows. I am not a coder, what level of customization are we talking? Obviously, this is not an out of the box change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you describe your installation of JIRA? Server or Cloud? What version? Are you willing to customize the product?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.