changeProjektphase hinzugefügt

This commit is contained in:
Karl Burkhart
2011-12-07 12:31:37 +00:00
parent 10ea80e5df
commit 6aeb959cac
2 changed files with 49 additions and 0 deletions
+26
View File
@@ -38,6 +38,7 @@ $SOAPServer->addFunction("saveProjekttask");
$SOAPServer->addFunction("deleteProjekttask");
$SOAPServer->addFunction("saveMantis");
$SOAPServer->addFunction("setErledigt");
$SOAPServer->addFunction("changeProjektPhase");
$SOAPServer->handle();
// WSDL Chache auf aus
@@ -97,6 +98,31 @@ function saveProjekttask($username, $passwort, $task)
return new SoapFault("Server", $projekttask->errormsg);
}
/**
* Hängt einen Task auf eine Übergebene ProjektphasenID
*/
function changeProjektPhase($username, $passwort, $projekttask_id, $projektphase_id)
{
if(!$user = check_user($username, $passwort))
return new SoapFault("Server", "Invalid Credentials");
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($user);
if(!$rechte->isBerechtigt('planner', null, 'sui'))
return new SoapFault("Server", "Sie haben keine Berechtigung zum Umhängen von Tasks");
$projekttask = new projekttask();
$projekttask->load($projekttask_id);
$projekttask->new = false;
$projekttask->projektphase_id = $projektphase_id;
if($projekttask->save(false))
return $projekttask->projekttask_id;
else
return new SoapFault("Server", $projekttask->errormsg);
}
/**
*
* Löscht den Task mit der vom Webservice übergebenen ID
+23
View File
@@ -55,6 +55,16 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:part name="message" type="xsd:string"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeProjektPhaseRequest">
<wsdl:part name="username" type="xsd:string" minOccurs="0"></wsdl:part>
<wsdl:part name="passwort" type="xsd:string" minOccurs="0"></wsdl:part>
<wsdl:part name="projekttask_id" type="xsd:string"></wsdl:part>
<wsdl:part name="projektphase_id" type="xsd:string"></wsdl:part>
</wsdl:message>
<wsdl:message name="changeProjektPhaseResponse">
<wsdl:part name="message" type="xsd:string"></wsdl:part>
</wsdl:message>
<wsdl:message name="SaveMantisRequest">
<wsdl:part name="projekttask_id" type="xsd:string"></wsdl:part>
<wsdl:part name="mantis_id" type="xsd:string"></wsdl:part>
@@ -111,6 +121,10 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:input message="tns:setErledigtRequest"></wsdl:input>
<wsdl:output message="tns:setErledigtResponse"></wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeProjektPhase">
<wsdl:input message="tns:changeProjektPhaseRequest"></wsdl:input>
<wsdl:output message="tns:changeProjektPhaseResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ConfigBinding" type="tns:ConfigPortType">
@@ -151,6 +165,15 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="changeProjektPhase">
<soap:operation soapAction="<?php echo APP_ROOT."soap/changeProjektPhase";?>" />
<wsdl:input>
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</wsdl:input>
<wsdl:output>
<soap:body use="encoded" namespace="http://localhost/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Projekttask">