Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions controllers/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,11 @@ const updateTaskStatus = async (req, res, next) => {
const isCurrentTaskStatusBlock = task.taskData.status === TASK_STATUS.BLOCKED;
const isNewTaskStatusInProgress = status === TASK_STATUS.IN_PROGRESS;
const isNewTaskStatusBlock = status === TASK_STATUS.BLOCKED;
const isCurrProgress100 = parseInt(task.taskData.percentCompleted || 0) === 100;
const isCurrProgress0 = parseInt(task.taskData.percentCompleted || 0) === 0;
const isNewProgress100 = !!req.body.percentCompleted && parseInt(req.body.percentCompleted) === 100;
const isNewProgress0 = !!req.body.percentCompleted !== undefined && parseInt(req.body.percentCompleted) === 0;
const isCurrProgress100 = Number.parseInt(task.taskData.percentCompleted || 0) === 100;
const isCurrProgress0 = Number.parseInt(task.taskData.percentCompleted || 0) === 0;
const isNewProgress100 = !!req.body.percentCompleted && Number.parseInt(req.body.percentCompleted) === 100;
const isNewProgress0 =
req.body.percentCompleted !== undefined && Number.parseInt(req.body.percentCompleted) === 0;

if (
!isCurrProgress100 &&
Expand Down
Loading