Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 400 when trying to assign the user for a task #179

Closed
spwin opened this issue Mar 6, 2022 · 5 comments · Fixed by #180
Closed

Error 400 when trying to assign the user for a task #179

spwin opened this issue Mar 6, 2022 · 5 comments · Fixed by #180

Comments

@spwin
Copy link
Contributor

spwin commented Mar 6, 2022

There is a bug when assigning a user to the task. Endpoint /tasks/task/task-assigned-picker returns error 400 with message about missing id.

@spwin
Copy link
Contributor Author

spwin commented Mar 6, 2022

The following change fixes it:

diff --git a/controllers/TaskController.php b/controllers/TaskController.php
index d1e86fb..58e6013 100644
--- a/controllers/TaskController.php
+++ b/controllers/TaskController.php
@@ -107,7 +107,7 @@ class TaskController extends AbstractTaskController
         return $this->asJson(['success' => $task->state->revert($status)]);
     }
 
-    public function actionTaskAssignedPicker($id = null, $keyword = '')
+    public function actionTaskAssignedPicker($keyword = '')
     {
         $query = $this->getSpace()->getMembershipUser();
 
@@ -118,7 +118,7 @@ class TaskController extends AbstractTaskController
         ]));
     }
 
-    public function actionTaskResponsiblePicker($id = null, $keyword = '')
+    public function actionTaskResponsiblePicker($keyword = '')
     {
         $query = $this->getSpace()->getMembershipUser();

Can you guys marge the fix? Thanks

@luke-
Copy link
Contributor

luke- commented Mar 6, 2022

@spwin Thanks for the fix. Can you please provide steps to reproduce?

@luke- luke- linked a pull request Mar 6, 2022 that will close this issue
@spwin
Copy link
Contributor Author

spwin commented Mar 7, 2022

It's happening when creating a new task in a Space and trying to assign a user

Screenshot from 2022-03-07 21-56-55

@luke-
Copy link
Contributor

luke- commented Mar 13, 2022

Hmm, cannot reproduce this, but it's clearly a bug.
image

Thanks!

@luke- luke- closed this as completed Mar 13, 2022
@spwin
Copy link
Contributor Author

spwin commented Mar 13, 2022

Hmm, cannot reproduce this, but it's clearly a bug. image

Thanks!

It’s only happening when running on localhost for me, maybe the validation is disabled on prod or php versions are different.

Thanks Luke!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants