•  
      request #1931 Bar charts groupby misbehavior
    Infos
    #1931
    Yoann Celton (jtekt)
    2013-04-02 09:56
    2012-12-06 12:08
    1011
    Details
    Bar charts groupby misbehavior
    When creating a BarChart with a groupBy condition, the result is not the one expected.
    Exemple using the "Bugs" default template in attachment, adding 8 artifacts and generating a BarChart on Status, group by Severity.
    The SQL query generated shows that the graph generated is valid regarding the data returned by the query. So my guess is that the group by in the SQL query is incorrect.

    Query result :
    nb status_id severity
    1 392 383
    1 392 386
    1 393 383
    1 394 386
    2 394 387
    1 395 383
    1 396 389



    Attachment:
    Report showing the 8 fake artifacts with their fields
    BarChart that SHOULD be generated from those artifacts
    BarChart that IS generated


    Trackers
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2013-04-02
    Attachments
    Artifacts used for the test
    Chart that is generated
    Chart the SHOULD be generated
    References
    Referenced by request #1931

    Artifact

    art #1612

    Follow-ups

    User avatar
    Yoann Celton (jtekt)2013-04-02 09:56
    Corrected and integrated in tuleap 5.12

    • Status changed from Verified to Closed
    • Close date set to 2013-04-02
    • Platform set to
    • Is an Enhancement or an internal improvement? set to
    User avatar
    Yoann Celton (jtekt)2012-12-07 17:28
    So you'll have to wait I guess :)

    (Or just keep the + from the patch. The - are me correcting my previous patch)
    User avatar
    Yoann Celton (jtekt)2012-12-07 17:07
    I did it too, but I thought maybe some people would want to patch now, and not waiting until I finish my dev.
    User avatar
    Yoann Celton (jtekt)2012-12-06 14:59
    Fixed the fix.

    • Attachments fix_bar_chart.diff removed; fix_bar_chart.diff added
    User avatar
    Yoann Celton (jtekt)2012-12-06 14:27
    Of course not as is. The real question is if the complete fix should be integrated in this branch, or a dedicated one.
    User avatar
    Yoann Celton (jtekt)2012-12-06 14:15
    That was fast :)
    It did indeed solve the problem of the groupby, but broke the chart without groupBy
    "The argument should be an array in /usr/share/codendi/plugins/graphontrackersv5/include/data-transformation/GraphOnTrackersV5_Chart_BarDataBuilder.class.php on line 93"

    Should I include this patch in the graph_enhancement branch ?
    User avatar
    Tha attached patch should fix the issue.
    (To apply: patch -p1 < /tmp/fix_bar_chart.diff)

    • Attachments fix_bar_chart.diff added
    User avatar
    You have 4 distinct values for severity, therefore the graph should really display 4 groups (and not 2 like in your chart_theory.png).

    However it seems that the labels of the generated bar chart are wrong.