Bugs_GetStatuses Operation

Applies to QAComplete 14.3, last modified on February 19, 2024
Since release 10.2, this functionality is obsolete and is supported for backward compatibility only. We recommend that you use QAComplete REST API to access and manage data in QAComplete.

Returns a list of defect statuses for a QAComplete project. These statuses are defined in a choice list in Defects > Show Defects >  Tools >  Manage Choice Lists > Status Codes.

To specify the target project, use the ProjId value in AuthenticationData in the request body.

Requirements

The authenticating user must belong to a security group that has the following privileges:

  • Read access to Defects
  • Manage choice lists

Parameters

The operation uses the following parameter

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the project ID whose defect statuses you want to get.

Result

An array of strings containing the defect statuses.

Example

Sample Code

C#

ServiceSoapClient service = new ServiceSoapClient();

// Preparing AuthenticationData
string login = "[email protected]";
string password = "p@ssword";
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;

// The project ID to get defect statuses from.
// We'll default to the user's last used project.
authData.ProjId = loginInfo.ProjId;

ArrayOfString statuses = service.Bugs_GetStatuses(authData);
Console.WriteLine(String.Join(Environment.NewLine, statuses));

Java

ServiceSoap service = new Service().getServiceSoap12();

// Preparing AuthenticationData
String login = "[email protected]";
String password = "p@ssword";
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());

// The project ID to get defect statuses from.
// We'll default to the user's last used project.
authData.setProjId(loginInfo.getProjId());

List<String> statuses = service.bugsGetStatuses(authData).getString();
for (String status: statuses) System.out.println(status);

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 476 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/Bugs_GetStatuses"
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Bugs_GetStatuses xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
    </Bugs_GetStatuses>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 484 {Insert an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Bugs_GetStatuses xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
    </Bugs_GetStatuses>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 481 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Bugs_GetStatusesResponse xmlns="http://www.pragmaticsw.com/">
      <Bugs_GetStatusesResult>
        <string>Active</string>
        <string>Closed</string>
        <string>Committee</string>
        <string>Resolved</string>
      </Bugs_GetStatusesResult>
    </Bugs_GetStatusesResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 491 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Bugs_GetStatusesResponse xmlns="http://www.pragmaticsw.com/">
      <Bugs_GetStatusesResult>
        <string>Active</string>
        <string>Closed</string>
        <string>Committee</string>
        <string>Resolved</string>
      </Bugs_GetStatusesResult>
    </Bugs_GetStatusesResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

Bugs_Add
Bugs_Delete
Bugs_Load
Bugs_LoadByCriteria
Bugs_Update
Defects Operations
SOAP API Reference

Highlight search results