Hello,
We have automated tickets where the description looks like this:
Current Location: Corporate HQ
New Location: Corporate HQ
Business Process: Lateral Move: Dean James
Subject: Branch Manager - Corporate HQ (Sheldon Stevens)
Details: Lateral Move (Lateral Move > Lateral Move > Move to Another Position on My Team) for Dean James effective on 04/07/2024
I want to automatically close any tickets where Current and New Locations are the same while keeping any open where they are not the same.
I thought I was close with the following:
I've taken care to perfectly match the spaces here (i.e. one space before "New Location"
When this rule is on it is closing every ticket that comes through (with "Job Change" in the title as per my first IF).
Can anyone tell me where I'm going wrong?
Hello @Taylor Dean
Please check @Bill Sheboy 's answer on how to do this here:
Basically you compare:
{{issue.description.split("\n").match("Current Location:(.*)").trim()}}
equals
{{issue.description.split("\n").match("New Location:(.*)").trim()}}
Hope it helps.
Thank you so much for your quick reply!
I'm very close. I think the last problem I'm running into is that there is a space after the value on "Current Location" but not on "New Location".
If that shouldn't matter with this value, then I'm not sure why it's not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm. He is doing trim() on the extract...
Instead of doing "equals" check, do a "contains" check. Maybe thats what is throwing comparison off.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, I just tested with the text you posted and contains did work.. Please share if issues.
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.
Great, please consider accepting answer so folks in the future can benefit from the discussion.
Also please upvote Bill's answer in other thread so it getter visibility in search rankings as that was the actual solution.. Thanks!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.