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

How to exclude a custom field from update notifications

How can I exclude a custom field content from being included in the update JIRA notification?

This particular field (group sign-off plugin) contains a long script that is applied during a transition into an approval status. It is rendered graphically by the plug-in on the UI, but the JIRA notificaiton sends the raw script (which is just confusing to the end user).

I would assume the principle method of removing a custom field from notifications would be the same regardless of the field type.

Thanks!

5 answers

1 accepted

2 votes
Answer accepted

To hide some fields in email-notification I added following if-clause to velocity-template changelog.vm.

#foreach ($changeitem in $changelog.getRelated("ChildChangeItem"))
    #if(!$changeitem.getString("field").equals("FIELDNAMETOHIDE"))
		<tr valign="top">
		SOME CODE
		</tr>
    #end
#end

The file can be found for html-mails in \%JIRA-HOME%\WEB-INF\classes\templates\email\html\includes\fields and for text-mails in \%JIRA-HOME%\WEB-INF\classes\templates\email\text\includes\fields.

Jochen, thanks for great reply!

Looks like right answer to my case.

Thank you Jochen - much appreciated!

Can any one help us with the code changes.

Jochen

What code should be written in place of "SOME CODE" below ? Please advise.

 

#foreach ($changeitem in $changelog.getRelated("ChildChangeItem"))
    #if(!$changeitem.getString("field").equals("FIELDNAMETOHIDE"))
        <tr valign="top">
        SOME CODE
        </tr>
    #end
#end

Depends on what you want to show in the email notification. If you let the code as it is in JIRA Standard and just insert the if-clause, notifications are sent as normal but not for the change event of the excluded field. 

Sad enough, this doesn't seem to work anymore with latest JIRA versions. Instead of no notification I get an empty one - saying that the issue has been changed but not listing the changes.

Cheers,
Kirstin

i'm also interesting in this question.

guys, is there any news to this topic?

any update on this?

Does anybody have an idea, how to do this programmatically in scope of a plugin development?

My developed custom field also contain some "cryptic" uninteresting content for the user and I don't want to delegate the problem to an administrator who is running the plugin in his JIRA instanz.

Is there any other method available to suppress the Jira Notifications for a particular field without really making the changes in core templates ?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

230 views 1 2
Join discussion

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