The Problem: Inefficient Comment Tracking
Managing active Jira issues often means scrolling through dozens of comments from developers, testers, and project managers just to find the latest project update. This manual review process is time-consuming and can lead to missed information, especially when managing multiple work items daily.
The Solution
By using Jira automation, you can automatically capture the most recent comment on an issue and display it in a dedicated field. This ensures critical updates are always visible at a glance without having to open the comments section.
Step 1: Create a Custom Field
To store this data, you need a dedicated container:
- Navigate to your work item settings.
- Create a new field with the type Paragraph. This ensures that the original formatting of the comment is preserved.
- Name the field "Last Comment" (or a similar name suitable for your project).
- Important: Assign this field to your "Work Types" (e.g., Tasks, Stories, Features, Bugs) and ensure it is placed in the description or context fields so it appears in the issue view.
Step 2: Implement the Automation Rule
Jira automation allows you to update this field whenever a status change occurs:
- Go to Project Settings > Automation and create a new rule.
- Trigger: Use the "Workflow Transition" trigger. You can configure this to run whenever an issue transitions to "On Hold," "Done," or any other relevant status.
- Action: Select the "Edit Work Item" action.
- Choose the "Last Comment" field as the destination for the update.
Step 3: Utilize Smart Values
To dynamically pull the comment data, input the following smart value into the field:
{{issue.comments.last.body.abbreviate(100)}}
Breaking down the logic:
- {{issue}}: Refers to the current work item.
- .comments.last: Accesses the collection of comments and selects the most recent one.
- .body: Extracts the text content.
- .abbreviate(100): Limits the display to 100 characters, keeping your dashboard clean and readable.
Testing and Troubleshooting
After enabling the rule, perform a test by adding a new comment to an issue and transitioning it. If the automation fails, navigate to the Automation Audit Log in your project settings. This log tracks every execution, allowing you to see if the trigger fired, if the issue was edited, or if an error occurred.
Future Enhancements
Once you have this baseline automation working, consider extending it. You can combine multiple smart values to include the author's name and the date the comment was posted, creating a rich summary field that keeps your team fully informed.
