Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get part of field

joris raffin January 11, 2022

Hi, 

I have an issue, I have many mails coming in my JSM and i would like to take the 5th line of these mail to put the text in another field.

 

I know that there is smart values like substringBetween etc but i don't know how to isolate a specific Line of the description field.

Moreover once i have this value how can i use it in the same automation ?

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2022

Hi @joris raffin 

That's a tricky situation you got there. Now, I've run some tests and I'll lay out the main foundation for the solution I'm going to give you. I'm taking for granted, that when you say "5th line" you mean "5th NEW line". This simply mean that your emails (e.g. you want to take the 5th line of the email body (description)) has to have 5 lines, each separated with the "\n" new line. In that case, using the following smart value will get you the result you want:

{{issue.description.split("\n").get(4)}}

Do let me know if that works out for you. 

joris raffin January 11, 2022

Hi !

 

It works well ! thx you so much ;)

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2022

Nice! Kindly mark my answer as accepted, in order to help other in the community to find proper answers. Thank you!

joris raffin January 11, 2022

Actually i have another question :).

 

So i use your smart value to get an email and an name wich are in the description to create a customer. So it works well but now i would like to set the reporter of the issue with the customer i've just created but i can't do it.

 

get customer.png

 

May you help me ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events