Append severity to a comment when changed

This guide shows how to append the severity field to a comment if the field was changed using a transition.


Precondition

In the workflow add a transition with a transition screen that has the severity field on it.


Step by step

  1. Create an Action
  2. Choose Jira Core as template group
  3. Select Update comment as template
  4. Click Create
  5. Change the URL to {{baseUrl}}/rest/api/2/issue/{{issue.key}}/comment/{{comments.latest.id}}
  6. Add authentication (use basic auth and a system user)
  7. Add a body

    {
        "body": "Severity has changed to {{issue.severity}} due to {{comments.latest.body}}"
    }
  8. Click on Triggers & Condition
  9. Add Update as event 
  10. Use JQL to limit the project: project = myproj
  11. On Field select Severity


Thats it!

This should result in that when ever a transitions is done with the Severity screen and a comment is added, then the comment should be updated to say: Severity has changed to {{issue.severity}} due to {{comments.latest.body}}