Releases_LoadByCriteria Operation

Applies to QAComplete 14.3, last modified on February 19, 2024

Use the Releases_LoadByCriteria operation to:

  • Get releases that match a specific condition. For example, created by a specific user or on a specific day.

  • Get all releases in QAComplete projects (if no condition is specified).

The operation can get releases from one or several projects. To specify a project to get releases from, use the ProjId value in the AuthenticationData object in the request body. To get releases from several projects, use the ProjIds value in the AuthenticationData object to specify the list of project IDs.

LoadByCriteria returns results in pages (subsets of data) rather than all at once. Pagination is controlled by the PageSize and PageNumber parameters. For information about working with paginated results, see LoadByCriteria Operations.

You can use the Sorting parameter to sort the releases before returning them from QAComplete.

To get just one release, use Releases_Load.

Requirements

The authenticating user must belong to a user group that has the Read privilege for Releases.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object with the login information and the ID of the project (or the list of project IDs) that contains the releases.

Condition  :  string

An XML-formatted string that describes the releases you want to get. For the syntax and examples, see Condition Syntax.

If you create SOAP requests manually, place the condition string inside CDATA.

To get all releases, use an empty string or a null value.

Sorting  :  string

The order to sort the results before returning them from the web service. For example, by releases ID or last updated date. The format is:

Property1 [ASC | DESC ][, Property2 [ASC | DESC ]] [, ...]]]

where property names are those of the Release object. If you omit ASC or DESC after a property name, releases are sorted in ascending order.

Example values:

Id
AssignedToName, Id
DateUpdated DESC

To keep the default sort order, use an empty string or a null value.

PageSize  :  integer, required

Limits the number of releases to return in one page. Possible values: 1..200.

The last page may have less items than PageSize. This means the end of the result set.

PageNumber  :  integer, required

A number starting from 1 that specifies the data page to return in the response. To get all pages, send several requests with increasing PageNumber values. For example, if PageSize is 100, PageNumber of 1 will return releases 1..100, PageNumber of 2 – releases 101..200 and so on.

If PageNumber exceeds the range, an empty array is returned. If PageNumber is the last page, this page may have less items than PageSize.

Result

An array of Release objects that contain the release information.

Example

Sample Code

C#

string login = "[email protected]";
string password = "p@ssword";
int projId = 10372;

// Specifying the needed condition
string Condition =
@"<Conditions xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema' Operation='opEQU'>
  <Items Type='tField'>
    <Value xsi:type='xsd:string'>StatusCode</Value>
  </Items>
  <Items Type='tString'>
    <Value xsi:type='xsd:string'>In Progress</Value>
  </Items>
</Conditions>";

// Specifying the desired sorting
string Sorting = "";
// Specifying the number of releases on one page
int PageSize = 5;

ServiceSoapClient service = new ServiceSoapClient();

// Preparing AuthenticationData
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;
authData.ProjId = projId;

// Getting an array of releases
Release[] releases = new Release[0];
int PageNumber = 1;
do
{
  releases = service.Releases_LoadByCriteria(authData, Condition, Sorting, PageSize, PageNumber);
  foreach (Release release in releases)
  {
    //Printing ID and title of each release
    Console.WriteLine("{0}: {1}", release.Id, release.Title);
  }
PageNumber++;
} while (releases.Length == PageSize);

Java

String login = "[email protected]";
String password = "p@ssword";
int projId = 10372;

// Specifying the needed condition
String Condition =
  "<Conditions xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" +
  "  xmlns:xsd='http://www.w3.org/2001/XMLSchema' Operation='opEQU'> \n" +
  "  <Items Type='tField'> \n" +
  "    <Value xsi:type='xsd:string'>StatusCode</Value> \n" +
  "  </Items> \n" +
  "  <Items Type='tString'> \n" +
  "    <Value xsi:type='xsd:string'>In Progress</Value> \n" +
  "  </Items> \n" +
  "</Conditions>";
// Specifying the desired sorting
String Sorting = "";
// Specifying the number of releases on one page
int PageSize = 200;

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

// Preparing AuthenticationData
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());
authData.setProjId(projId);

// Getting an array of releases
List<Release> releases;
int PageNumber = 1;

do
{
  releases = service.releasesLoadByCriteria(authData, Condition, Sorting, PageSize, PageNumber).getRelease();
  for (Release release : releases)
  {
    //Printing ID and title of each release
    System.out.format("%d: %s%n", release.getId(), release.getTitle());
  }
  PageNumber++;
} while (releases.size()==PageSize);

