Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,707
Community Members
 
Community Events
184
Community Groups

Automatically change issue type based on email "to" field

Hi,

(TLDR below)

Basically, I've got an email account connected to Jira that has multiple aliases on the mailbox and I want to be able to automatically change the issue type based on the email 'to' field.

Use case:

Emails that are sent to spamreporting@mydomain.com, will be changed from the default placement of service request TO spam reporting (a custom issue type i created)

FYI I already matched my source to destination workflow - so thats all good there. 

After much investigating I finally found how to add logging, validate json and get my email "to" field. Wow! (im pretty new to this so give me a moment here).

However, now I've changed the rule from manually trigger to Issue Created - it doesnt trigger. So I've tested a few different triggers, but no luck either. I thought about a time condition, but I don't really want to put in a run every 10 seconds / 30 mins / 1 hour type of trigger either - thats just barbaric.

Any ideas on what trigger i need to put in OR if there is just a way simpler method that what im trying to achieve?

 

TL;DR - why is my compare statement only working by manually triggering the automation rule and not for Issue Created?

 

image.png

3 answers

1 accepted

2 votes
Answer accepted
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 31, 2021

Hello @Phillip C,

Thank you for reaching out to Atlassian Community!

Checking your use case, it seems that the email information is taking a while to be populated, that’s why when using the “Issue created” trigger is not working.

What I’m trying to say is that, when the issue is created, the field is yet not populated, so the automation runs when it’s still empty. Using Manual trigger works because it takes a while until you open the ticket and click to run the automation.

You can try adding an action called “Re-fetch issue data” before adding the condition to try to slow down a little bit the automation. I don’t have any email and aliases to test the same scenario as you, so please, take your time to test and let us know how it goes.

Screen Shot 2021-03-31 at 10.21.27.png

Kind regards,
Angélica

Yes! This is exactly what i needed in the automation. I thought the field was still being updated and thus not triggering, excellent action to use! That resolved the issue, thanks you so much!

Like Angélica Luz likes this
1 vote
John
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 29, 2021

Hi @Phillip C 

You mentioned the rule isn't triggering, is it not triggering at all or is the condition not being passed?

If the condition isn't being passed could you put a log action before the condition and just check your smart value (and make sure it's set). Hopefully I can help you more form there.

Another thing worth noting is you can't edit the issue type for Jira Service Management tickets. We have an open public ticket for this https://codebarrel.atlassian.net/browse/AUT-1750

You could clone the request and change the type, then close or delete the old ticket.

Thanks,

John

thanks for the reply John. The rule is triggering, just the condition wasn't matching. The reply from @Angélica Luz with the re-fetch action placed in my rule after the the 'issue created' trigger is perfect.

Like Angélica Luz likes this

Hi @Phillip C

How did you get the "to" email address? Once the issue is created, I only see the subject (summary), the reporter and the email body in the description.

I have a Jira project and 3 email handlers that create issues (tasks). I want to set a component (or update a custom field) based on the email address that receives the email. 

Hope you can give some insights, thanks!

Greg Shub
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!
May 10, 2023

would love to know this as well.

Hi @Greg Shub

Couldn't find a direct way to do it, so I created a "buffer" project for each email address where I receive the issues and "pre-process" them using automation (creating a new issue in the destination project setting component, team, etc.) 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events