I want automatically fill in CRM created field in Jira task

Anna Grace May 9, 2023

Hi all,

 I want create a rule that will automatically choose a company name  in CRM created field depending on domain of reporter (@testdom.com)

1  I don't know how to find Reporters whose emails contain @testdom.com in Advance Compare Condition

2 I cant choose field Company in New Action-> Edit Issue-> Choose fields to set

it doesn't appear in the list

I'd be grateful for your suggestions.

Anna

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2023

Hi @Anna Grace 

After a few attempts I managed to create a rule to change the value of your CRM field, based on the email domain of the reporter (you know that this app has the ability to sync users to companies, right?):

The first thing that you want to do, is to get the ids of the companies you create:

  • Go to Apps > CRM > Companies
  • Select all companies and click the export button
  • Open the xlsx file and see the 5-digit number ids of each company. We will use them to set the value on your automation rule

 

Create the following rule and use as many "Else" statement as you want

myrule001.png

 

To distinguish among domains, use the following smart value

{{issue.reporter.emailAddress}}

which should contains the "@domain.com" you want

myrule002.png

 

The Add an edit issue component and instead of using the fields from the dropdown menu, use the advance edit and write:

{
"fields": {
"customfield_10245": 301462
}
}

where customfield_10245 is your Company field and 301462 is the corresponding id of the @domain.com

myrule003.png

 

I've tested it on my instance and works like a charm.

Let me know if you got this!

Anna Grace May 9, 2023

Alex, you're amaizing! thanks!! it works

Anna Grace May 10, 2023

Hi Alex,

Just a short note .

We noticed, that automation rule doesn't work for reporters, that are new for Jira.

FIrst request to support from unknown email - ignore

Second request - rule works.

thank you.!

Anna 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2023

@Anna Grace what do you mean doesn't work? What is the email domain of these users? Are they already added to the project before creating an issue?

Anna Grace May 11, 2023

@Alex Koxaras _Relational_  if the email comes from our existing client (who has sent something to us in the past) then the rule works, but if it's a new email for system -it doesn't.. we also checked it sending emails from @gmail. The rule didn't execute for the firrst email. 

But fortunately it doesn't  happen often

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2023

If a customer is not added to a project, then if he/she sends emails to the dedicated JSM email handler, then this email will bounce. You have to add the customer first to the project and then he/she will be able to send emails.

Like Anna Grace likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events