•  
      request #24153 Bar charts that are not grouped generate an invalid SQL query
    Infos
    #24153
    Thomas Gerbet (tgerbet)
    2021-11-19 11:17
    2021-11-18 11:28
    25697
    Details
    Bar charts that are not grouped generate an invalid SQL query

    Reproduction steps:

    1. Create a new bar chart
    2. Select some source data

    On the front end side an error will be displayed

    An error occurred while loading the chart: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    

    If you look at the source of the error you will see it is caused by a malformed SQL query:

    SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to
     use near '' at line 11:
    #0 /usr/share/tuleap/src/vendor/paragonie/easydb/src/EasyDB.php(985): PDO->query()
    #1 /usr/share/tuleap/src/vendor/paragonie/easydb/src/EasyDB.php(948): ParagonIE\EasyDB\EasyDB->safeQuery()
    #2 /usr/share/tuleap/plugins/graphontrackersv5/include/data-transformation/GraphOnTrackersV5_Chart_BarDataBuilder.class.php(120): ParagonIE\EasyDB\EasyDB->run()
    #3 /usr/share/tuleap/plugins/graphontrackersv5/include/data-transformation/GraphOnTrackersV5_Chart_BarDataBuilder.class.php(58): GraphOnTrackersV5_Chart_BarDataBuilder->getQueryResult()
    #4 /usr/share/tuleap/plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart.class.php(431): GraphOnTrackersV5_Chart_BarDataBuilder->buildProperties()
    #5 /usr/share/tuleap/plugins/graphontrackersv5/include/data-access/GraphOnTrackersV5_Chart.class.php(365): GraphOnTrackersV5_Chart->getEngineWithData()
    #6 /usr/share/tuleap/plugins/graphontrackersv5/include/Async/ChartDataController.php(99): GraphOnTrackersV5_Chart->fetchAsArray()
    #7 /usr/share/tuleap/src/common/Http/Server/RequestHandlerAsMiddleware.php(44): Tuleap\GraphOnTrackersV5\Async\ChartDataController->handle()
    #8 /usr/share/tuleap/src/common/Http/Server/MiddlewareDispatcher.php(52): Tuleap\Http\Server\RequestHandlerAsMiddleware->process()
    #9 /usr/share/tuleap/src/common/Http/Server/SessionWriteCloseMiddleware.php(36): Tuleap\Http\Server\MiddlewareDispatcher->handle()
    #10 /usr/share/tuleap/src/common/Http/Server/MiddlewareDispatcher.php(52): Tuleap\Http\Server\SessionWriteCloseMiddleware->process()
    #11 /usr/share/tuleap/src/common/Request/DispatchablePSR15Compatible.php(62): Tuleap\Http\Server\MiddlewareDispatcher->handle()
    #12 /usr/share/tuleap/src/common/Request/FrontRouter.php(248): Tuleap\Request\DispatchablePSR15Compatible->process()
    #13 /usr/share/tuleap/src/common/Request/FrontRouter.php(108): Tuleap\Request\FrontRouter->routeHandler()
    #14 /usr/share/tuleap/src/www/index.php(49): Tuleap\Request\FrontRouter->route()
    #15 {main}
    
    Trackers
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-11-19
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    Integrated to Tuleap 13.2.99.46


    • Status changed from Under review to Closed
    • Connected artifacts
    • Close date set to 2021-11-19