RealDevSquad / RealDevSquad/website-backend

chore: migrate task status from COMPLETED to DONE across DB and controllers

Open
#2,404 0 comments 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

🐛 Issue

The task status in the current system uses "COMPLETED" in both the database and the controller responses. We need to update this to use "DONE" instead, in order to align with updated terminology and improve clarity.

This change will impact:

  • The database entries
  • The controller logic and responses

✅ Expected Behavior

Task statuses in all relevant locations (DB and controller responses) should use "DONE" instead of "COMPLETED".


❌ Current Behavior

Task statuses in all relevant locations (DB and controller responses) currently use "COMPLETED".


🛠️ Description / Plan

We need to remove the usage of "COMPLETED" from the system in three steps:

  1. Controller Wrapper Update

    • Modify all relevant controllers to check for task status "COMPLETED" and return "DONE" instead.
    • This acts as a temporary wrapper until the migration is complete.
  2. Database Migration Script

    • Write and run a script to update all records in the database where the task status is "COMPLETED", and change them to "DONE".
  3. Final Controller Update

    • Once the DB has no more "COMPLETED" entries, remove the wrapper logic from step 1.
    • Ensure controllers directly return the actual value from the DB, which will now be "DONE".

📌 Summary of Current State
  • "COMPLETED" exists in the database.
  • Controllers return "COMPLETED" directly.
  • No logic currently exists to map "COMPLETED" to "DONE".

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

Start by locating the relevant controllers and the database records or migration entry point that use "COMPLETED". Update the controller behavior, migrate existing records to "DONE", then remove any temporary mapping once the database no longer contains "COMPLETED"; done means all relevant responses and records use "DONE".

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, backend, database
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.