Skip to content

Diya 🔥 fix(merge): Dev to Main 2.99#2180

Merged
one-community merged 1 commit intodevelopmentfrom
Diya_Fix_DevtoMain2.99
Apr 23, 2026
Merged

Diya 🔥 fix(merge): Dev to Main 2.99#2180
one-community merged 1 commit intodevelopmentfrom
Diya_Fix_DevtoMain2.99

Conversation

@DiyaWadhwani
Copy link
Copy Markdown
Contributor

Description

Fixes SonarQube Quality Gate failures blocking the Backend Release 2.99 (dev → main merge, PR #2179).

Fixes: SonarQube Quality Gate — Dev to Main Release 2.99

Related PRs (if any):

This backend PR is related to the main release PR #2179 (Backend Release to Main [2.99]).

Main changes explained:

  • Updated src/controllers/jobsController.test.js to remove .then from the mock query chain object — SonarQube flagged adding then to a plain object as a reliability bug, and also added .lean() call in resetJobsFilters in jobsController.js to fix the failing test
  • Updated src/controllers/jobsController.js to add .lean() to the resetJobsFilters query chain which was missing it
  • Updated src/controllers/bmdashboard/bmConsumableController.js to stop logging user-controlled error data — replaced console.log('error: ', error) with a safe static message to fix the security vulnerability
  • Created src/scripts/scriptUtil.js as a shared utility exporting a reusable prompt function
  • Updated src/scripts/resetUserCatalog.js and src/scripts/resetUserStateSelections.js to import prompt from scriptUtil.js and remove the duplicated local prompt function — reduces code duplication from 62.3% to 0% on these files

@one-community one-community changed the title Diya fix(merge): Dev to Main 2.99 Diya 🔥 fix(merge): Dev to Main 2.99 Apr 23, 2026
@one-community one-community merged commit dc2fe2b into development Apr 23, 2026
2 checks passed
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

2 participants