Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to prevent a specific field from being included in notification emails

Christopher February 28, 2020

I'm trying to avoid having a sensitive field be sent to assignees and watchers on issue creation by email. It's a custom field and looking at the template in the batcher plugin, there is this segment (templates/email/batch/html/IssueUpdateBatcher-content.vm) that seems to loop through all of the changed fields:

                                            #foreach($update in $fieldGroup.updates)

                                                <tr class="field-update">

                                                    <td valign="top" align="left" class="updates-diff-label">

                                                        $escape.apply($update.fieldName):

                                                    </td>

                                                    <td valign="top" align="left" class="updates-diff-content">

                                                        ohai

                                                        #if($update.iconUrl)<img src="$update.iconUrl" height="16" width="16" border="0" />&nbsp;#end$update.diff

                                                    </td>

                                                </tr>

                                            #end

 

Is there a way to set this up to avoid a certain field, either in the batcher template or in the Jira UI?

I'm using a self hosted Jira 8.5

1 answer

1 accepted

1 vote
Answer accepted
Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2020

Velocity doesn't seem to have a continue statement, but perhaps you can wrap the whole thing in an if statement, like this:

#foreach($update in $fieldGroup.updates)

  # if($update.fieldName != "Private Field")

  <tr class="field-update">

    ...

  </tr>

  #end

#end

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events