Hi all,
I used to add custom field values in notification email so that users can see the values without login to jira. (Changing issuecreated.vm / issueupdated.vm)
Want to do this for filter subscription as well, however the same method failed to apply to filtersubscription.vm
Any ways I can do this?
Pls find the code below:
#if ($issue.getCustomFieldValue("customfield_11318"))
$stringUtils.leftPad("Market", $padSize): $issue.getCustomFieldValue("customfield_11318")
#end
Community moderators have prevented the ability to post new answers.
I accessed the custom field value in this template by doing the following (assuming my custom field value is named 'Cost Center' and it's id is 10301):
#set ($cf = $customFieldManager.getCustomFieldObject('customfield_10301')) #set ($cfValue = $cf.getValue($issue)) cost center: $cfValue
Odd. The code I used for this with 4.4 is
#set ($cf = $customFieldManager.getCustomFieldObject('customfield_10380')) #if ($cf) #set ($projectObject = $issue.getProjectObject()) #set ($issueTypeObject = $issue.getIssueTypeObject()) #set ( $idArray = [$issueTypeObject.id] ) #if ( $cf.isInScope($projectObject, $idArray) ) #set ($currValue = $cf.getValue($issue)) Checking that $cf.name has a value of $currValue #end #end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's because there is likely no $issue object in the top-level Velocity context. A filter subscription will contain a set of issues so this should work inside the loop
#foreach ($issue in $issues) ${StringUtils.rightPad($issue.getKey(), 12)}${issue.getSummary()} ${StringUtils.rightPad("", 12)}${baseurl}/browse/${issue.getKey()} #end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look of another way of sending notifications from JIRA and use whatever custom fields you want with our plugin JJUPIN: http://confluence.kepler-rominfo.com/display/JJUP14/Email+Templates
Plugin page on PAC: https://plugins.atlassian.com/plugin/details/43318
You may evaluate it and fine probably some more interesting features.
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.