Submitting a New Issue


To submit a new issue and its details use the GetNewIssue and SaveIssue Web methods.
Follow these steps:

  1. Create an empty issue (GetNewIssue).
  2. Save it using the SaveIssue method.

Below are examples that submit a new issue with the title "This is a new issue".

Example in Visual Basic .Net

Try
        'create an instance of the proxy class
        Dim BTService As New Elementool.BugTrackingWse
        'Execute web method for creating empty issue
        Dim Issue As Elementool.BugTrackingIssue = (BTService.GetNewIssue)
        'Set the first field of the issue which is title
        Issue.FieldsArray(0).Value = "This is a new issue"
        'Save the issue
        Issue = BTService.SaveIssue(Issue)
        'Display the new issue number
        MsgBox("Issue  #" & Issue.IssueNumber & " was successfully updated")
 Catch ex As Exception
        MsgBox(ex.Message)
End Try

Example in C#

try
{
    //create an instance of the proxy class
    Elementool.BugTrackingWse BTService = new Elementool.BugTrackingWse();
    //Execute web method for creating empty issue
    Elementool.BugTrackingIssue Issue = (BTService.GetNewIssue);
    //Set the first field of the issue which is title
    Issue.FieldsArray(0).Value = "This is a new issue";
    //Save the issue
    Issue = BTService.SaveIssue(Issue);
    //Display the new issue number
    MessageBox.Show("Issue #" + Issue.IssueNumber + " was successfully updated");
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}