Missed Team ’24? Catch up on announcements here.

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

automation rule for setting the organization by the reporter domain

Emmanuel F-D August 31, 2021

Hi
I’m trying to create a automation rule that automatically assign the organization name by the reporter domain when a customer creates a ticket, but I think my jira automation is missing something.

I want also to put the condition that the domain must be different then my own (ex: test.com), if the domain is different then the automation applied but if is not than the organization stay empty.

I want the organization to be manually asigned when it’s an employee making a ticket.

Thanks
Capture.JPGCapture1.JPG

1 answer

1 vote
Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 31, 2021

Hi, @Emmanuel F-D . Your advanced compare condition is the problem here. 

You can use the Does Not Contain option on an Issue Fields condition, rather than Does Not Equal; the condition you're using is attempting to compare exactly the value of two separate fields (i.e. does field A equal field B), rather than checking the value of one field to see if it matches a static string.

2021-08-31 17_40_18-Project automation - The Jira of Champions.png

Emmanuel F-D September 1, 2021

@Esther Strom 
is there a way to specify that is the reporter email that I want to compare or the field "Email" is already linked to the reporter email?

I dont see the email field on the dropdown, is there a way to see all the field name?

Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2021

Yes, in that case you can continue to use the Advanced Compare Condition; just change the condition type to Contains (or Does Not Contain) instead of Does Not Equal.

 

compare.png

Like Emmanuel F-D likes this
Emmanuel F-D September 3, 2021

@Esther Strom it works.


Another question, is it possible to add another comparison to the automation to see if the organization already exists in our customer list, to put the name that is already there (in the list) instead of creating a new organization.
This happens when the domain name is different from the name of the organization. (example: @abcinc.com)
In this example I would just like to keep the "abc" as organization name and not the rest.

Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 3, 2021

So just to make sure I understand. 

  1. A ticket comes into your service desk.
    1. If it's created by someone in your own domain, nothing happens.
    2. If it's created by someone outside your domain
      1. First check to see if there's already an organization that matches the domain
        1. If yes, add that organization to the ticket
        2. If no, create the organization and add the reporter to it and then add the organization to the ticket.

I don't believe this is possible; there are no conditions that check for the existence of organizations, nor actions that would allow you to create one. There is a user condition that would let you check if the user is already a member of a specific organization and then do something based on the response, but that's about it.

That said, @Bill Sheboy has provided many automation answers that I didn't think were possible; maybe he has thoughts on this.

Emmanuel F-D September 3, 2021

thank you for the answer.

Bill Sheboy
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.
September 3, 2021

Hi @Emmanuel F-D and @Esther Strom 

To be candid, I am not using Jira Service Management, so my thoughts are based on some research and using the webrequest action to call the REST API for other purposes. If you wish, please review the following to see if it helps.

According to this post, setting the value to an unknown organization from a reporter should create it and then use it: https://blog.codebarrel.io/set-organization-in-jira-service-desk-using-reporters-email-domain-e705be9d4717

Except...that apparently doesn't work if the domain is other than .com according to this suggestion/defect: https://codebarrel.atlassian.net/browse/AUT-1821

A rather complicated work-around would be to check the organization with the REST API and add it when needed:

Please note this automation rule could take several seconds due to the webrequest actions.

Kind regards,
Bill

Like # people like this
Esther Strom
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2021

Thanks for the reply, @Bill Sheboy. Sorry for putting you on the spot! I consider myself generally pretty well-versed in automation, but you consistently find answers that I never would have thought of.

Bill Sheboy
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.
September 7, 2021

No worries; glad to try to help where I can!

__Bill

Like Esther Strom likes this

Suggest an answer

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

Atlassian Community Events