Skip to content

Commit

Permalink
Merge pull request #789 from paukert/fix-729-v2
Browse files Browse the repository at this point in the history
Remove Time element from IOF XML 3.0 export if SplitTime is missing
  • Loading branch information
fvacek authored Aug 7, 2022
2 parents 654bc23 + 259e6bf commit 2be7680
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,10 @@ QString RelaysPlugin::resultsIofXml30()
}
QVariantList split{QStringLiteral("SplitTime")};
append_list(split, QVariantList{"ControlCode", cd.code()});
append_list(split, QVariantList{"Time", time / 1000});
if(time == 0)
split.insert(1, QVariantMap{ {QStringLiteral("status"), QStringLiteral("Missing")} });
else
append_list(split, QVariantList{"Time", time / 1000});
append_list(person_result, split);
}
}
Expand Down
3 changes: 2 additions & 1 deletion quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,11 @@ bool RunsPlugin::exportResultsIofXml30Stage(int stage_id, const QString &file_na
QVariantList split_time{
QStringLiteral("SplitTime"),
QVariantList{QStringLiteral("ControlCode"), cd.code() },
QVariantList{QStringLiteral("Time"), stp_time / 1000 },
};
if(stp_time == 0)
split_time.insert(1, QVariantMap{ {QStringLiteral("status"), QStringLiteral("Missing")} });
else
split_time.insert(split_time.count(), QVariantList{QStringLiteral("Time"), stp_time / 1000});
result.insert(result.count(), split_time);
ix += 4;
}
Expand Down

0 comments on commit 2be7680

Please sign in to comment.