Skip to main content

Bugs need an explanation

Problem

Fixing bugs is great, but it's only half the work. We also want to be sure that a bug will not be repeated. Hence, we want developers to add a short explanation in form of a comment before they can close a bug.

Solution

You’ll want to use a validator here, as it is typical for the comment to be entered during the transition. Add a custom validator to the transition that resolves a bug, using the following Jira Expression to ensure that the current user has added a comment of at least 100 characters in length.

issue.comments
  .filter(c => c.author.accountId == user.accountId)
  .filter(c => c.body.plainText.length > 100)
  .length > 0