I am using the JMWE Cloud email issue function and having difficulty getting a text split to give me the element I want to make a friendly greeting. From a user picker custom field, I want to select the human's first name. It seems that the split function on the text field smart values page should work. However:
Hi {{ issue.fields.customfield_10661.displayName.split(" ").first }},
returns "Hi ,"
Hi {{ issue.fields.customfield_10661.displayName.split(" ") }},
returns "Hi firstName, lastName,"
Clearly it is actually splitting it. What I cannot figure out is how to select that firstName and display that rather than... a blank.
Found it myself... I was Doing It Wrong. Turns out THIS works
Hi {{ issue.fields.customfield_10661.displayName.split(" ") | first }},
I wonder how that pipe character is working with a list. I would think this would work:
{{issue.customfield_10661.displayName.split(" ").first}}
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have NO idea @Bill Sheboy
I tried it that way the first time and it returned... nothing. As soon as I put the pipe in... it worked. Moving from Server to Cloud, every day I find a new faceplant event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gotcha, and FYI the pipe is normally the default operator for cloud automation smart values; so if the left side is invalid it uses the right side value.
I also run into "undocumented behaviors" when using automation rules, so no surprise this one works differently too.
__Bill
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.