Adding Custom Field to Issue Summary

Andreas Wunder September 25, 2011

Hi,

how can i add custom fieds to issue summary?

i've found this: http://confluence.atlassian.com/display/JIRA043/Adding+Custom+Field+to+Issue+Summary

which is outdated and refers to that: http://forums.atlassian.com/message.jspa?messageID=257247681

which cant help me as i want to add custom date fields...

any help is highly appreciated!

Thanks,

Andreas

4 answers

1 accepted

0 votes
Answer accepted
lfobel September 28, 2011

Here is an example that works in 4.3:

#*

Add Custom Field to the right side of Details panel

*#

#set ($prnew=$customFieldManager.getCustomFieldObject("customfield_10150"))

<li class="item item-right">

<div class="wrap">

#if (($prnew.isInScope($issue.getProject(), [$issue.getIssueType().getString("id")])) && ($prnew.getValue($issue)))

<strong class="name">$i18n.getText("$prnew.name"):</strong>

<span id="customfield1-val" class="value $prnew.getValue($issue)" >

#displayConstantIcon($prnew) $textutils.htmlEncode($prnew.getValue($issue))

</span>

#end

</div>

</li>

4.4 Version:

#*

Add Custom Field to the right side of Details panel

*#

#set ($prnew=$customFieldManager.getCustomFieldObject("customfield_10150"))

<li class="item item-right">

<div class="wrap">

#if (($prnew.isInScope($issue.getProject(), [$issue.getIssueType().getString("id")])) && ($prnew.getValue($issue)))

<strong class="name">$i18n.getText("$prnew.name"):</strong>

<span id="customfield1-val" class="value $prnew.getValue($issue).toString()" >

#displayConstantIcon($prnew) $prnew.getValue($issue)

</span>

#end

</div>

</li>

0 votes
Dan Buffham
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2014

Any idea why this would not work in 5.4.3????

0 votes
Andreas Wunder September 29, 2011

thank you for your reply...

it shows something but unfortunately like this:

Spec Freeze: $textutils.htmlEncode($prnew.getValue($issue))

any hints?

thanks,

Andreas

Andreas Wunder September 29, 2011

forget about that, your 4.4 version works!

thank you so much!

0 votes
lfobel September 28, 2011

This worked for me in 4.3, but in 4.4 the htmlEncode() isnt't working. Add code to the issuesummaryblock.vm file.

#*

Add Custom Field to the right side of Details panel

*#

#set ($prnew=$customFieldManager.getCustomFieldObject("customfield_10155"))

<li class="item item-right">

<div class="wrap">

#if (($prnew.isInScope(null, $issue.getProject(), [$issue.getIssueType().getString("id")]))

&& ($prnew.getValue($issue)))

<strong class="name">$i18n.getText("$prnew.name"):</strong>

<span id="customfield2-val" class="value $prnew.getValue($issue)" >

#displayConstantIcon($prnew)

$textutils.htmlEncode($prnew.getValue($issue))

</span>

#end

</div>

</li>

lfobel September 28, 2011

Here is the needed 4.4 change:

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events