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.
Community moderators have prevented the ability to post new answers.
Hi!
I was facing the same problem. It worked whit
{{issue.customfield_10661.displayName.split(' ') | first }}Regards
@Angel Alvarez This topic is now closed as the discussion has become outdated. If you have more questions or want to continue the conversation, feel free to start a new topic. For more details on why we close older threads, check out our Rules of engagement - Atlassian Community .
Thank you for your understanding!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found it myself... I was Doing It Wrong. Turns out THIS works
Hi {{ issue.fields.customfield_10661.displayName.split(" ") | first }},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.