From d38d2c840423c2733f52711699c284fc34e5234a Mon Sep 17 00:00:00 2001 From: Guy Scharf Date: Wed, 2 Feb 2022 11:27:39 -0700 Subject: [PATCH] Fixes #333: ExportCSV now exports statistics data on Session export properly Previously, it was exporting statistics only for days that had been viewed on the Daily page because it was not loading event data before computing the statistics, resulting in values of 0.0 instead of correct values. --- Htmldocs/release_notes.html | 1 + oscar/exportcsv.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Htmldocs/release_notes.html b/Htmldocs/release_notes.html index 896befa5..35e007ba 100644 --- a/Htmldocs/release_notes.html +++ b/Htmldocs/release_notes.html @@ -20,6 +20,7 @@
  • DreamStation 2 Auto CPAP Advanced (520X110C, 520X150C)
  • +
  • [fix] File Export Sessions now exports statistics session data properly.
  • [new] Test Mantis integration.
  • diff --git a/oscar/exportcsv.cpp b/oscar/exportcsv.cpp index 2ec695f4..1e35df83 100644 --- a/oscar/exportcsv.cpp +++ b/oscar/exportcsv.cpp @@ -292,6 +292,7 @@ void ExportCSV::on_exportButton_clicked() QDateTime start = QDateTime::fromTime_t(sess->first() / 1000L); QDateTime end = QDateTime::fromTime_t(sess->last() / 1000L); + sess->OpenEvents(); data = date.toString(Qt::ISODate); data += sep + QString::number(sess->session(), 10); data += sep + start.toString(Qt::ISODate);