Sample Request XML

POST /psWS.asmx HTTP/1.1
Host: yourserver.com
Content-Type: text/xml; charset=utf-8
Content-Length: 1058
SOAPAction: "http://www.pragmaticsw.com/Releases_LoadByCriteria"

<?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>
    <Releases_LoadByCriteria xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSPEnt</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>10372</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Condition>
        <![CDATA[<Conditions xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        Operation='opEQU'>
          <Items Type='tField'>
            <Value xsi:type='xsd:string'>StatusCode</Value>
          </Items>
          <Items Type='tString'>
            <Value xsi:type='xsd:string'>In Progress</Value>
          </Items>
        </Conditions>]]>
      </Condition>
      <Sorting>Id</Sorting>
      <PageSize>5</PageSize>
      <PageNumber>1</PageNumber>
    </Releases_LoadByCriteria>
  </soap:Body>
</soap:Envelope>

POST /psWS.asmx HTTP/1.1
Host: yourserver.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1066

<?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>
    <Releases_LoadByCriteria xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSPEnt</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>10372</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <Condition>
        <![CDATA[<Conditions xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        Operation='opEQU'>
          <Items Type='tField'>
            <Value xsi:type='xsd:string'>StatusCode</Value>
          </Items>
          <Items Type='tString'>
            <Value xsi:type='xsd:string'>In Progress</Value>
          </Items>
        </Conditions>]]>
      </Condition>
      <Sorting>Id</Sorting>
      <PageSize>5</PageSize>
      <PageNumber>1</PageNumber>
    </Releases_LoadByCriteria>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 3846 {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>
    <Releases_LoadByCriteriaResponse xmlns="http://www.pragmaticsw.com/">
      <Releases_LoadByCriteriaResult>
        <Release>
          <Id>14</Id>
          <ProjId>10372</ProjId>
          <FolderId>0</FolderId>
          <ReleaseId></ReleaseId>
          <FullReleaseName>Release 1.0</FullReleaseName>
          <ReleaseName></ReleaseName>
          <ParentId>0</ParentId>
          <ParentName></ParentName>
          <ReleaseType>Release</ReleaseType>
          <Title>Release 1.0</Title>
          <Description>The initial product release.</Description>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <IsAutoAdjustEstDates>N</IsAutoAdjustEstDates>
          <DateCreated>2014-07-09T22:41:37.17</DateCreated>
          <DateUpdated>2014-07-14T22:26:47</DateUpdated>
          <CreateUserId>27572</CreateUserId>
          <UpdateUserId>27942</UpdateUserId>
          <StatusCode>In Progress</StatusCode>
          <SeqNum>1</SeqNum>
          <ParentSeqNum>0</ParentSeqNum>
          <IsActive>Y</IsActive>
          <EstStartDate>2014-07-02T10:00:00</EstStartDate>
          <EstFinishDate>2014-08-01T00:00:00</EstFinishDate>
          <AssignedToName>Doe, John</AssignedToName>
          <OwnerName>Davis, Eugeny</OwnerName>
          <UserName>Doe, John</UserName>
          <NbrNotes>0</NbrNotes>
          <NbrFiles>0</NbrFiles>
          <NotesDescription>0</NotesDescription>
          <NbrEscalations>0</NbrEscalations>
          <DateLastEscalated>0001-01-01T00:00:00</DateLastEscalated>
          <LastEscalationRuleId>0</LastEscalationRuleId>
          <NbrProjectPlans>0</NbrProjectPlans>
          <NbrProjectPlanTasks>0</NbrProjectPlanTasks>
          <NbrQuickTasks>0</NbrQuickTasks>
          <NbrTests>0</NbrTests>
          <NbrTestCases>0</NbrTestCases>
          <NbrDefects>0</NbrDefects>
          <EstStart>0001-01-01T00:00:00</EstStart>
          <EstFinish>0001-01-01T00:00:00</EstFinish>
          <ActStart>2014-07-02T12:00:00</ActStart>
          <ActFinish>0001-01-01T00:00:00</ActFinish>
          <PctComplete>10</PctComplete>
          <ProjectVarianceHrs>236</ProjectVarianceHrs>
          <EstHrs>250</EstHrs>
          <ActHrs>14</ActHrs>
          <EstHrsRemaining>0</EstHrsRemaining>
          <NbrIterations>1</NbrIterations>
          <NbrBuilds>26</NbrBuilds>
        </Release>
        <Release>
          <Id>15</Id>
          <ProjId>10372</ProjId>
          <FolderId>0</FolderId>
          <ReleaseId>14</ReleaseId>
          <FullReleaseName>Release 1.0/Alfa</FullReleaseName>
          <ReleaseName>Release 1.0</ReleaseName>
          <ParentId>14</ParentId>
          <ParentName>Release 1.0</ParentName>
          <ReleaseType>Iteration</ReleaseType>
          <Title>Alfa</Title>
          <Description>Alfa version of the release.</Description>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <IsAutoAdjustEstDates>N</IsAutoAdjustEstDates>
          <DateCreated>2014-07-09T22:44:23.703</DateCreated>
          <DateUpdated>2014-07-10T10:15:35.703</DateUpdated>
          <CreateUserId>27572</CreateUserId>
          <UpdateUserId>27942</UpdateUserId>
          <StatusCode>In Progress</StatusCode>
          <SeqNum>1</SeqNum>
          <ParentSeqNum>1</ParentSeqNum>
          <IsActive>Y</IsActive>
          <EstStartDate>2014-07-04T12:00:00</EstStartDate>
          <EstFinishDate>2014-07-15T00:00:00</EstFinishDate>
          <AssignedToName>Doe, John</AssignedToName>
          <OwnerName>Davis, Eugeny</OwnerName>
          <UserName>Doe, John</UserName>
          <NbrNotes>0</NbrNotes>
          <NbrFiles>0</NbrFiles>
          <NotesDescription>0</NotesDescription>
          <NbrEscalations>0</NbrEscalations>
          <DateLastEscalated>0001-01-01T00:00:00</DateLastEscalated>
          <LastEscalationRuleId>0</LastEscalationRuleId>
          <NbrProjectPlans>0</NbrProjectPlans>
          <NbrProjectPlanTasks>0</NbrProjectPlanTasks>
          <NbrQuickTasks>0</NbrQuickTasks>
          <NbrTests>0</NbrTests>
          <NbrTestCases>0</NbrTestCases>
          <NbrDefects>0</NbrDefects>
          <EstStart>0001-01-01T00:00:00</EstStart>
          <EstFinish>0001-01-01T00:00:00</EstFinish>
          <ActStart>2014-07-05T08:00:00</ActStart>
          <ActFinish>0001-01-01T00:00:00</ActFinish>
          <PctComplete>23</PctComplete>
          <ProjectVarianceHrs>124</ProjectVarianceHrs>
          <EstHrs>150</EstHrs>
          <ActHrs>26</ActHrs>
          <EstHrsRemaining>0</EstHrsRemaining>
          <NbrIterations>0</NbrIterations>
          <NbrBuilds>12</NbrBuilds>
        </Release>
      </Releases_LoadByCriteriaResult>
    </Releases_LoadByCriteriaResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 3856 {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>
    <Releases_LoadByCriteriaResponse xmlns="http://www.pragmaticsw.com/">
      <Releases_LoadByCriteriaResult>
        <Release>
          <Id>14</Id>
          <ProjId>10372</ProjId>
          <FolderId>0</FolderId>
          <ReleaseId></ReleaseId>
          <FullReleaseName>Release 1.0</FullReleaseName>
          <ReleaseName></ReleaseName>
          <ParentId>0</ParentId>
          <ParentName></ParentName>
          <ReleaseType>Release</ReleaseType>
          <Title>Release 1.0</Title>
          <Description>The initial product release.</Description>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <IsAutoAdjustEstDates>N</IsAutoAdjustEstDates>
          <DateCreated>2014-07-09T22:41:37.17</DateCreated>
          <DateUpdated>2014-07-14T22:26:47</DateUpdated>
          <CreateUserId>27572</CreateUserId>
          <UpdateUserId>27942</UpdateUserId>
          <StatusCode>In Progress</StatusCode>
          <SeqNum>1</SeqNum>
          <ParentSeqNum>0</ParentSeqNum>
          <IsActive>Y</IsActive>
          <EstStartDate>2014-07-02T10:00:00</EstStartDate>
          <EstFinishDate>2014-08-01T00:00:00</EstFinishDate>
          <AssignedToName>Doe, John</AssignedToName>
          <OwnerName>Davis, Eugeny</OwnerName>
          <UserName>Doe, John</UserName>
          <NbrNotes>0</NbrNotes>
          <NbrFiles>0</NbrFiles>
          <NotesDescription>0</NotesDescription>
          <NbrEscalations>0</NbrEscalations>
          <DateLastEscalated>0001-01-01T00:00:00</DateLastEscalated>
          <LastEscalationRuleId>0</LastEscalationRuleId>
          <NbrProjectPlans>0</NbrProjectPlans>
          <NbrProjectPlanTasks>0</NbrProjectPlanTasks>
          <NbrQuickTasks>0</NbrQuickTasks>
          <NbrTests>0</NbrTests>
          <NbrTestCases>0</NbrTestCases>
          <NbrDefects>0</NbrDefects>
          <EstStart>0001-01-01T00:00:00</EstStart>
          <EstFinish>0001-01-01T00:00:00</EstFinish>
          <ActStart>2014-07-02T12:00:00</ActStart>
          <ActFinish>0001-01-01T00:00:00</ActFinish>
          <PctComplete>10</PctComplete>
          <ProjectVarianceHrs>236</ProjectVarianceHrs>
          <EstHrs>250</EstHrs>
          <ActHrs>14</ActHrs>
          <EstHrsRemaining>0</EstHrsRemaining>
          <NbrIterations>1</NbrIterations>
          <NbrBuilds>26</NbrBuilds>
        </Release>
        <Release>
          <Id>15</Id>
          <ProjId>10372</ProjId>
          <FolderId>0</FolderId>
          <ReleaseId>14</ReleaseId>
          <FullReleaseName>Release 1.0/Alfa</FullReleaseName>
          <ReleaseName>Release 1.0</ReleaseName>
          <ParentId>14</ParentId>
          <ParentName>Release 1.0</ParentName>
          <ReleaseType>Iteration</ReleaseType>
          <Title>Alfa</Title>
          <Description>Alfa version of the release.</Description>
          <OwnerUserId>27572</OwnerUserId>
          <AssigneeUserId>27942</AssigneeUserId>
          <IsAutoAdjustEstDates>N</IsAutoAdjustEstDates>
          <DateCreated>2014-07-09T22:44:23.703</DateCreated>
          <DateUpdated>2014-07-10T10:15:35.703</DateUpdated>
          <CreateUserId>27572</CreateUserId>
          <UpdateUserId>27942</UpdateUserId>
          <StatusCode>In Progress</StatusCode>
          <SeqNum>1</SeqNum>
          <ParentSeqNum>1</ParentSeqNum>
          <IsActive>Y</IsActive>
          <EstStartDate>2014-07-04T12:00:00</EstStartDate>
          <EstFinishDate>2014-07-15T00:00:00</EstFinishDate>
          <AssignedToName>Doe, John</AssignedToName>
          <OwnerName>Davis, Eugeny</OwnerName>
          <UserName>Doe, John</UserName>
          <NbrNotes>0</NbrNotes>
          <NbrFiles>0</NbrFiles>
          <NotesDescription>0</NotesDescription>
          <NbrEscalations>0</NbrEscalations>
          <DateLastEscalated>0001-01-01T00:00:00</DateLastEscalated>
          <LastEscalationRuleId>0</LastEscalationRuleId>
          <NbrProjectPlans>0</NbrProjectPlans>
          <NbrProjectPlanTasks>0</NbrProjectPlanTasks>
          <NbrQuickTasks>0</NbrQuickTasks>
          <NbrTests>0</NbrTests>
          <NbrTestCases>0</NbrTestCases>
          <NbrDefects>0</NbrDefects>
          <EstStart>0001-01-01T00:00:00</EstStart>
          <EstFinish>0001-01-01T00:00:00</EstFinish>
          <ActStart>2014-07-05T08:00:00</ActStart>
          <ActFinish>0001-01-01T00:00:00</ActFinish>
          <PctComplete>23</PctComplete>
          <ProjectVarianceHrs>124</ProjectVarianceHrs>
          <EstHrs>150</EstHrs>
          <ActHrs>26</ActHrs>
          <EstHrsRemaining>0</EstHrsRemaining>
          <NbrIterations>0</NbrIterations>
          <NbrBuilds>12</NbrBuilds>
        </Release>
      </Releases_LoadByCriteriaResult>
    </Releases_LoadByCriteriaResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

Releases_Add
Releases_Delete
Releases_Load
Releases_Update
Releases Operations
SOAP API Reference

Highlight search results