RealDevSquad / RealDevSquad/website-backend

Fix bug in task update logic - computes isNewProgress0 incorrectly

Open
#2,438 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

controllers/tasks.js computes isNewProgress0 incorrectly because !!req.body.percentCompleted !== undefined is always true.

Replace with req.body.percentCompleted !== undefined.

File & line: controllers/tasks.js line 378

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open controllers/tasks.js and inspect the task update logic around line 378, focusing on how percentCompleted is checked. Confirm the condition distinguishes an undefined value from other values, then verify the update behavior for requests with and without percentCompleted.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.