Hi everyone,
I'm trying to keep a history of comment edits in a custom field using Jira Automation in Jira Cloud.
Here's what I attempted:
I created an automation rule triggered when an issue is updated.
I added a condition to check if the comment field was changed.
Then I used {{changelog.comment.fromString}} to try to capture the previous version of the comment.
However, it seems that when a comment is edited, the changelog does not include the comment field, and {{changelog.comment.fromString}} is empty.
I also tested using the trigger "Comment edited", but that doesn't seem to expose the previous version either.
My goal:
To append the previous version of an edited comment to a custom field (like “Comment History”) for audit purposes.
Is there any way to do this natively in Jira Cloud?
If not, is it only possible with ScriptRunner or a Forge app?
Thanks in advance!
Community moderators have prevented the ability to post new answers.
Hi @Ivan Monma and welcome to the Atlassian Community!
As you pointed out: the changelog does not include the previous version of the comment. As far as I know Jira only stores the current comment and not any of the previous versions.
That being said. Not even Scriptrunner or a Forge plugin will allow you to retrieve the comment history. Unless you start storing all the comment edits yourself in some location like a field as suggested by @arielei
I found 2 plugins that might be interesting for your use-case:
Hi everyone!
@Ivan Monma, when a comment is edited in Jira Cloud, the changelog doesn't include its previous version.
Charlie Misonne, thank you for recommending the Issue History for Jira (Work Item History) app from my team! It really can help in such a case.
After the app is installed and comment tracking is activated, it is possible to monitor updates made to every comment in Jira. @Ivan Monma, you can see what was changed or deleted, when it happened, and who is responsible for that. The Issue History app is highly useful for auditing purposes as it tracks all the changes made to work items.
If we talk about monitoring changes in specific projects, you can use Issue History Table view. With the help of filters, it will display all changes made to work items' comments in the required project for the specified date range. For example:
When discussing tracking comment changes for a specific work item, you can utilize the Issue History Panel view. By choosing Comment with the help of the Field filter, you will get a list of changes similar to this one:
Hope this info will be useful!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Ivan Monma
I suggest that you will add a custom field of type "Paragraph" , call it "Comment History"
Then, every time a comment is added / edited - copy it to that field.
Ariel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to close the loop on the automation side, since this comes up a lot: {{changelog.comment.fromString}} is empty by design, not by bug. Jira never stores the previous text of a comment, it overwrites it, so there is nothing in the changelog for the smart value to read. No amount of automation, ScriptRunner or REST access recovers it, because it was never persisted. The only thing that works is capturing the text at the moment of the change, going forward.
The custom-field approach Ariel suggested is the honest free option and worth knowing. Two limits to plan around: it records the new text on each edit, so you get a running log rather than a before/after pair, and anyone who can edit fields can edit the log, which matters if the reason you want this is auditability.
On apps, Charlie's two are the main ones. Disclosure: there is now a third and I make it, Comment Audit Trail for Jira. All three share the same limit, history starts the day you install, so whichever you pick, installing sooner is worth more than picking perfectly.
Whatever you choose, two things worth checking on the listing first: how many permissions it requests and how many of those grant write access (for an audit trail it matters, because a record that can be altered proves less), and whether your comment text stays inside Atlassian or is processed on vendor servers. Both are published before you install.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.