Wiki

Clone wiki

relatedissues / Overview

Related Issues Add-On for JIRA Server

The case

Based on an information inside a given issue (i.e. level security), capture a list of other issues with the same level security.

Just for a quick context about how it's useful... Imagine a test analyst having to certify a given issue, but, in order to be sure that other issues (already closed) are still OK, he'd like to identify them and also execute a simple regression test on such issues.

It’s something like a recommendation over the issue you’re seeing, like: You should see this too!

Similar plugins: SuggestiMate and Similar Issues Finder. And also SuiTest.

Features

Initially the panel is shown for any issue, for users with Administrator permissions only. So one should be able to configure panel visibility using Gear icon, and add needed sections.

  • ability to indicate multiple combinations of fields, based on the current issue being searched
  • ability to compare multiple values fields, like Components
  • ability to compare text fields, like Description
  • ability to use a JQL expression together with the other options mentioned above
  • ability to select as many as columns users want to demonstrate on Related Issues Panel
  • ability to allow / restrict configuration per User Group or Project Role
  • ability to set max lines of result (limited to 5 by default)
  • ability to create more than one Related Issues Panel per Issue, when other results are also relevant for the user

Actions

It is possible to execute custom action on related issue event, e.g. add comment when related issue is resolved.

Action has to be scripted in Groovy language, and put in Jira home, then if it's configured for a section, it's executed on event determined from the script file name.

To add a comment when related issue is resolved, you will need to create the following script file in your JIRA Home, named related-issue-resolved-comment.groovy with the following content:

#!java
import com.atlassian.jira.component.ComponentAccessor

def relatedIssue = event.issue

def comment = "${relatedIssue.key} ${relatedIssue.summary} - has been resolved"

if (event.comment) {
  comment += """
      {quote}
        $event.comment.body
      {quote}
    """
}

def commentManager = ComponentAccessor.getCommentManager()
commentManager.create(issue, user, comment, false)

Then create Related Issues panel or use existing one, and see Actions option in the very bottom of panel rule dialog.

It should allow you to select one option: Issue Resolved - Comment (corresponding to script file name). Select it and Save changes.

Once any of the related issues is resolved all other related issues should be notified with comment now!

Future ideas

  • Beside strict single field comparison. It may be completely automatic, and suggest related issues by complex adjustable heuristics
  • ability to set complex expressions of search (i.e.: lamda)
  • ability to export result to MS Excel

Updated