Skip to content

Show task age badge on cards older than 14 days 📅 #462

Description

@anoopcodehack

Show task age badge on cards older than 14 days 📅

File: client/src/components/Board/TaskCard.jsx

Old tasks sitting in backlog forever
with no visual indicator 💀 fr!!

Fix:
const getTaskAge = (createdAt) => {
const days = Math.floor(
(Date.now() - new Date(createdAt)) / 86400000
)
return days
}

const age = getTaskAge(task.createdAt)

{age >= 14 && task.status !== 'done' && (

🕰️ {age}d old

)}

~10 lines! createdAt exists in MongoDB ✅
No backend needed 🎯

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions