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.
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.
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.
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.
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:
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ł
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.
Thank you very much.
Have this problem too.. I wanna get customFields in: issue_digest_email.ftl
But Utils not available in this template
if some have this problem... The issue there:
<#list issue.fields as field>
</#list>
Thank you for sharing the solution, have a nice day!
More help...
1) issue.fields - a list of available fields, you can take a name and value from the field
2) issue.State - getting values
3) issue.get("Fix versions") - obtaining values for fields with the names of existing spaces (case sensitive)