Skip to content

Backend Release to Main [3.11]#2258

Merged
one-community merged 35 commits into
mainfrom
development
Jun 21, 2026
Merged

Backend Release to Main [3.11]#2258
one-community merged 35 commits into
mainfrom
development

Conversation

@one-community

@one-community one-community commented Jun 21, 2026

Copy link
Copy Markdown
Member

6/20 Includes: Saurabh taking over for Vamsidhar - fix: calendar dark mode and issue chart visibility 4653+#1982, Rithika taking over for Aditya-feat: Add Side-by-Side Comparison Mode for Actual vs. Planned Expenditure Charts 4898+#2073, Diya 🔥 fix(resendBS): Fixed Manual Resend Blue Square Emails #2250, Anthony/feature-reorder-warning-trackers 5146+#2167, Diya 🔥 fix(multiple): Fixed Weekly Summary Cron + BS History #2252, Mahitha - 🔥 fix(userProfile): update email validation in controller #2251,

vamsidharpanithi and others added 30 commits December 31, 2025 18:25
…issue for user warnings being lost when the tracker was renamed
Expose expenditure endpoints under /api/bm for Financials Tracking
(Actual vs Planned pie charts):

- GET /api/bm/expenditure/projects — list project IDs with expenditure data
- GET /api/bm/expenditure/:projectId/pie — actual and planned by category

Register bmExpenditureRouter in the BM dashboard block alongside
bmActualVsPlannedCostRouter.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Validate projectId with mongoose.Types.ObjectId.isValid() before DB
  access; return 400 for invalid IDs to avoid unhandled throws.
- Use new mongoose.Types.ObjectId(projectId) only after validation.
- Replace console.error with logger.logException including transaction
  name and projectId (for pie handler) as extra data.
- Rename unused req to _req in getProjectIdsWithExpenditure.
- Use explicit return on all branches to prevent fall-through.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add expenditureController.test.js with full coverage:

getProjectIdsWithExpenditure:
- 200 with array of project IDs on success
- 200 with empty array when no records exist
- 500 and logger.logException on DB error

getProjectExpensesPie:
- 400 for invalid projectId (non-hex, short) without calling aggregate
- 200 with { actual, planned } shape on success
- 200 with { actual: [], planned: [] } when no matching records
- 500 and logger.logException with projectId on DB error

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover the new updateEquipmentById handler and validation in
bmEquipmentController:

- 400 for invalid equipment ID or project ID
- 400 for invalid enum values (purchaseStatus, currentUsage, condition)
- 400 when no valid fields provided to update
- 200 with updated equipment on success
- 404 when equipment not found after update
- 500 on updateOne error

Add updateOne to the mock BuildingEquipment model.

Co-authored-by: Cursor <cursoragent@cursor.com>
…controller

Add laborHoursDistributionController.test.js for getLaborHoursDistribution:

- 403 when user lacks getWeeklySummaries permission
- 400 for missing or invalid start_date/end_date (format, calendar date, range)
- 200 with cached response on cache hit
- 200 with total_hours and distribution (with percentages) on success
- 200 with empty distribution when no data
- Optional category filter in cache key and aggregation pipeline
- 500 and logger.logException on aggregate error

Mocks: LaborHours, logger, nodeCache, hasPermission.
Co-authored-by: Cursor <cursoragent@cursor.com>
…s with it.each

Replace 6 near-duplicate it() blocks (validation tests) with a single it.each()
data table of [description, queryOverrides, expectedError]. Reduces file from
241 to 174 lines while preserving all 12 tests and identical assertions.
Test names unchanged (e.g. 'returns 400 when start_date format is invalid').

Made-with: Cursor
…chart-all-issues-visible

Saurabh taking over Vamsidhar - fix: show all issues from selected projects without limit
…-by-Side-Comparison-Mode-for-Actual-vs-Planned-Expenditure-Charts

Rithika taking over for Aditya-feat: Side-by-Side Comparison Mode for Actual vs. Planned Expenditure Charts
Bumps [joi](https://github.com/hapijs/joi) from 18.0.2 to 18.2.1.
- [Commits](hapijs/joi@v18.0.2...v18.2.1)

---
updated-dependencies:
- dependency-name: joi
  dependency-version: 18.2.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](raszi/node-tmp@v0.2.5...v0.2.7)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…der-warning-trackers

Anthony - feat: added values to support reordering warning trackers, and fixed …
one-community and others added 5 commits June 16, 2026 20:02
…lBSEmails

Diya 🔥 fix(resendBS): Fixed Manual Resend Blue Square Emails
…ryCron_BSHistory

Diya 🔥 fix(multiple): Fixed Weekly Summary Cron + BS History
…x-email-update

Mahitha - 🔥 fix(userProfile): update email validation in controller
@one-community one-community merged commit 1a85712 into main Jun 21, 2026
7 of 10 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants