Hello. I am quite new to Jira automation, so excuse my limited knowledge.
I am setting up automation for our new hire tickets. These are created from emails sent from our HR tool. I am setting up automation that will set the new hire's Line Manager as the Reporter.
Since the description is just text in an email, I need to do a match for the name, however, the reporter field will not work with full names, and expects userid, username or email, as far as I can gather.
Is there some way for the automation to do a search for full names and tie it in with userid, so this can be populated in the Reporter field?
Using the match command seems to work, but the automation rule gives an error saying the user does not exist, even though the Name is unique and a 100% match of the users Display Name.
This is the info included in the Description from the email.
An employee has been hired.
Employee Id: 12345
First name: Firstname
Last name: Lastname
Organizational Relationship: Employee
Department: 123456 Sales Europe
Location: Amsterdam, The Netherlands
Reports to: ManagerName ManagerSurname
Hire date: 2022 09 01
I have tried using this code, but the user picker does not like it.
{{issue.description.match("Reports to:\s(.*)")}}
I assume this has to be done in a few steps, but is this even possible?
Thank you for reading.
I want to update this post with a resolution.
The solution was to use the app "Email this issue" which we luckily had installed.
By setting Field rules as shown below, I can now auto populate the Reporter field from the incoming email body text.
To performed something like this, you will need to split the pattern that you got from this
{{issue.description.match("Reports to:\s(.*)")}}
To this
{{{{issue.description.match("Reports to:\s(.*)").split(" ").last}}}}
Or if you want you can create variables in automation to deal with the values more easier.
I assumed the pattern being "FullName Username"
Then assignee the value that you need with the functions to treat your text.
I hope I helped you.
If this post was helpful, mark it as Accepted Accepted, so you can help others who may have the same difficulties.
If your question has not been resolved, please post again with more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the response. The reporter field does still not like the output, this is from the log:
Error editing issuesITOFC-17 (The reporter specified is not a user. (reporter))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marius Skoglund does managerSuername have any active users?
You can test with a user like yours for testing purposes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Yes, all Managers are active users in the system, and are manually set as reporter for the tickets. Manually, it works, but with the automation, it fails, even though the name matches the users display name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marius Skoglund , is there any log of error of automation ?
If manually, it works, maybe schedule can trigger corectly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.