7 comments
Comment actions Permalink
Hello,

Could you please specify your use-case (on what action do you want to receive notification; is it default custom field)?
In general, you can receive notifications with all custom fields (you are able to cofigure template components in "Notification templates" in "Administration" area and here is the template language reference http://confluence.jetbrains.com/display/YTD4/Custom+Notifications+Language+Reference).
Am I right that you would like to receive the only custom field value (not all) in notification ?

Also, to specify custom field, you can add: issue.priority . "Priority" is an example of the field.
0
Comment actions Permalink
Dear Andrey,

Thank you for your reply.

We have a custom integer field in one project that represents the the ID of product affected by the issue (notice, this is different from the issue ID).

We have also heavily customised our notification templates – translated them and tweaked in order to fit them into our workflow.

Now, I am trying to edit the issue_change.ftl template to include the custom integer field (product ID) into the body of the message.

I have tried this:

<#list Utils.getCustomFields(issue) as customField>
<#if customField.prototype.name == 'Product'>
<#assign product=customField>
</#if>
</#list>
prettyPrint();
but, first, this is rather ugly, and second, I still can't access the field value (the assignment doesn't work, obviosuly).

Any hints?

Michał
0
Comment actions Permalink
issue.product returns null, whether or not the value is set
0
Comment actions Permalink
Hello,

Thank you for the details.

We verified once again issue.customField - it works fine with any custom field.
In your case you can get the field value using ${customField.getValuePresentation(issue)} , it's string value.

If it's possible, please provide us with more detailes, how does this template look like ? Maybe we can assist you with easier implementation.

Thank you.
0
Comment actions Permalink
It worked for a string field, unfortunately, doesn't work for an integer.

Thank you very much.
0
Comment actions Permalink

Have this problem too.. I wanna get customFields in: issue_digest_email.ftl

But Utils not available in this template

0
Comment actions Permalink

if some have this problem... The issue there:

<#list issue.fields as field>

</#list>

0

Please sign in to leave a comment.