6

I want to create an Issue Filter that shows me the number of comments per issue, and then sorts by that.

I tried something like:

project = "myProject" AND created >= 2012-06-01 AND created < 2012-08-01 ORDER BY count(comment)

I'm on JIRA 4.2. How do I do this?

Rafał Rawicki
  • 20,923
  • 3
  • 55
  • 76
Huey
  • 2,075
  • 6
  • 21
  • 33

1 Answers1

7

The easiest way I can think of is to use the JIRA Toolkit Plugin (by Atlassian) which will add a custom field for counting comments:

number_of_comments_field

Than you could use the JQL to sort by the number of comments. For example, if the custom field is called Comments count, use the following query:

project = "myProject" AND created >= 2012-06-01 AND created < 2012-08-01 ORDER BY "Comments count"

Kuf
  • 15,678
  • 4
  • 61
  • 85
  • 3
    Works great! Just don't forget to import those nice custom fields into some of your field configurations. Just installing the plugin won't make them appear by magic. And then you must also reindex your JiRA instance so that those new calculated fields are well, calculated. Otherwise your range queries will return nothing. – Antoine CHAMBILLE Nov 13 '12 at 13:55