Merge lp:~brendan-donegan/checkbox/xls_report into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Merged at revision: 2955
Proposed branch: lp:~brendan-donegan/checkbox/xls_report
Merge into: lp:checkbox
Diff against target: 76 lines (+32/-0)
3 files modified
checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml (+2/-0)
checkbox-gui/gui-engine/gui-engine.cpp (+27/-0)
checkbox-gui/gui-engine/gui-engine.h (+3/-0)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/xls_report
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Needs Information
Daniel Manrique (community) Approve
Review via email: mp+217455@code.launchpad.net

Description of the change

When the submission.xml file is saved, also save the xlsx report.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks good, I'm OK with the empty options list, we can always change that once we implement client information support on the xlsx exporter (rather, generic option list support).

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

so two questions:

1) Do we want to do that unconditionally?
2) What happens when someone doesn't have python3-xslxwriter installed and the DBus call crashes?

review: Needs Information
Revision history for this message
Daniel Manrique (roadmr) wrote :

(set back to needs review pending answers to Zygmunt's comments - hopefully tarmac will check status *before* doing final merging)

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

(It does)

On Mon, Apr 28, 2014 at 5:13 PM, Daniel Manrique <
<email address hidden>> wrote:

> (set back to needs review pending answers to Zygmunt's comments -
> hopefully tarmac will check status *before* doing final merging)
> --
>
> https://code.launchpad.net/~brendan-donegan/checkbox/xls_report/+merge/217455
> You are reviewing the proposed merge of
> lp:~brendan-donegan/checkbox/xls_report into lp:checkbox.
>

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Or so I thought :D

On Mon, Apr 28, 2014 at 5:16 PM, <email address hidden> wrote:

> The proposal to merge lp:~brendan-donegan/checkbox/xls_report into
> lp:checkbox has been updated.
>
> Status: Needs review => Merged
>
> For more details, see:
>
> https://code.launchpad.net/~brendan-donegan/checkbox/xls_report/+merge/217455
> --
>
> https://code.launchpad.net/~brendan-donegan/checkbox/xls_report/+merge/217455
> You are reviewing the proposed merge of
> lp:~brendan-donegan/checkbox/xls_report into lp:checkbox.
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml'
--- checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml 2014-04-04 11:05:55 +0000
+++ checkbox-gui/checkbox-gui/qml/SubmissionDialog.qml 2014-04-28 14:32:31 +0000
@@ -97,6 +97,8 @@
97 }97 }
98 var success = guiEngine.GuiExportSessionToFileAsXML(export_path,98 var success = guiEngine.GuiExportSessionToFileAsXML(export_path,
99 option_list);99 option_list);
100 var xls_export_path = export_path.replace('.xml', '.xls');
101 guiEngine.GuiExportSessionToFileAsXLSX(xls_export_path, []);
100 if (submit_to == "certification") {102 if (submit_to == "certification") {
101 if (success) {103 if (success) {
102 dialog.text = guiEngine.SendSubmissionViaCertificationTransport(export_path,104 dialog.text = guiEngine.SendSubmissionViaCertificationTransport(export_path,
103105
=== modified file 'checkbox-gui/gui-engine/gui-engine.cpp'
--- checkbox-gui/gui-engine/gui-engine.cpp 2014-04-04 11:05:55 +0000
+++ checkbox-gui/gui-engine/gui-engine.cpp 2014-04-28 14:32:31 +0000
@@ -1970,6 +1970,17 @@
1970 return ExportSession(m_session,output_format,options);1970 return ExportSession(m_session,output_format,options);
1971}1971}
19721972
1973QString GuiEngine::GuiExportSessionAsXLSX(void)
1974{
1975 qDebug("GuiEngine::GuiExportSessionAsXLSX");
1976
1977 QString output_format = "xlsx";
1978 QStringList options; // No options
1979
1980 return ExportSession(m_session,output_format,options);
1981}
1982
1983
1973const QString GuiEngine::ExportSession(const QDBusObjectPath session, \1984const QString GuiEngine::ExportSession(const QDBusObjectPath session, \
1974 const QString &output_format, \1985 const QString &output_format, \
1975 const QStringList& option_list)1986 const QStringList& option_list)
@@ -2041,6 +2052,22 @@
2041 return true;2052 return true;
2042}2053}
20432054
2055bool GuiEngine::GuiExportSessionToFileAsXLSX(const QString& output_file,
2056 const QStringList& option_list)
2057{
2058 QString output_format = "xlsx";
2059
2060 // very basic argument checking
2061 if (output_file.isEmpty()) {
2062 return false;
2063 }
2064
2065 // FIXME - When we get a useful success/failure code here, return to caller
2066 QString done = ExportSessionToFile(m_session,output_format,option_list,output_file);
2067
2068 return true;
2069}
2070
2044const QString GuiEngine::ExportSessionToFile(const QDBusObjectPath session, \2071const QString GuiEngine::ExportSessionToFile(const QDBusObjectPath session, \
2045 const QString &output_format, \2072 const QString &output_format, \
2046 const QStringList &option_list, \2073 const QStringList &option_list, \
20472074
=== modified file 'checkbox-gui/gui-engine/gui-engine.h'
--- checkbox-gui/gui-engine/gui-engine.h 2014-04-04 11:05:55 +0000
+++ checkbox-gui/gui-engine/gui-engine.h 2014-04-28 14:32:31 +0000
@@ -162,11 +162,14 @@
162 // Convenience functions for the GUI162 // Convenience functions for the GUI
163 QString GuiExportSessionAsXML(void);163 QString GuiExportSessionAsXML(void);
164 QString GuiExportSessionAsHTML(void);164 QString GuiExportSessionAsHTML(void);
165 QString GuiExportSessionAsXLSX(void);
165166
166 bool GuiExportSessionToFileAsXML(const QString& output_file,167 bool GuiExportSessionToFileAsXML(const QString& output_file,
167 const QStringList& option_list);168 const QStringList& option_list);
168 bool GuiExportSessionToFileAsHTML(const QString& output_file,169 bool GuiExportSessionToFileAsHTML(const QString& output_file,
169 const QStringList& option_list);170 const QStringList& option_list);
171 bool GuiExportSessionToFileAsXLSX(const QString& output_file,
172 const QStringList& option_list);
170 173
171 const QString SendSubmissionViaCertificationTransport( \174 const QString SendSubmissionViaCertificationTransport( \
172 const QString &submission_path,175 const QString &submission_path,

Subscribers

People subscribed via source and target branches