How to get a string from a comment?

Gabe Cz
Contributor
December 17, 2024

Hi

I'm creating an automation that assigns the ticket if the comment contains this string: #assign followed by an email address.

no way to test it, but it will fail out if the smart value is invalid anyways i do not want to care about that. just looking for a smart value that returns the email after #assign. first i modify the #assign to #-assign with {{comment.body.replaceAll("#assign","#-assign")}} because if email gets sent out with #assign in it it will be an endless loop in case of a reply to the email. anyways here is what i tried: {{comment.body.substringAfter("#-assign")}}

but audit log says "was already unassigned. meaning this returns an empty string.

 

possibly will set this automation to look for the string in a new request too but first things first.

will go further later with #cc and #watcher tags too but once one is figured out the rest is just copy paste.

 

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 17, 2024

Hello @Gabe Cz 

It will help us help you if you provide the following:

1. Screen images that show your entire rule.

2. The details of the step where you are trying to extract the information from the comment, and any step where you use that information.

3. The output in the rule's Audit Log when the rule runs

4. A copy of the comment text. You can use a Log action in your rule to print that into the rule Audit Log when the rule runs.

 

Without that information it is hard for us to do anything beyond making educated guesses about the cause of your problem.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events