It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom email template problem

radequeaux Aug 20, 2012

Hi,

in my custom email template i have this snippet

$customFieldManager.getCustomFieldObject("customfield_10609").getValue($issue).fullName

it should return the full name of user in Customfield. However, in the email delivered i dont see the name, but this snippet instead.

In the jira log there is this error reported

notificationType=Current_Assignee,eventTypeId=10070,templateId=28] WARN ServiceRunner Mail Queue Service [velocity] org.apache.velocity.runtime.exception.ReferenceException: reference : template = getEncodedBodyFromContent [line 5,column 12] : $customFieldManager.getCustomFieldObject("customfield_10609").getValue($issue).fullName is not a valid reference.

The funny thing about this problem is, that the very same template runs well on our test envirnoment, which is exact copy of our production enviroment, with the exception that the production one runs on x64 java.

Thanks for any advice and help

Rad

3 answers

1 accepted

0 votes
Answer accepted
radequeaux Aug 27, 2012

what did actualy help was to change the template in following way

$issue.getCustomFieldValue("customfield_10609").displayName

Thanks Teck En from Atlassian support!

 
0 votes
Andy Brook Aug 22, 2012

My guess is that your custom Field ID's are different, which would explain the result.

radequeaux Aug 22, 2012

i have checked the id several times, unfortunately this is not the reason

Andy Brook Aug 22, 2012

What is the type of your custom field? if you drop '.fullName' off the velocity reference you should get left with a type [object@13478e] or similar, if that works, it indicates that the custom field does not have the field you are expecting, perhaps a version/api change in the related plugin. If it does not work, it means the issue referred does not have the cusotm field in its context, probably.

0 votes
Jobin Kuruvilla [Go2Group] Community Leader Aug 22, 2012

Does the field has a value in the production environment? On the issue for which the mail is sent?

radequeaux Aug 23, 2012

Hello Jobin,

yes the customfield has a value.

Rad

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

1,008 views 13 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you