|
|
@@ -25,7 +25,8 @@ Core::addScript("public/js/app-project.js");
|
|
|
Core::addScript("public/js/markerclusterer.js");
|
|
|
|
|
|
$action = http::value("action", "string");
|
|
|
-$target_project_id = http::value("target_project_id");
|
|
|
+$target_project_id = http::value("target_project_id", "int");
|
|
|
+$target_user_id = http::value("target_user_id", "int");
|
|
|
$test_ids_json = http::value("test_ids_json", "string");
|
|
|
|
|
|
if($action) {
|
|
|
@@ -81,6 +82,22 @@ if($action) {
|
|
|
Core::addAlert("success", __("Tests moved successfully."));
|
|
|
break;
|
|
|
|
|
|
+ case "assign":
|
|
|
+ $tester = User::get($target_user_id);
|
|
|
+ if(!$tester) {
|
|
|
+ throw new RuntimeException("Target user not found.");
|
|
|
+ }
|
|
|
+
|
|
|
+ $tests = Test::query(["id" => $test_ids, "project_id" => $id, "status" => [
|
|
|
+ Test::STATUS_UNASSIGNED,
|
|
|
+ Test::STATUS_ASSIGNED,
|
|
|
+ ]]);
|
|
|
+ foreach($tests as $test) {
|
|
|
+ $test->assignTester($tester);
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+
|
|
|
case "unassign":
|
|
|
$tests = Test::query(["id" => $test_ids, "project_id" => $id, "status" => Test::STATUS_ASSIGNED]);
|
|
|
foreach($tests as $test) {
|