Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create two Stories from one email

Greg Kuiper
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2019

My goal is to have the JEMH create two Stories from one email request from our support desk.  One for DevOps and one for the Network team.  Using keywords I can create one Story, assign to an Epic, assign the CAPEX and assignee.

Was hoping maybe Clone+ existed as an option, but don't see any way to do this besides setting up an Outlook rule that send the email twice with different prefixes to trigger the keywords.

1 answer

0 votes
Andy Brook
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.
February 8, 2019

Hi Greg

3rd person in 24hours for this requirement!  

Solution here is based on the Script Field Processor, see expanded Advanced Examples section for Create additional issues

The example shows how multiple issues can be created from one email.  AS you want this conditional, ALL your conditional stuff goes inside the Script Field Proc config, ProjectMappings/rules are 'additional' providing additional issue properties if not defined in each issues _resultMap_.

The script stuff is pretty simple to see:

// create the main issue
resultMap.put("labels", "hello-world");
resultMap.put("project", "TEST");
resultMap.put("priority", "medium");
resultMap.put("issueType", "task");
resultMap.put("summary", subject);
resultMap.put("comment", body);

// create a duplicate
var secondResult = jemhUtils.createResultSet();
secondResult.put("labels", "duplicated");
secondResult.put("project", "SCRUM");
secondResult.put("priority", "high");
secondResult.put("issueType", "bug");
secondResult.put("summary", 'DUPE: '+subject);
secondResult.put("comment", 'DUPLICATE ISSUE\n'+body);

You just need wrap the above with some logic to detect 'when' this should happen. useful references available are _subject_ and _body_ for string processing....

Andy Brook
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.
February 8, 2019

fyi, some minimum requirements apply, Scripting support only added in JEMH 2.5.x , the _jemhUtils.createResultSet()_ was only added in JEMH 2.6.x

Suggest an answer

Log in or Sign up to answer