Hi Alex
I now managed to modify the Atlassian_JIRA_ReportBug.js and the two forms to fit most of my needs.
I'm using Jira version 5.1 (and 6.04 for another site)
The only thing missing now is that CreateBug function do not return the bug id correctly (bug.key).
It's used to open Jira and the created bug in the browser.
The aqDlg.ShowMessage(xml_response_obj.xml); shows that the <key xsi:type=soapenc:string">SANDBOX-155<"/key> are present in the XLM
Maybe the ParseResponse do not parse the results correctly ??, as I also had similar issue with the priorities (which I ended up solving by hardcoding the priorities array in the Atlassian_JIRA_ReportBug.js)
Here part of the .js :
function PostBugToJIRA(http_request_obj, param)
{
var text;
var form = UserForms.JIRA_DefectInfoForm;
var web_service_info = GetWebServiceInfo();
var status_text = form.cxMemo_Progress.Lines;
if (aqString.GetLength(m_summary_name) == 0)
{
status_text.Add(umsg_empty_bug_name_error);
return false;
}
try
{
status_text.Add(umsg_server_creating_bug);
bug = CreateBug(http_request_obj, web_service_info);
status_text.Add(bug.fix)
status_text.Add(bug.key);
status_text.Add(umsg_server_bug_created);
}
catch(ex)
{
status_text.Add(ex.description);
LogoutFromServer(http_request_obj, web_service_info);
return false;
}
if (m_add_log_file)
{
try
{
status_text.Add(umsg_server_log_converting);
var base64_converted_data = aqObject.encodeBase64(aqFile.ReadWholeTextFile(param, aqFile.ctANSI));
status_text.Add(umsg_server_log_converted);
// DEBUG
//aqDlg.ShowMessage(aqString.GetLength(base64_converted_data));
status_text.Add(umsg_server_sending_attach + " Size : " + aqString.GetLength(base64_converted_data));
//if (AddAttachmentToBug(http_request_obj, web_service_info, bug.key, param, base64_converted_data) == false)
if (AddAttachmentToBug(http_request_obj, web_service_info, param, base64_converted_data) == false)
throw new Error(0, "");
status_text.Add(umsg_server_attach_sended);
}
catch(ex)
{
status_text.Add(umsg_error_attach_not_sended);
if (ex.description != "")
status_text.Add(ex.description);
// DEBUG
var bug_temp_key = " emty !";
// status_text.Add(aqString.Format(umsg_posted_bug_key, bug.key));
status_text.Add(aqString.Format(umsg_posted_bug_key, bug_temp_key));
LogoutFromServer(http_request_obj, web_service_info)
status_text.Add(umsg_server_logout);
return false;
}
}
LogoutFromServer(http_request_obj, web_service_info);
status_text.Add(umsg_server_logout);
//DEBUG
//status_text.Add(umsg_operation_completed_sucsessfully + "\r\n" + aqString.Format(umsg_posted_bug_key, bug.key));
status_text.Add(umsg_operation_completed_sucsessfully + "\r\n" + aqString.Format(umsg_posted_bug_key, m_project_key));
//if (aqDlg.MessageDlg(aqString.Format(umsg_open_defect_in_browser, bug.key), 0, 1|2) == 6)
if (aqDlg.MessageDlg(aqString.Format(umsg_open_defect_in_browser, bug_id), 0, 1|2) == 6)
{
var shell = new ActiveXObject("Shell.Application");
// shell.ShellExecute(m_server_name + aqString.Format("/browse/%s", bug.key)); // e.g. .../SANDBOX-155
shell.ShellExecute(m_server_name + aqString.Format("/browse/%s", m_project_key));
}