When searching with TQL a float field value different from empty in a tracker report, a fatal error is raised.
It also prevents the user from being redirected to it if it occurs on the default report.
The query is the following : float_field != ""
Trace:
2024-08-21T17:26:31+02:00 [622] [error] Error while trying to execute the following report query with 3 parameters: SELECT id, last_changeset_id FROM (SELECT c.artifact_id AS id, c.id AS last_changeset_id FROM tracker_artifact AS artifact
INNER JOIN tracker_changeset AS c ON (artifact.last_changeset_id = c.id) LEFT JOIN (
tracker_changeset_value AS CV_55451_00000000000009150000000000000000
INNER JOIN tracker_changeset_value_float AS CVFloat_55451_00000000000009150000000000000000
ON (CVFloat_55451_00000000000009150000000000000000.changeset_value_id = CV_55451_00000000000009150000000000000000.id
AND CVFloat_55451_00000000000009150000000000000000.value IS NOT NULL
)
) ON (CV_55451_00000000000009150000000000000000.changeset_id = c.id AND CV_55451_00000000000009150000000000000000.field_id = ?) WHERE (artifact.tracker_id = ?) AND (CV_55451_00000000000009150000000000000000.changeset_id IS NOT NULL)) AS R GROUP BY id, last_changeset_id
2024-08-21T17:26:31+02:00 [622] [error] Caught exception: SQLSTATE[HY093]: Invalid parameter number:
#0 /usr/share/tuleap/src/vendor/paragonie/easydb/src/EasyDB.php(1005): PDOStatement->execute()
#1 /usr/share/tuleap/src/vendor/paragonie/easydb/src/EasyDB.php(948): ParagonIE\EasyDB\EasyDB->safeQuery()
#2 /usr/share/tuleap/plugins/tracker/include/Tracker/Report/Query/QueryDao.php(126): ParagonIE\EasyDB\EasyDB->run()
#3 /usr/share/tuleap/plugins/tracker/include/Tracker/Report/Tracker_Report.class.php(2102): Tuleap\Tracker\Report\Query\QueryDao->searchMatchingIds()
#4 /usr/share/tuleap/plugins/tracker/include/Tracker/Report/Tracker_Report.class.php(2069): Tracker_Report->getMatchingIdsInDb()
#5 /usr/share/tuleap/plugins/tracker/include/Tracker/Report/Tracker_Report.class.php(386): Tracker_Report->getMatchingIdsFromExpertQuery()
#6 /usr/share/tuleap/plugins/tracker/include/Tracker/Report/Tracker_Report.class.php(1022): Tracker_Report->getMatchingIds()
#7 /usr/share/tuleap/plugins/tracker/include/Tracker/Report/Tracker_Report.class.php(1627): Tracker_Report->display()
#8 /usr/share/tuleap/plugins/tracker/include/Tracker/Tracker.class.php(1167): Tracker_Report->process()
#9 /usr/share/tuleap/plugins/tracker/include/Tracker/Tracker.class.php(977): Tracker->displayAReport()
#10 /usr/share/tuleap/plugins/tracker/include/Tracker/TrackerManager.class.php(149): Tracker->process()
#11 /usr/share/tuleap/plugins/tracker/include/Tracker/TrackerManager.class.php(167): TrackerManager->processSubElement()
#12 /usr/share/tuleap/plugins/tracker/include/TrackerPluginDefaultController.php(45): TrackerManager->process()
#13 /usr/share/tuleap/src/common/Request/FrontRouter.php(251): Tuleap\Tracker\TrackerPluginDefaultController->process()
#14 /usr/share/tuleap/src/common/Request/FrontRouter.php(109): Tuleap\Request\FrontRouter->routeHandler()
#15 /usr/share/tuleap/src/www/index.php(50): Tuleap\Request\FrontRouter->route()
#16 {main}