Vamsidhar - fix: add all-logs endpoint and fix member lookup in aggregation pipeline#1994
Conversation
sundarmachani
left a comment
There was a problem hiding this comment.
I’ve reviewed this backend PR and tested the changes in coordination with the related frontend updates. Everything looks good and works as expected.
• Time log data is returned correctly and aligns with the frontend Time Log Summary component.
• Member details (names, roles, timestamps, durations) are accurate and consistent.
• No issues observed with timer state handling or completed time log records.
• Verified the behavior using before and after comparisons, and the fixes are clearly reflected.
The backend changes integrate well with the frontend and resolve the reported issues effectively.
sayali-2308
left a comment
There was a problem hiding this comment.
- Branch: Vamsidhar-fix/time-log-visibility-backend
- Frontend: #4685
- Date: January 29, 2026
What Was Tested:
- Backend API endpoint
/timelogger/:projectId/logsworks correctly - Member lookup in aggregation pipeline functions properly
- Returns complete time logs with correct member information
- Frontend-backend integration seamless
Test Results:
API endpoint responds correctly
Member data properly aggregated
No "Unknown User" issues
Database queries optimized
Backend fixes support frontend Time Log Summary feature correctly.
shashank-madan
left a comment
There was a problem hiding this comment.
Looks good to me. Added evidence in frontend PR
Vamsidhar says: Yes but I don't see that when I tested it now

Description
This PR fixes the Time Log Visibility issue on the Member Group Check-In page by adding a new endpoint to fetch all project time logs and fixing the member lookup in the aggregation pipeline. Previously, the frontend could not fetch all time logs for a project, and member information was not being correctly joined, resulting in "Unknown User" being displayed.
Fixes # (bug list priority: Medium) - Time Log Visibility Issue on Member Group Check-In Page
Related PRs (if any):
This backend PR is related to the frontend PR #4685.
To test this backend PR you need to checkout the frontend PR #4685.
Main changes explained:
src/routes/bmdashboard/bmTimeLoggerRouter.js:/timelogger/:projectId/logsto fetch all time logs for a project/logs) comes before the member-specific route (/:memberId/logs) to prevent route matching conflicts that caused 404 errorssrc/controllers/bmdashboard/bmTimeLoggerController.js:getProjectTimeLogsfunction to handle both all-logs and member-specific queriesmemberfield to ObjectId (handles both string and ObjectId types)'userprofiles'to'userProfiles'to match the actual MongoDB collection nameprojectIdandmemberIdin match stagestartTimeLogto ensure proper MongoDB queries when creating new time logsupdatedAtfield to the projection for proper sorting of completed logsHow to test:
Vamsidhar-fix/time-log-visibility-backendbranchnpm installto ensure dependencies are up to datenpm start00:00:00(not from old values)00:00:00)Screenshots or videos of changes:
N/A (Backend API changes)
