Report latest 3 comments in log action using Automation for Jira

Still need help?

The Atlassian Community is here for you.

Ask the community


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

   

Summary

This article outlines the process of creating an automation rule in Jira to fetch and report on the latest comments from a Jira issue, specifically targeting comments made by the assignee. The goal is to facilitate reporting and track project progress through a single view without manually inspecting each issue.

Environment

Jira cloud.

Solution

  • Automation Rule Setup:

    • A new variable was created to store the "Latest Assignee Comment."
    • The rule fetches the last three comments made on a Jira issue.
    • The rule was designed to ensure that the most recent comments are captured, even if they are edited.

  • Implementation:

    • The rule uses the following smart value to fetch the last three comments:

      {{issue.comments.getFromEnd(2).author.displayName}} {{issue.comments.getFromEnd(2).body}}, {{issue.comments.getFromEnd(1).author.displayName}} {{issue.comments.getFromEnd(1).body}}, {{issue.comments.getFromEnd(0).author.displayName}} {{issue.comments.getFromEnd(0).body}}

    • The smart value ensures that the most recent comments, including any edits, are logged correctly.
  • Testing and Results:

    • The rule was tested with both "If" and "Else" conditions.

The automation rule successfully fetches and reports the latest three comments made by the assignee on a Jira issue. The rule is applicable for teams looking to streamline their reporting processes and track progress efficiently through Jira comments. Please see the attached video  and results below :
Rule creation.mp4



Last modified on Aug 21, 2024

Was this helpful?

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