Hi all, I'm using automation to process subjects on incoming emails and set multiple values on a ticket from it. Everything works great as long as the email is typed with the proper casing eg: "David Moreno".
{
"update":
{
"Name":
[
{
"set": {"value": "{{issue.summary.replaceAll("(?i)^.*check([1-9])+\.([^\.]+)\.([^\.]+)\.([^\.]+)$","$4")}}" }
}
]
}
}
On my list fields, if I try to set a field, and the email comes like this "David moreno", it will fail because that is not considered a valid value for the list field.
First Question: is there any way to make the list (combo) fields case insensitive?, so I can set up the same value with any casing.
If not:
Second Question: I have been trying to capitalize the input coming in, but in smart values, when I split the incoming string by space, I haven't been able to apply a string function like capitalize() to the list of split strings, there is probably an easier way:
{{#
issue.summary.replaceAll
("(?i)^.*check([1-9])+\.([^\.]+)\.([^\.]+)\.([^\.]+)$","$4").split(" ")
}} {{.}}) {{/}}
I cannot change the field values (over 1300 in there).
Any help will be appreciated.
Regards
Never mind, I figured it out:
Capitalize at the end of the array split, will apply it to all elements.
{{#
issue.summary.replaceAll
("(?i)^.*check([1-9])+\.([^\.]+)\.([^\.]+)\.([^\.]+)$","$4").split(" ").capitalize()
}} {{.}}) {{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.