Thursday, September 22, 2011

How to count multiple values in a histogram?

If I have a JIRA issue with a field that can have more than one value, how should a report count the values in all the issues? For example, issue TEST-1 has the values "Alice" and "Bob" in the field, and issue TEST-2 has the values "Bob" and "Charlie". Do the counts look like this:

Alice - 1
Bob - 2
Charlie - 1

or this:

"Alice, Bob" 1
"Bob, Charlie" 1

JIRA 4.3 and earlier chose the first way for custom multiselect fields. JIRA 4.4 and later have changed it to the second way (accidentally?) and some people are not impressed. I think that the first way seems more like a natural combination of the histograms of the different values.

Note that since JIRA enforces an order for all the options for a custom multiselect field we don't have to deal with the theoretical question of whether ["Alice", "Bob"] is the same as ["Bob", "Alice"].

1 comment:

  1. There is a related issue JRA-20054 ( that got resolved today in JIRA 4.4.5. From that issue:

    Example Data Distribution:

    Issue ID Component(s)
    One Apple
    Two Banana
    Seven Apple, Banana
    42 Apple, Banana, Peach

    I would also expect to see the summary as:

    Aggregate Count
    Apple 3
    Banana 3
    Peach 1
    Total Issues 4