When exporting a CSV report, some information are mixed from on line to the following.
The beginning of a line contains the values related to the current artifact, but the end of the line concerns the previous or next artifact. But this isn't systematic, this seems related to some data only.
We are still unable to reproduce on a simple test case and we cannot share our data.
This behaviour seems to occur when the number of requested column exceed 20.
But it is not only related to this: we tried to create a tracker from scratch and we do not observed the behaviour.
In order to understand the behaviour, we noticed that the "20" columns seems related to the threshold in buildOrderedQuery
to split the query into sub-queries.
We also hacked the code in exportToCSV
as following:
$subrow = $result->getRow();
if ($subrow['id'] != $row['id']) {
// TODO Warning
}
$row = array_merge($row, $subrow);
With such code, we were able to understand that there are "permutations" :
subrow[id]=403 row[id]=2
subrow[id]=2 row[id]=403
subrow[id]=404 row[id]=3
subrow[id]=3 row[id]=404
subrow[id]=405 row[id]=4
subrow[id]=4 row[id]=405
subrow[id]=406 row[id]=5
subrow[id]=5 row[id]=406
subrow[id]=501 row[id]=6
subrow[id]=6 row[id]=501
subrow[id]=623 row[id]=7
subrow[id]=7 row[id]=623
subrow[id]=915 row[id]=8
subrow[id]=8 row[id]=915
subrow[id]=935 row[id]=9
subrow[id]=9 row[id]=935