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

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?

2 answers

1 accepted

3 votes
Answer accepted

Hi @Irina Belaya_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,

@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
0 votes

@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"," ")}}

Like Irina Belaya_Stiltsoft_ likes this

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you