❌Reject task
As a developer i want to be able to reject a task.
Input parameters
How to call from app
HTTP request to: /reject-task/TASKID
Logic
The frontend (app.tasksource.io) calls the API (/reject-task/TASK-ID)
get developer document in DB (users/uid)remove theProjectIdto thethirdPartyProjectsarrayThen remove thetaskIdto theassignedTasksarray
Remove developer from project members (projects/{projectId}/members) array if no other task with same projectId found
the backend should now set a field in the task document (acceptedByDeveloper = false) as well as , rejectionReason: rejectionReason
Send First Email:
to_email_adress = email_of_assigned_person
template_name = "tasks-rejected-by-developer->developer"
data = {taskData: taskData, taskId: taskId, rejectionReason: rejectionReason}
Send Second Email:
to_email_adress = email_of_task_creator
template_name = "tasks-rejected-by-developer->creator"
data = {taskData: taskData, taskId: taskId, rejectionReason: rejectionReason}
5. If task was assogned to pool (assignToPool = true) call api endpoint submit task
6. if assignToPool = false set task to draft status again.
Last updated