How to fetch the Team name from the comments by using Regex

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

How to fetch the Team name from the comments by using Regex.

Environment

JSM Cloud.

Solution

You can use the below logic to build an automation rule to fetch the team name from the comment

  • Trigger: Comment added 
  • Condition: Create regex to filter and match your team name using the below regex:
    • First Value:

      {{#issue.comments.last}}{{#if(exists(body.match(".*(Team ).*")))}}{{body}}{{/}}{{/}}  
    • Second Value: 

      {{issue.comment.last.body}}  
  • Action: Add any action.

Please refer below screenshots:


Reference:





Last modified on Oct 9, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.