Skip to content

Commit

Permalink
Fixed export if Id to iofxml
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Jul 14, 2023
1 parent fba99e0 commit 89b3954
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ QString RelaysPlugin::resultsIofXml30()
auto iof_id = tt_leg_row.value(QStringLiteral("iofId"));
if (!iof_id.isNull())
append_list(person, QVariantList{"Id", QVariantMap{{"type", "IOF"}}, iof_id});
append_list(person, QVariantList{"Id", tt_leg_row.value(QStringLiteral("runId"))});
append_list(person, QVariantList{"Id", QVariantMap{{"type", "QuickEvent"}}, tt_leg_row.value(QStringLiteral("runId"))});
auto family = tt_leg_row.value(QStringLiteral("lastName"));
auto given = tt_leg_row.value(QStringLiteral("firstName"));
append_list(person, QVariantList{"Name", QVariantList{"Family", family}, QVariantList{"Given", given}});
Expand Down
28 changes: 14 additions & 14 deletions quickevent/app/quickevent/plugins/Runs/src/runsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,20 +863,20 @@ QString RunsPlugin::resultsIofXml30Stage(int stage_id)
for(int j=0; j<tt2.rowCount(); j++) {
const qf::core::utils::TreeTableRow tt2_row = tt2.row(j);
//pos++;
QVariantList person_result{"PersonResult"};
QVariantList person{"Person"};
person.insert(person.count(),
QVariantList{"Id", QVariantMap{{"type", "CZE"}}, tt2_row.value(QStringLiteral("competitors.registration"))});
auto iof_id = tt2_row.value(QStringLiteral("competitors.iofId"));
if (!iof_id.isNull())
person.insert(person.count(), QVariantList{"Id", QVariantMap{{"type", "IOF"}}, iof_id});
person.insert(person.count(), QVariantList{"Id", tt2_row.value(QStringLiteral("runs.id"))});
person.insert(person.count(),QVariantList{"Name",
QVariantList{"Family", tt2_row.value(QStringLiteral("competitors.lastName"))},
QVariantList{"Given", tt2_row.value(QStringLiteral("competitors.firstName"))},
}
);
person_result.insert(person_result.count(),person);
QVariantList person_result{"PersonResult"};
QVariantList person{"Person"};
person.insert(person.count(),
QVariantList{"Id", QVariantMap{{"type", "CZE"}}, tt2_row.value(QStringLiteral("competitors.registration"))});
auto iof_id = tt2_row.value(QStringLiteral("competitors.iofId"));
if (!iof_id.isNull())
person.insert(person.count(), QVariantList{"Id", QVariantMap{{"type", "IOF"}}, iof_id});
person.insert(person.count(), QVariantList{"Id", QVariantMap{{"type", "QuickEvent"}}, tt2_row.value(QStringLiteral("runs.id"))});
person.insert(person.count(),QVariantList{"Name",
QVariantList{"Family", tt2_row.value(QStringLiteral("competitors.lastName"))},
QVariantList{"Given", tt2_row.value(QStringLiteral("competitors.firstName"))},
}
);
person_result.insert(person_result.count(),person);

auto club_abbr = tt2_row.value(QStringLiteral("clubs.abbr")).toString();
if (!club_abbr.isEmpty()) {
Expand Down

0 comments on commit 89b3954

Please sign in to comment.