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:
I type this text in the condition of the automation rule:
But it only works when the initial message looks like this:
What can I add to the field in the Condition to make it check paragraphs as well?
Have you tried to use replace() to substitute a space or empty string for the newline character before the test? For example:
{{issue.comments.last.body.replace("\n","")}}
Kind regards,
Bill
@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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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"," ")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well done!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.