Signed-off-by: Nikola Pajkovsky npajkovs@redhat.com --- lib/Plugins/Bugzilla.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index bffccc1..c8544c6 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -118,7 +118,7 @@ struct ctx: public abrt_xmlrpc_conn { xmlrpc_int32 new_bug(const map_crash_data_t& pCrashData); int add_attachments(const char* bug_id_str, const map_crash_data_t& pCrashData); int get_bug_info(struct bug_info* bz, xmlrpc_int32 bug_id); - int add_comment(xmlrpc_int32 bug_id, const char* comment); + int add_comment(xmlrpc_int32 bug_id, const char* comment, bool is_private);
xmlrpc_value* call(const char* method, const char* format, ...); }; @@ -336,9 +336,11 @@ int ctx::add_plus_one_cc(xmlrpc_int32 bug_id, const char* login) return result ? 0 : -1; }
-int ctx::add_comment(xmlrpc_int32 bug_id, const char* comment) +int ctx::add_comment(xmlrpc_int32 bug_id, const char* comment, bool is_private) { - xmlrpc_value* result = call("Bug.update", "({s:i,s:{s:s}})", "ids", (int)bug_id, "updates", "comment", comment); + xmlrpc_value* result = call("Bug.add_comment", "({s:i,s:s,s:b})", "id", (int)bug_id, + "comment", comment, + "private", is_private); if (result) xmlrpc_DECREF(result); return result ? 0 : -1; @@ -757,7 +759,9 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData, );
update_client(_("Add new comment into bug(%d)"), (int)bug_id); - if (bz_server.add_comment(bug_id, description.c_str()) == -1) + + // gui is not ready, default do not make it private + if (bz_server.add_comment(bug_id, description.c_str(), false) == -1) { bug_info_destroy(&bz); throw_if_xml_fault_occurred(&bz_server.env);