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. |
Finds a requirement by ID and replaces its data with that of the specified FunctionalSpec
object.
You usually use the FunctionalSpecs_Load operation to get a Requirement
by ID, change some of its properties, and pass the updated object to the FunctionalSpecs_Update operation. All uninitialized properties will be cleared.
Requirements
The authenticating user must belong to a security group that has the Update privilege for Requirements.
Parameters
The operation uses the following parameters:
AuthenticationData : AuthenticationData, required
An AuthenticationData
object containing the login information and the project ID that contains the requirement.
FunctionalSpec : FunctionalSpec, required
A FunctionalSpec
object that contains the new information for the requirement.
SendEmailAlert : string, required
Y
means send an email alert to the subscribed users after updating the requirement.
Any other value (for example, N
or empty string) means do not send email alerts.
Result
None.
Remarks
The FunctionalSpec
object has matching Id and Name properties, for example, FolderId
and FolderName
. To set them, specify the value only for the Id property. The corresponding Name property will be set automatically.
Example
Sample Code
C#
string login = "[email protected]";
string password = "p@ssword";
int projId = 10372;
// Specifying the requirement ID to be updated
int Id = 12;
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;
// Preparing the requirement
FunctionalSpec requirement = new FunctionalSpec();
// Loading all existing data of the requirement
requirement = service.FunctionalSpecs_Load(authData, Id);
// Specifying new properties of the requirement
requirement.StatusCode = "Active";
requirement.AssigneeUserId = 24667;
// Updating the requirement
service.FunctionalSpecs_Update(authData, requirement, "");
Java
String login = "[email protected]";
String password = "p@ssword";
int projId = 10372;
// Specifying the requirement ID to be updated
int Id = 12;
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);
// Preparing the functionalSpec object
FunctionalSpec requirement = new FunctionalSpec();
// Loading all the existing data of the requirement
requirement = service.functionalSpecsLoad(authData, Id);
// Specifying new properties of the requirement
requirement.setStatusCode("Active");
requirement.setAssignedToName("Fry, Alex");
// Updating the requirement
service.functionalSpecsUpdate(authData, requirement, "");
Sample Request XML
POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 1143 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/FunctionalSpecs_Update"
<?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>
<FunctionalSpecs_Update xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<FunctionalSpec>
<FunctSpecId>3</FunctSpecId>
<Title>API-0014 - Add Visual Studio Support</Title>
<StatusCode>ActiveClosed</StatusCode>
<EstHrs>20.000</EstHrs>
<EstFinish>2014-07-14T17:00:00</EstFinish>
<OwnerUserId>25315</OwnerUserId>
<AssigneeUserId>27572</AssigneeUserId>
<EstStart>2014-07-12T15:00:00</EstStart>
<ActStart>2014-07-13T12:15:00</ActStart>
<PctComplete>100</PctComplete>
<EstHrsRemaining>0.000</EstHrsRemaining>
<AssignedToName>Davis, Eugeny</AssignedToName>
<DateCreated>2014-07-05T04:58:35.747</DateCreated>
<FunctionalSpecId>3</FunctionalSpecId>
<OwnerName>Doe, John</OwnerName>
<ProjId>10372</ProjId>
</FunctionalSpec>
<SendEmailAlert></SendEmailAlert>
</FunctionalSpecs_Update>
</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: 1151 {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>
<FunctionalSpecs_Update xmlns="http://www.pragmaticsw.com/">
<AuthenticationData>
<AppCode>agSP</AppCode>
<DeptId>7154</DeptId>
<ProjId>1032</ProjId>
<UserId>25315</UserId>
<PassCode>p@ssword</PassCode>
</AuthenticationData>
<FunctionalSpec>
<FunctSpecId>3</FunctSpecId>
<Title>API-0014 - Add Visual Studio Support</Title>
<StatusCode>ActiveClosed</StatusCode>
<EstHrs>20.000</EstHrs>
<EstFinish>2014-07-14T17:00:00</EstFinish>
<OwnerUserId>25315</OwnerUserId>
<AssigneeUserId>27572</AssigneeUserId>
<EstStart>2014-07-12T15:00:00</EstStart>
<ActStart>2014-07-13T12:15:00</ActStart>
<PctComplete>100</PctComplete>
<EstHrsRemaining>0.000</EstHrsRemaining>
<AssignedToName>Davis, Eugeny</AssignedToName>
<DateCreated>2014-07-05T04:58:35.747</DateCreated>
<FunctionalSpecId>3</FunctionalSpecId>
<OwnerName>Doe, John</OwnerName>
<ProjId>10372</ProjId>
</FunctionalSpec>
<SendEmailAlert></SendEmailAlert>
</FunctionalSpecs_Update>
</soap12:Body>
</soap12:Envelope>
Sample Response XML
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 316 {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>
<FunctionalSpecs_UpdateResponse xmlns="http://www.pragmaticsw.com/" />
</soap:Body>
</soap:Envelope>
SOAP 1.2
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 326 {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>
<FunctionalSpecs_UpdateResponse xmlns="http://www.pragmaticsw.com/" />
</soap12:Body>
</soap12:Envelope>
See Also
FunctionalSpecs_Add
FunctionalSpecs_Delete
FunctionalSpecs_Load
FunctionalSpecs_LoadByCriteria
Requirements Operations
SOAP API Reference