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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Finish off Jira automation with smart value

Irina_Bel_Stiltsoft_ Marketplace Partner Apr 29, 2022

Hi, community,

I need a piece of advice. I've implemented an automation rule that has a condition to check the body of the last message. But, it only works when a message has no paragraph.

See what I mean:

The message that should be checked:

image (38).png

I type this text in the condition of the automation rule:

image (39).png

But it only works when the initial message looks like this:

image (40).png

What can I add to the field in the Condition to make it check paragraphs as well?

3 answers

1 accepted

3 votes
Answer accepted

Hi @Irina_Bel_Stiltsoft_ 

Have you tried to use replace() to substitute a space or empty string for the newline character before the test?  For example:



Kind regards,

Irina_Bel_Stiltsoft_ Marketplace Partner May 05, 2022

@Bill Sheboy  Thank you for your advice. I'll check that. But I've also found a workaround. Instead of the Equals I opted for Contains and checked only the part of the text in the message. It works. But it seems like your method is more reliable. I'll check that and let you know. Thank you very much!image (42).png

Like Bill Sheboy likes this

You could use the 'trim' function aswell, this will remove all  character with a code smaller or equal than '\u0020' -> example {{issue.summary.trim()}}, this will remove all spaces, linefeeds and so on from the string.

0 votes
Irina_Bel_Stiltsoft_ Marketplace Partner May 05, 2022

@Bill Sheboy  Thank you very much it works as well! But you need to add a space in quotes:{{issue.comments.last.body.replace("\n"," ")}}

Well done!

Like Irina_Bel_Stiltsoft_ likes this

Suggest an answer

Log in or Sign up to answer