Reducing plan consumption for outbound notifications

What is changing?

Changes are being made to the way JEMH Cloud merges (condenses) Jira issue events. These changes have the great benefit of dramatically reducing your capacity plan usage by outbound notifications.

Until now, the app only merged issue events originating from the same user and sent each merged group as a separate notification. However, to minimize plan consumption, related events will now be merged regardless of who triggered them. This enhancement will result in a reduced number of notifications being dispatched.

Do I need to do anything?

Until 1st July 2024, this change is optional. On that date the new behavior will be enforced for all installations of the app. It’s currently optional as some installations may have custom notification templates that need to be reviewed before switching, but we strongly encourage customers to enable the new behavior when possible (read on for details).

Enabling the new event merge behavior

To enable Multiple user changelogs behaviour go to JEMHC Configuration > Notifications > Global Configuration > Settings, then enable Batch multiple user changelogs checkbox.

image-20240416-213127.png

What do I need to do?

The previous behaviour (single user changelogs) will be deprecated in the future but you will not need to take action if you are using only default system notification templates. without customized velocity which depend on current change log display as described below.

If you are only using system default notification templates or custom templates with no bespoke changelog rendering

If you are using only system default notification themes and templates then no changes required as they have been updated to handle the new data format. Likewise, if your custom templates don’t access/modify event changelogs directly you are likely not affected - make sure you test though!

If you use custom templates with specific changelog rendering

If you have added specific scripting based on the incoming webhook changelog for example:

#set ($changeLogMap = $jemhUtils.includeOnly($jemhUtils.indexChangeLogByField($context),$serviceJiraUpdateFields)) #foreach( $fieldId in $changeLogMap.keySet() ) #foreach( $item in $changeLogMap.get($fieldId)) //Your custom changelog logic #end #end

You will need to additionally iterate over the the other changelogs in addition since there will now be multiple changelogs merged into the issue context when Multi User Changelog is enabled

#set($changelogContext = $jemhUtils.getChangeLogs($context)) #foreach($aChangelogMap in $changelogContext) #set ($aChangelogMap = $jemhUtils.includeOnly($jemhUtils.indexChangeLogByField($aChangelogMap),$serviceJiraUpdateFields)) #foreach($aChangelogItem in $aChangelogMap.items) //Your custom changelog logic #end #end

Which notification transports are affected?

The changes above are shown for Email transport notifications, but all current notification transports (Email, SMS, Slack, Mattermost, Telegram) are affected. System default notification templates for non-email transports do not require any changes, as they have already been applied automatically.

If you are using a custom template that accesses $context.changelog, it will need to be replaced with $context.changelogs (or use the above $jemhUtils.getChangeLogs example) before enabling multi changelogs behaviour.