Forums

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

Programmatically add a label if an issue was created by email

Spyder McHenry
Contributor
August 3, 2018

Looking for a way to automatically label all issues generated from email. 

Seems like the workflow create transition holds some potential. You can add a validator to regex validate the Description content for "Created via e-mail". You can add a post function to add the label: https://community.atlassian.com/t5/Jira-questions/Is-there-a-way-to-automatically-add-a-Label-for-a-created-JIRA/qaq-p/244174
But I don't want all created issues to have it. 

I've considered creating a matching workflow so that I could have two create transitions (since you can only have one), but I want the same workflow for all issue types and I want all issue types to be able to be filtered like this. 

Any ideas?

Thanks for thoughts!

2 answers

1 accepted

1 vote
Answer accepted
Raynard Rhodes
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.
August 3, 2018

You should be able to do this with project automation. I have not tested this out, but it seems logical. You can play around with what I've placed below, but I'm not sure how you plan on identifying tickets that require the label and those that do not. Let me know if it works.

Project Settings > Automation

 

WHEN: Issue Created

IF: Issue Matches - request-type-channel = email AND issuetype ="Whatevever issue type"

THEN: Edit Issue - Labels - whatever value

2018-08-03_21-01-58.png

Spyder McHenry
Contributor
August 6, 2018

I'm not sure how to access this feature. (I'm using the cloud version of Jira) 

When I go to project settings, there is no automation option anywhere in the whole left menu under settings. I looked into all the sections, and did not find them inside any of the areas (like Issue Types). Is this an automation plugin?

Randy
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.
August 6, 2018
Raynard Rhodes
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.
August 6, 2018

Yep, I apologize @Spyder McHenry. I failed to mention that.

Spyder McHenry
Contributor
August 6, 2018

Thanks a lot to both of you! I think this is going to work. I've set up the Automation Lite add-on. As long as team doesn't create more than 300 issues a month (which might happen sometimes), then this add-on will be free and add the labels according to the conditions I set up. 

 

Thanks again!

Raynard Rhodes
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.
August 6, 2018

I'm glad it all worked out!

1 vote
Randy
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.
August 3, 2018

You'll need to use a plugin if you want to do it off a conditional.

 

The seperate issue type with similar but different workflows might work but then you lose the ability to easily change the issue type (you'll still be able to do issue type changes via "move")

Suggest an answer

Log in or Sign up to answer