Project Mapping (from address) - example
Scenario
You want to map incoming users, by their email domain, to a specific project and component.
Solution approach
Create a JEMH Project Mapping to identify a specific project, with optional default component, reporter and assignee (note that the component here is a fallback, to be used if no other mapping applies, and with components, assignees will default the to component owner).
Project Mappings can also have two key configurations:
the checkbox Join Group From Email Domain set, that will create a group based on the domain of the users.
the select Add Group to Given Project Role, that will automatically add dynamically created groups into the nominated Project Role.
Order of matching
JEMH will make the following checks for a match in order. As soon as a match is made, that's it.
Email From:
Email Addressee: (note: this is filtered through catchEmail and/or jemhAddresseeRegexp values for matches against incoming addresses)
Group matching
User Creation
Creating users is required, but that doesn't mean taking a JIRA seat, in the JEMH Users section, ticking create users will create users, perhaps based on their email address. Optionally, they can be auto-joined to a group. If you were to use jira-users this would allow them to login (taking a JIRA seat), seting this to nonjira-users for example, would not allow them to login but will allow creation of issues through JEMH.
Not creating users at all is possible, to do so, the Project Mapping must have a reporter set (or have a Default reporter user name set in the User settings that will be used as a fallback).
Associating the Project Mapping
In order for the Project Mapping to be active, JEMH needs to match an incoming email as suitable, this can be done with:
email domain mappings
group mappings
Domain Mappings
A domain mapping can be a full email address or a partial address using regexp expressions like:
.*@yourco.net
Domain mappings can be used to match against the sender or the addressee, and also have an optional component that will be used for that particular match.
There can be many domain mappings, e.g. you may have 10 or more different companies to support, in this way they will all route to their respective components.
Group mappings (using join group from email domain)
If your user base already exists in JIRA or you have pre-created a range of groups for the domains of users concerned, then the "Join group from email domain" and "Add group to given project role" combined will do most of the configuration, all that is left is to do the association.
Adding a group e.g. 'yourdomain.com' will mean anyone from that domain will be matched, and routed to the Project concerned, in the component specified in the mapping (if present) or in the Project Mapping (if present). Note: if required, multiple components can be specified.
Group mappings (differentiate between JIRA users and non-jira users)
If the global 'auto join' group was set to say 'nonjira-users', then by adding the following, through one mailbox, all non jira users will end up in one component, all nonjira-users in another.
What are test cases?
To allow you to validate your configuration works as expected, a test case can be made where you are able to set any aspect of an email you need to:
Creating a test case
Click the 'Create' icon link to create a new test case, this will create the basic outline of a simple email:
Note: When creating a Test Case, you need to associate it with a Profile to allow it to be run
Alternate content: You are free to paste in any 'original' email content into a test case window, all content is stored on disk.
Upload content: You may also upload a local email file
After saving it will show up like this:
Once created, operations available include run, edit, copy, delete.
Configuration
For context, the example test case has the following configuration:
Project Mapping
Showing project mapping configuration
Issue configuration
Showing add sender as watcher:
User configuration
Showing user creation settings
Running a test case
If your configuration is good, you should see an Created: Issue link, this example has used Project Mapping to associate a specific sender email domain to a specific Project and component:
Clicking on the link takes you to the issue:
Note the following
Project set through Project Mapping
Component set through Project Mapping
reporter was auto-created as user