Hi, Everyone! I hope you're well.
I was curious as to how I may achieve the following functionality:
Your advice is greatly appreciated!
Use Case: Assigning 'Reporter' based on User Principal Name found in the 'Summary' field
e.g. User Account locked out from: AE-DC3 xxxxx SAMPLE USER
Description: I am presently having 'User Account Lockout' alerts from my DC being sent to Opsgenie, to then have it create an issue in a JSM project.
The 'Reporter' field is being populated by the service account that's managing the communications between Opsgenie & JSM (which makes complete sense).
What I'm wanting to figure out is how to parse a segment of the 'Summary' field ("SAMPLE USER") into a custom field and then have that somehow set the 'Reporter' from it, using Automation for Jira.
Solution(s) Considered:
Step One:
Automation Rule: Extract segment of 'Summary' field to insert into a 'custom field'
When: Issue created
IF: Issue matches JQL
summary ~ "User Account locked out from:*"
Then: Edit Issue Fields > "User Principal Name" >
{{issue.summary.match("User Account locked out from:(\d+).*")}}Issue Found: The designated smart field isn't pulling the segment of the 'Summary' field I'm wanting into the 'custom field' I have created/designated.
However, it is pulling the entire summary into the field using
{{issue.summary.replaceAll(".*::","")}}Reference: https://community.atlassian.com/t5/Jira-questions/Populating-a-custom-field-from-certain-text-in-the-Summary-field/qaq-p/867986#U1974440
Step Two:
Automation Rule: Set 'Reporter' Based on 'Custom Field'
Description: I am uncertain of how to attain this functionality