Restrict commenting to one project

This article covers how one JEMH Profile can restrict association to issues within that project only for commenting such that other project issues are ignored, causing issues to be created instead.

About forwarded mails
When the mail being forwarded is not a Jira notification, JEMH will consume the full content of the message, including the forwarded email history text within, as the description of a new issue. This happens because the mail (will have) a Fwd: prefix in the subject, which is detected.

About Jira notification (replies/forwards)

When forwarding Jira notifications, two things matter:

  • the subject contains an issue key

  • the mail contains issue-related headers (in-reply-to / references)

Its possible that if the mail being forwarded is a Jira notification is locating an issue to be commented on by one of these methods.

Instructions

When an email is sent to Mbox1 I always want to create an issue, regardless of headers/resolved issue keys:

In _Profile > Email > Pre-Processing > Subject Issue Key (comment) Regexps_, the default value matches the issue keys that are valid to be matched on for commenting. Where no match is found, creation behavior will occur.



The default value is:

\b[A-Z][A-Z_0-9]+-[0-9]+\b



In order to limit this Profile to only comment on issues within say the PROD project, use:

\bPROD-[0-9]+\b



Convert a JEMH Auditing entry into a Test Case, so you can execute the mail against your Profile quickly, to prove configuration changes work



Related articles