Hello,
I am using JIRA v4.1.2 and let's say that I have created a custom field "customfield_10370".
I know that by associating this custom field to the "Default Screen" for example, the field will automatically appear in the Issue details panel of every Issue. However I cannot configure the exact position that the field will be displayed on the panel.
Is there some way to do that?
For now, to overcome this problem, I decided to adapt the velocity template "issuesummaryblock.vm" under "C:\Program Files\Atlassian\JIRA 4.1.2\atlassian-jira\WEB-INF\classes\templates\jira\issue\summary", by adding the following block to the position that I want to have the custom field displayed, and without of course associating the custom field to the "Default Screen" anymore:
#set ($fixedversion=$customFieldManager.getCustomFieldObject("customfield_10370")) #if ($fixedversion.isInScope($issue.getProjectObject(), null)) #if ($fieldVisibility.isFieldHidden("customfield_10370", $issue) == false) <li class="item item-right"> <div class="wrap"> <strong class="name">$i18n.getText("$fixedversion.name"):</strong> <span id="fixedversion-val" class="value"> #set ($fixedversionval=$fixedversion.getValue($issue)) #if ($fixedversionval) <span class="shorten" id="fixedversion-field"> #foreach ($v in $fixedversionval) <a href="${baseurl}/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=ASC&sorter/field=priority&pid=${issue.projectObject.key}&customfield_10370=${v.id}" title="$textutils.htmlEncode($v.name) $!textutils.htmlEncode($!v.description)">$textutils.htmlEncode($v.name)</a>#if( $velocityCount < $fixedversionval.size() ),#end #end </span> #else $i18n.getText('common.words.none') #end </span> </div> </li> #end #end
Thank you,
Ioannis
In Jira privious to version 5 you can edit the issuessummaryblock.vm and add something like this (worked for us):
#if ($fieldVisibility.isFieldHidden('customfield_XXXXXX', $issue) == false)
#set ($customfield=$customFieldManager.getCustomFieldObject('customfield_XXXXX'))
<li class="item item-right">
<div class="wrap">
<strong class="name">$i18n.getText($customfield.name):</strong>
<span id="solution-val" class="value">
#if ($customfield.hasValue($issue))
#set($myvalue=$issue.getCustomFieldValue($customfield))
$i18n.getText($myvalue)
#else
$i18n.getText('common.words.none')
#end
</span>
</div>
</li>
#end
Does anyone know how this will work in Jira 5 and above as the file does not exist anymore?!
Hi,
try write javascript code into your CF description field, that will be change target destination. It should be possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it isn't the same logic. See also the attached screenshot to understand what I mean.
Thanks,
Ioannis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Isn't it the same logic appears for viewing the issue as per your Issue Type Screen Scheme settings with your customized screen mapped to the 'View' operation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want the fields to appear in an ordered way when VIEWING the issue. When editing the issue this is not a problem because you can define the order when designing the screen. See also the attached screenshot.
Thanks,
Ioannis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it that you want to order the fields while viewing/editing the issue? Isn't the ordering of fields in the screen sufficient for the same?
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.