Repository navigation
Sprint 7 M7: transfer ownership, overdue on project dashboard, D7 wee… - #68
Merged
Merged
Conversation
…kly goal Owner can make another member the Owner and becomes Admin in one atomic update (exactly one Owner; concurrent transfers: one wins), after which leaving works; logged as member.ownership_transferred, live role update for both. Project dashboard lists overdue tasks (FR-15) with project health's rule, most overdue first. D7: Dashboard shows the real weekly goal (my tasks due Mon-Sun, done/total) instead of the fixed 4 of 5. Tests: backend 1055/1055, frontend 677/677.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
SumitGauswami
approved these changes
Nov 20, 2026
SumitGauswami
left a comment
Collaborator
There was a problem hiding this comment.
Great work on Sprint 7 M7! The ownership transfer, overdue task tracking, and dynamic weekly goal features look well structured. Nice work on adding test coverage too!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Sprint 7 · M7: transfer ownership, overdue tasks on the project dashboard (FR-15), and D7 (real weekly goal on the Dashboard).
Changes
Transfer ownership
POST /api/projects/:id/transfer-ownership{ userId, confirm: true }. One atomic MongoDB update swaps both roles and only matches while the caller is still Owner → always exactly one Owner; two simultaneous transfers: one wins, the other gets 409.confirm/ for yourself / bad IDs, 404 for a non-member.member.ownership_transferred; both people's open project pages getproject:role-changedand switch role live.Overdue on the project dashboard (FR-15)
overdueFilter/daysOverdue), so both views agree and nothing is both overdue and "due in the next 7 days". Visible to every member role.GET /api/projects/:id/dashboardaddsoverdue: { total, limit, tasks }; an older server without it shows no overdue section.D7: real weekly goal
GET /api/tasks/statsaddsweekGoal: { from, to, total, done, percent }.Shared files touched
routes/projects.js(new endpoint),lib/permissions.js,models/Activity.js(new type),TeamPanel.jsx,ProjectPage.jsx,DashboardPage.jsx,ProjectDashboard.jsx,api.js,roles.js,activityDisplay.js,styles.css, README (new Sprint 7 table with the M7 rows: if another Sprint 7 PR also adds the table, keep both sets of rows).backend/test/myTasks.test.jsupdated: it compared/statsexactly and the answer now also hasweekGoal.How to test it
Checklist
main(f719856, after feat(sprint7): M3 comments and replies on feed posts #67)npm testpasses inbackend/(1055/1055) andfrontend/(677/677)npm run buildpasses infrontend/npm run lintshows no errorstransferOwnership,transferRules,projectDashboardOverdue,weeklyGoal; frontendTeamPanel.transfer,ProjectDashboard.overdue,weekGoal, new cases inDashboardPage.test).env,node_modulesordistin the diff