Can you guys help me how to do this step by step process?
Background
The Last Comment custom field should always show the most recent comment on a work item. Right now, if someone deletes a comment, the field can keep showing text from a comment that no longer exists.
Request
Build an automation rule that runs when a comment on a work item is deleted.
Requirements
- Trigger: A comment on a work item is deleted.
- If the deleted comment was the latest comment:
- Clear the Last Comment field.
- Fill Last Comment with the comment that is now the latest one.
- If no comments are left on the work item: Leave Last Comment empty.
- The Last Comment field should also show the author and timestamp. Please refer to the Last Comment or Last Comment (edit) automations for formatting reference. In fact you may want to copy one of these automations as a starting point.
- This automation will be global (i.e. apply to all Jira Spaces
Acceptance criteria
- Deleting the latest comment, when older comments exist → Last Comment shows the next-latest comment.
- Deleting the only comment → Last Comment is empty.
- Deleting a comment that wasn't the latest → Last Comment doesn't change.