Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Hi,
I am using API to manage activities.
I am getting this message in response when deleting activity from api.
Please note : This Activity have assigned with resource (developer).
{"identifier":"id", "items":[{"apiResult":"CONFIRM", "apiResultMessage":"This action requires confirmation ", "id":"2809", "reference":"-A&D-519", "idProject":"106", "nameProject":"Skill Catalog Project - PHP", "idActivityType":"108", "nameActivityType":"Analysis & Design", "name":"test", "isBilleble":"0", "externalReference":"", "creationDate":"2016-09-10", "idUser":"1", "nameUser":"Admin", "idContact":"", "nameContact":"", "originType":"", "originId":"", "description":"", "idActivity":"", "nameActivity":"", "idStatus":"17", "nameStatus":"New", "idResource":"", "nameResource":"", "handled":"0", "handledDate":"", "done":"0", "doneDate":"", "idle":"0", "idleDate":"", "cancelled":"0", "idTargetVersion":"", "nameTargetVersion":"", "result":"", "initialStartDate":"", "validatedStartDate":"", "plannedStartDate":"", "realStartDate":"", "priority":"500", "initialEndDate":"", "validatedEndDate":"", "plannedEndDate":"", "realEndDate":"", "idActivityPlanningMode":"1", "nameActivityPlanningMode":"as soon as possible", "initialDuration":"", "validatedDuration":"", "plannedDuration":"", "realDuration":"", "wbs":"25.21.11.26", "validatedWork":"0.00000", "assignedWork":"0.00000", "plannedWork":"0.00000", "realWork":"0.00000", "leftWork":"0.00000", "progress":"0", "expectedProgress":"0", "workElementEstimatedWork":"", "workElementRealWork":"", "workElementLeftWork":"", "workElementCount":"", "validatedCost":"", "assignedCost":"0.00", "plannedCost":"0.00", "realCost":"0.00", "leftCost":"0.00", "idTechnology":"", "nameTechnology":""}] }
Message is a confirmation request (the operation you request needs confirmation).
So you need to send request once again with extra parameter:
confirmed=true
I am doing like this
2809, "confirmed" => "true" ];
$data = json_encode($data);
$fullUrl = 'http://localhost/projeqtor/api/activity';
$data = AesCtr::encrypt($data, '2b0a68add166d5d85338f0de4c6b8a2f', 256);
$curl = curl_init($fullUrl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$curl_response = curl_exec($curl);
echo $curl_response;
still getting the same response.
OK,
this issue requires a patch.
in /api/index.php; add line before 261, this way :
SqlElement::setDeleteConfirmed();
$result=$obj->delete();
Patch will be deployed on V5.5.2
Thanks.