Cherry-pick health and version API enhancements to release-3.6.1 - #124
Merged
Merged
Conversation
…ove shared-map race
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
vanitha1822
approved these changes
Mar 12, 2026
drtechie
added a commit
that referenced
this pull request
Mar 19, 2026
* Bulk registration * Bulk registration * Bulk registration * add userName and password in Bulk registration * add userName and password in Bulk registration * remove unwanted line * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * Httpheader content disposition changed * Coderabbitai comments adrressed * Httpheader content disposition changed (#100) * Httpheader content disposition changed * Coderabbitai comments adrressed * Compile error resolved * fix code * Main branch changes missed (#102) * Feature/signaturerelease (#103) * Main branch changes missed * Signature file changed * Feature/signaturerelease (#104) * Main branch changes missed * Signature file changed * Created new endpoint for Active and DeActive Employee Signature * coderabbit comments addressed * fix:casesheet signature * fix:pom file change * API changes in Signature enhancement for Casesheet (#107) * fix:casesheet signature * fix:pom file change * fix: pom version * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix: amm-1927 send headers only if the request is from the allowed origin * fix: amm-1927 coderabbit fixes * Update regex handling for localhost URLs * Enhance regex pattern for URL matching * Cherry-pick health and version API enhancements to release-3.6.1 (#124) * feat(health,version): add health and version endponts * fix(health): add constant and remove duplicates * fix(health): avoid permanent DEGRADED from historical deadlocks * fix(health): Removed the unnecessary boolean literal * fix(health): Fixed the broken lock-wait detection * fix(health): avoid blocking DB I/O under write lock and restore interrupt flag * fix(health): add cancelFutures in healthservice * fix(health): close basic DB connection before advanced checks and remove shared-map race * fix: merge 3.6.1 to main --------- Co-authored-by: Saurav Mishra <saurav.mishra@bizbrolly.com> Co-authored-by: Sushant <77480199+sushant-bizbrolly@users.noreply.github.com> Co-authored-by: Saurav Mishra <80103738+SauravBizbRolly@users.noreply.github.com> Co-authored-by: Mithun James <drtechie@users.noreply.github.com> Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> Co-authored-by: ravishanigarapu <133210792+ravishanigarapu@users.noreply.github.com> Co-authored-by: vishwab1 <vishwanath@navadhiti.com> Co-authored-by: Vishwanath Balkur <118195001+vishwab1@users.noreply.github.com> Co-authored-by: SnehaRH <77656297+snehar-nd@users.noreply.github.com> Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com> Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com> Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com>
vanitha1822
added a commit
that referenced
this pull request
May 21, 2026
* Cherry-pick health and version API enhancements to release-3.6.1 (#124) * feat(health,version): add health and version endponts * fix(health): add constant and remove duplicates * fix(health): avoid permanent DEGRADED from historical deadlocks * fix(health): Removed the unnecessary boolean literal * fix(health): Fixed the broken lock-wait detection * fix(health): avoid blocking DB I/O under write lock and restore interrupt flag * fix(health): add cancelFutures in healthservice * fix(health): close basic DB connection before advanced checks and remove shared-map race * feat: expose account lock state in SearchEmployee4 (#129) Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> * Fix the reset password issue (#131) * fix: reset password * fix: build issue * fix: update the url * fix: update config properties * fix: initialize constructor --------- Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com>
vishwab1
added a commit
that referenced
this pull request
May 22, 2026
* Bulk registration * Bulk registration * Bulk registration * add userName and password in Bulk registration * add userName and password in Bulk registration * remove unwanted line * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * Httpheader content disposition changed * Coderabbitai comments adrressed * Httpheader content disposition changed (#100) * Httpheader content disposition changed * Coderabbitai comments adrressed * Compile error resolved * fix code * Main branch changes missed (#102) * Feature/signaturerelease (#103) * Main branch changes missed * Signature file changed * Feature/signaturerelease (#104) * Main branch changes missed * Signature file changed * Created new endpoint for Active and DeActive Employee Signature * coderabbit comments addressed * Update pom.xml * Cherry-pick the commits related to 3.5.0 form 3.6.0 (#106) * Compile error resolved * fix: cherry pic the #101 pr * fix: cherry pic the #101 pr * Main branch changes missed * fix: cherry pic the #103 pr * fix: cherry pic the #104 pr * fix: cherry pic the #104 pr * fix: cherry pick the #104 pr * fix code rabbit comments --------- Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> * fix:casesheet signature * fix:pom file change * API changes in Signature enhancement for Casesheet (#107) * fix:casesheet signature * fix:pom file change * fix: pom version * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix: amm-1927 send headers only if the request is from the allowed origin * fix: amm-1927 coderabbit fixes * Update regex handling for localhost URLs * Enhance regex pattern for URL matching * fix code * fix code * fix vulnerabilitie code * fix security hotspots * fixed conflicts * Add facility hierarchy creation with village and parent-child mapping (#121) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: pom version * fix: facility hierarchy and facility type management (#125) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * feat:added work location * feat:added work location * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: ui chnges * fix: pom version * fix: corrections * fix: facilty hierachy * fix: facility heirachy * fix: remove logs folder from repository Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add logs/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Facility hierarchy inventory mapping and store field management (#128) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * feat:added work location * feat:added work location * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: ui chnges * fix: pom version * fix: corrections * fix: facilty hierachy * fix: facility heirachy * fix: item facility mapping and store updates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: fixed inventory flow --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * merge 3.6.2 to release 3.8.1 (#132) * Cherry-pick health and version API enhancements to release-3.6.1 (#124) * feat(health,version): add health and version endponts * fix(health): add constant and remove duplicates * fix(health): avoid permanent DEGRADED from historical deadlocks * fix(health): Removed the unnecessary boolean literal * fix(health): Fixed the broken lock-wait detection * fix(health): avoid blocking DB I/O under write lock and restore interrupt flag * fix(health): add cancelFutures in healthservice * fix(health): close basic DB connection before advanced checks and remove shared-map race * feat: expose account lock state in SearchEmployee4 (#129) Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> * Fix the reset password issue (#131) * fix: reset password * fix: build issue * fix: update the url * fix: update config properties * fix: initialize constructor --------- Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com> --------- Co-authored-by: Saurav Mishra <saurav.mishra@bizbrolly.com> Co-authored-by: Sushant <77480199+sushant-bizbrolly@users.noreply.github.com> Co-authored-by: Saurav Mishra <80103738+SauravBizbRolly@users.noreply.github.com> Co-authored-by: Mithun James <drtechie@users.noreply.github.com> Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> Co-authored-by: ravishanigarapu <133210792+ravishanigarapu@users.noreply.github.com> Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com> Co-authored-by: SnehaRH <77656297+snehar-nd@users.noreply.github.com> Co-authored-by: vishwab1 <vishwanath@navadhiti.com> Co-authored-by: Vishwanath Balkur <118195001+vishwab1@users.noreply.github.com> Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com>
vishwab1
added a commit
that referenced
this pull request
Jul 28, 2026
* Bulk registration * Bulk registration * Bulk registration * add userName and password in Bulk registration * add userName and password in Bulk registration * remove unwanted line * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * Httpheader content disposition changed * Coderabbitai comments adrressed * Httpheader content disposition changed (#100) * Httpheader content disposition changed * Coderabbitai comments adrressed * Compile error resolved * fix code * Main branch changes missed (#102) * Feature/signaturerelease (#103) * Main branch changes missed * Signature file changed * Feature/signaturerelease (#104) * Main branch changes missed * Signature file changed * Created new endpoint for Active and DeActive Employee Signature * coderabbit comments addressed * Update pom.xml * Cherry-pick the commits related to 3.5.0 form 3.6.0 (#106) * Compile error resolved * fix: cherry pic the #101 pr * fix: cherry pic the #101 pr * Main branch changes missed * fix: cherry pic the #103 pr * fix: cherry pic the #104 pr * fix: cherry pic the #104 pr * fix: cherry pick the #104 pr * fix code rabbit comments --------- Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> * fix:casesheet signature * fix:pom file change * API changes in Signature enhancement for Casesheet (#107) * fix:casesheet signature * fix:pom file change * fix: pom version * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix: amm-1927 send headers only if the request is from the allowed origin * fix: amm-1927 coderabbit fixes * Update regex handling for localhost URLs * Enhance regex pattern for URL matching * fix code * fix code * fix vulnerabilitie code * fix security hotspots * fixed conflicts * Add facility hierarchy creation with village and parent-child mapping (#121) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: pom version * fix: facility hierarchy and facility type management (#125) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * feat:added work location * feat:added work location * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: ui chnges * fix: pom version * fix: corrections * fix: facilty hierachy * fix: facility heirachy * fix: remove logs folder from repository Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add logs/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Facility hierarchy inventory mapping and store field management (#128) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * feat:added work location * feat:added work location * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: ui chnges * fix: pom version * fix: corrections * fix: facilty hierachy * fix: facility heirachy * fix: item facility mapping and store updates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: fixed inventory flow --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * merge 3.6.2 to release 3.8.1 (#132) * Cherry-pick health and version API enhancements to release-3.6.1 (#124) * feat(health,version): add health and version endponts * fix(health): add constant and remove duplicates * fix(health): avoid permanent DEGRADED from historical deadlocks * fix(health): Removed the unnecessary boolean literal * fix(health): Fixed the broken lock-wait detection * fix(health): avoid blocking DB I/O under write lock and restore interrupt flag * fix(health): add cancelFutures in healthservice * fix(health): close basic DB connection before advanced checks and remove shared-map race * feat: expose account lock state in SearchEmployee4 (#129) Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> * Fix the reset password issue (#131) * fix: reset password * fix: build issue * fix: update the url * fix: update config properties * fix: initialize constructor --------- Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com> * fix: avoid ONLY_FULL_GROUP_BY violation in service lookup queries GROUP BY sm.serviceName selected non-aggregated, non-functionally-dependent columns (serviceID, isNational, statusID), which MySQL rejects under ONLY_FULL_GROUP_BY. Use SELECT DISTINCT instead since no aggregation is actually needed. * fix: bulk employee registration sets username from contact number instead of username field mUser.setUserName(employee.getContactNo()) was using the uploaded contact number as the login username, ignoring the actual UserName column in the bulk upload sheet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add Nikshay location master for Stop TB (TU/Facility) and complete duplicate-mapping fix - New isolated tables/entities: NikshayTU, NikshayFacility, NikshayVillageFacilityMapping, with read-only cascading lookup endpoints (NikshayLocationController) — no existing master tables touched. - M_UserServiceRoleMapping2 gains NikshayTUID/NikshayFacilityID (nullable, additive), persisted on both create and update save paths. - Complete the pre-existing softDeleteOldMappings fix by adding the missing service interface/impl methods the controller already called. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * feat(nikshay): replace AMRIT-village-matching with independent Nikshay hierarchy Nikshay's TU/Facility/Village hierarchy was previously matched against AMRIT's existing state/district/block/village masters by name. That approach left ~44% of villages unmatched in practice — partly from incomplete migration runs, partly from real staleness in AMRIT's own district/block data (e.g. Andhra Pradesh's 2022 district reorganization never propagated to m_districtblock/m_DistrictBranchMapping). Replace it with a fully self-contained Nikshay hierarchy (NikshayState, NikshayDistrict, NikshayTU, NikshayFacility, NikshayVillage) sourced directly from Nikshay's own imported data, with no AMRIT matching involved. Verified: 100% village coverage (325,426/325,426) vs the previous approach's ~56%. NikshayLocationController's endpoints keep the same paths and query params, now backed by the new tables. * fix(nikshay): store NikshayTUID/NikshayFacilityID as comma-joined String Admin-UI now saves one row per user-role with a comma-joined list of TU/Facility IDs instead of one row per TU x Facility combination, so the DB columns became TEXT. Update the entity and the request-body DTO (Previleges1097_3) to match — both were still Integer, which would have failed to deserialize a value like "12,45,78". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * feat(nikshay): add endpoint to read back saved TU/Facility/District for Edit v_userservicerolemapping (and its entity, what the Admin-UI's mapped-list screen reads) never exposes DistrictID/NikshayTUID/NikshayFacilityID, only legacy AMRIT WorkingDistrictID/WorkingDistrictName - always null for Stop TB, which never populates WorkingLocationID. Edit had no way to read back what was saved, so the TU/Facility/Village pickers always loaded empty. Reads m_userservicerolemapping directly by USRMappingID (reusing the existing EmployeeMasterRepo.findByUSRMappingID), same pattern as the FLW-API worklist-scope query - additive only, the shared view and every other service line reading it stay untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: add missing @transactional to softDeleteOldMappings InvalidDataAccessApiUsageException: "Executing an update/delete query" - a @Modifying UPDATE query with no surrounding transaction. Pre-existing bug in shared code (updateUserRoleMapping, used by every service line), dormant until now: Stop TB's Edit form was always invalid before today's fixes (Update button permanently disabled), so nothing ever reached this code path through Stop TB specifically. Same pattern the other @Modifying query in this file already follows correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix(nikshay): stop patching District with AMRIT lookup for Stop TB getMappedRole()'s null-district patch (getDirectStateDistrictByMappingIDs) joins the raw DistrictID column against AMRIT's m_district - correct for HWC/FLW, where that column genuinely holds an AMRIT district ID. Stop TB's DistrictID holds a Nikshay district ID instead, so the same join resolves to whatever AMRIT district happens to share that numeric ID by coincidence (e.g. Nikshay's Angul, ID 292, resolving to AMRIT's Uttar Kannad, also ID 292) - showing a completely wrong, unrelated district name in the mapped-users list. Skip the District patch for Stop TB rows specifically; State/Block patching is untouched since those values are genuinely AMRIT-sourced even for Stop TB. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Add Nikshay location master for Stop TB (TU/Facility) and complete duplicate-mapping fix - New isolated tables/entities: NikshayTU, NikshayFacility, NikshayVillageFacilityMapping, with read-only cascading lookup endpoints (NikshayLocationController) — no existing master tables touched. - M_UserServiceRoleMapping2 gains NikshayTUID/NikshayFacilityID (nullable, additive), persisted on both create and update save paths. - Complete the pre-existing softDeleteOldMappings fix by adding the missing service interface/impl methods the controller already called. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Saurav Mishra <saurav.mishra@bizbrolly.com> Co-authored-by: Sushant <77480199+sushant-bizbrolly@users.noreply.github.com> Co-authored-by: Saurav Mishra <80103738+SauravBizbRolly@users.noreply.github.com> Co-authored-by: Mithun James <drtechie@users.noreply.github.com> Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> Co-authored-by: ravishanigarapu <133210792+ravishanigarapu@users.noreply.github.com> Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com> Co-authored-by: SnehaRH <77656297+snehar-nd@users.noreply.github.com> Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com>
vishwab1
added a commit
that referenced
this pull request
Sep 22, 2026
* fix: amm-2368 item to shop mapping issue * Fix the Health Response Format (#138) * fix: health / version response format * chore: remove unused VersionService after /version rewrite VersionController now reads git.properties directly, so the old build-info- based VersionService is dead code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: force JSON response for /health endpoint Without an explicit produces type, Spring content-negotiated /health to XML when the browser's Accept header preferred it (Jackson XML is on the classpath), rendering the raw XML tree in-browser. Pin the endpoint to application/json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: pom version --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Vb/release 3.8.2 merge (#139) * Bulk registration * Bulk registration * Bulk registration * add userName and password in Bulk registration * add userName and password in Bulk registration * remove unwanted line * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * Httpheader content disposition changed * Coderabbitai comments adrressed * Httpheader content disposition changed (#100) * Httpheader content disposition changed * Coderabbitai comments adrressed * Compile error resolved * fix code * Main branch changes missed (#102) * Feature/signaturerelease (#103) * Main branch changes missed * Signature file changed * Feature/signaturerelease (#104) * Main branch changes missed * Signature file changed * Created new endpoint for Active and DeActive Employee Signature * coderabbit comments addressed * Update pom.xml * Cherry-pick the commits related to 3.5.0 form 3.6.0 (#106) * Compile error resolved * fix: cherry pic the #101 pr * fix: cherry pic the #101 pr * Main branch changes missed * fix: cherry pic the #103 pr * fix: cherry pic the #104 pr * fix: cherry pic the #104 pr * fix: cherry pick the #104 pr * fix code rabbit comments --------- Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> * fix:casesheet signature * fix:pom file change * API changes in Signature enhancement for Casesheet (#107) * fix:casesheet signature * fix:pom file change * fix: pom version * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix code * fix: amm-1927 send headers only if the request is from the allowed origin * fix: amm-1927 coderabbit fixes * Update regex handling for localhost URLs * Enhance regex pattern for URL matching * fix code * fix code * fix vulnerabilitie code * fix security hotspots * fixed conflicts * Add facility hierarchy creation with village and parent-child mapping (#121) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: pom version * fix: facility hierarchy and facility type management (#125) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * feat:added work location * feat:added work location * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: ui chnges * fix: pom version * fix: corrections * fix: facilty hierachy * fix: facility heirachy * fix: remove logs folder from repository Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add logs/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Facility hierarchy inventory mapping and store field management (#128) * fix:changed the pom xml * fix: added facilty type master change * feat: created facility creation * feat:added work location * feat:added work location * fix: rabiit review fix * fix: rabiit review fix * fix: rabiit review fix * fix: ui chnges * fix: pom version * fix: corrections * fix: facilty hierachy * fix: facility heirachy * fix: item facility mapping and store updates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: fixed inventory flow --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * merge 3.6.2 to release 3.8.1 (#132) * Cherry-pick health and version API enhancements to release-3.6.1 (#124) * feat(health,version): add health and version endponts * fix(health): add constant and remove duplicates * fix(health): avoid permanent DEGRADED from historical deadlocks * fix(health): Removed the unnecessary boolean literal * fix(health): Fixed the broken lock-wait detection * fix(health): avoid blocking DB I/O under write lock and restore interrupt flag * fix(health): add cancelFutures in healthservice * fix(health): close basic DB connection before advanced checks and remove shared-map race * feat: expose account lock state in SearchEmployee4 (#129) Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> * Fix the reset password issue (#131) * fix: reset password * fix: build issue * fix: update the url * fix: update config properties * fix: initialize constructor --------- Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com> * fix: avoid ONLY_FULL_GROUP_BY violation in service lookup queries GROUP BY sm.serviceName selected non-aggregated, non-functionally-dependent columns (serviceID, isNational, statusID), which MySQL rejects under ONLY_FULL_GROUP_BY. Use SELECT DISTINCT instead since no aggregation is actually needed. * fix: bulk employee registration sets username from contact number instead of username field mUser.setUserName(employee.getContactNo()) was using the uploaded contact number as the login username, ignoring the actual UserName column in the bulk upload sheet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add Nikshay location master for Stop TB (TU/Facility) and complete duplicate-mapping fix - New isolated tables/entities: NikshayTU, NikshayFacility, NikshayVillageFacilityMapping, with read-only cascading lookup endpoints (NikshayLocationController) — no existing master tables touched. - M_UserServiceRoleMapping2 gains NikshayTUID/NikshayFacilityID (nullable, additive), persisted on both create and update save paths. - Complete the pre-existing softDeleteOldMappings fix by adding the missing service interface/impl methods the controller already called. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * feat(nikshay): replace AMRIT-village-matching with independent Nikshay hierarchy Nikshay's TU/Facility/Village hierarchy was previously matched against AMRIT's existing state/district/block/village masters by name. That approach left ~44% of villages unmatched in practice — partly from incomplete migration runs, partly from real staleness in AMRIT's own district/block data (e.g. Andhra Pradesh's 2022 district reorganization never propagated to m_districtblock/m_DistrictBranchMapping). Replace it with a fully self-contained Nikshay hierarchy (NikshayState, NikshayDistrict, NikshayTU, NikshayFacility, NikshayVillage) sourced directly from Nikshay's own imported data, with no AMRIT matching involved. Verified: 100% village coverage (325,426/325,426) vs the previous approach's ~56%. NikshayLocationController's endpoints keep the same paths and query params, now backed by the new tables. * fix(nikshay): store NikshayTUID/NikshayFacilityID as comma-joined String Admin-UI now saves one row per user-role with a comma-joined list of TU/Facility IDs instead of one row per TU x Facility combination, so the DB columns became TEXT. Update the entity and the request-body DTO (Previleges1097_3) to match — both were still Integer, which would have failed to deserialize a value like "12,45,78". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * feat(nikshay): add endpoint to read back saved TU/Facility/District for Edit v_userservicerolemapping (and its entity, what the Admin-UI's mapped-list screen reads) never exposes DistrictID/NikshayTUID/NikshayFacilityID, only legacy AMRIT WorkingDistrictID/WorkingDistrictName - always null for Stop TB, which never populates WorkingLocationID. Edit had no way to read back what was saved, so the TU/Facility/Village pickers always loaded empty. Reads m_userservicerolemapping directly by USRMappingID (reusing the existing EmployeeMasterRepo.findByUSRMappingID), same pattern as the FLW-API worklist-scope query - additive only, the shared view and every other service line reading it stay untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: add missing @transactional to softDeleteOldMappings InvalidDataAccessApiUsageException: "Executing an update/delete query" - a @Modifying UPDATE query with no surrounding transaction. Pre-existing bug in shared code (updateUserRoleMapping, used by every service line), dormant until now: Stop TB's Edit form was always invalid before today's fixes (Update button permanently disabled), so nothing ever reached this code path through Stop TB specifically. Same pattern the other @Modifying query in this file already follows correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix(nikshay): stop patching District with AMRIT lookup for Stop TB getMappedRole()'s null-district patch (getDirectStateDistrictByMappingIDs) joins the raw DistrictID column against AMRIT's m_district - correct for HWC/FLW, where that column genuinely holds an AMRIT district ID. Stop TB's DistrictID holds a Nikshay district ID instead, so the same join resolves to whatever AMRIT district happens to share that numeric ID by coincidence (e.g. Nikshay's Angul, ID 292, resolving to AMRIT's Uttar Kannad, also ID 292) - showing a completely wrong, unrelated district name in the mapped-users list. Skip the District patch for Stop TB rows specifically; State/Block patching is untouched since those values are genuinely AMRIT-sourced even for Stop TB. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Add Nikshay location master for Stop TB (TU/Facility) and complete duplicate-mapping fix - New isolated tables/entities: NikshayTU, NikshayFacility, NikshayVillageFacilityMapping, with read-only cascading lookup endpoints (NikshayLocationController) — no existing master tables touched. - M_UserServiceRoleMapping2 gains NikshayTUID/NikshayFacilityID (nullable, additive), persisted on both create and update save paths. - Complete the pre-existing softDeleteOldMappings fix by adding the missing service interface/impl methods the controller already called. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Saurav Mishra <saurav.mishra@bizbrolly.com> Co-authored-by: Sushant <77480199+sushant-bizbrolly@users.noreply.github.com> Co-authored-by: Saurav Mishra <80103738+SauravBizbRolly@users.noreply.github.com> Co-authored-by: Mithun James <drtechie@users.noreply.github.com> Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> Co-authored-by: ravishanigarapu <133210792+ravishanigarapu@users.noreply.github.com> Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com> Co-authored-by: SnehaRH <77656297+snehar-nd@users.noreply.github.com> Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com> * fix: Stop TB bulk user upload district validation and qualification crash Stop TB bulk user uploads were failing 100% of the time: District validation ran against AMRIT's stale m_District table (missing post-2022 AP districts), and an unmatched Qualification silently resolved to ID 0, crashing the insert on FK_User_UserQualification instead of failing cleanly. The insert gate also only checked for missing fields, not invalid ones, so rows with invalid data still reached the DB. - Route District resolution through Nikshay's own district master (m_nikshay_district) for Stop TB service-line uploads only, via a new serviceProviderID -> ServiceID=12 check; every other service line keeps using m_District unchanged. - Add the missing "Qualification is invalid" validation check. - Fix the insert gate to check validationErrors.isEmpty() instead of a redundant chain that ignored "invalid" (non-empty but unmatched) values. * fix update user issue and role issue (#143) * Fix/admin bulk registration role issue (#144) * fix update user issue and role issue * fix update user issue and role issue * USER ID / Login ID Update for Mobile Number Change (#146) * fix(employee-master): validate username uniqueness on edit, stop clearing Employee ID Edit no longer silently nulls Employee ID on every save — the edit form doesn't submit that field, and the code was unconditionally copying the (missing) value over the existing one. Also checks the new username isn't already taken by another employee before saving, rather than allowing silent duplicates. * feat(admin): add username rename API with audit trail propagation CreatedBy/ModifiedBy across AMRIT store the username as a denormalised string rather than a UserID foreign key, so renaming a user has to be propagated by hand. Adds POST /username/renameUsername plus a /preview variant that reports the same per-table row counts without committing. The sweep covers m_user and 28 RMNCH/FLW tables across db_iemr and db_identity, in one transaction so a partial rename cannot be left behind. Column naming was verified against the AMRIT-DB migrations: db_identity is uniformly CreatedBy/ModifiedBy while db_iemr is split between created_by/updated_by and CreatedBy/ModifiedBy. Each table takes two UPDATEs, one per audit column, rather than a single combined statement. Setting both columns off a CreatedBy match would overwrite ModifiedBy on rows a different user last touched, destroying their attribution, and would miss rows this user only modified. Usernames are bound as parameters; only whitelist constants are interpolated. m_user is updated first so a unique-key rejection on UserName or EmployeeID happens before anything else is written, and the new name is capped at 12 characters when contact numbers are included because m_user.ContactNo is varchar(12). Scope is deliberately these tables only — it is not every table carrying an audit column, so the old username survives elsewhere. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(admin): make username rename preview index-friendly and exact Preview timed out behind nginx on UAT (504). Each of the 28 tables was counted with `createdBy = :u OR modifiedBy = :u`, and an OR across two columns cannot use a single-column index on either — so every table was a full scan. Split into two single-column counts, matching the two UPDATEs the rename already issues, so both can use the new indexes in AMRIT-DB V96/V19. Splitting also makes the numbers honest: a row the user both created and last modified is updated by each statement, so counting it once under-reported what rename() goes on to report. Preview now also counts m_user, which it previously skipped while the rename reported it, so the two line up row for row. Corrects the ELIGIBLE_COUPLE_TRACKING entry to eligible_couple_tracking — the schema creates it lowercase, and table names are case-sensitive on Linux MySQL. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Revert "fix(admin): make username rename preview index-friendly and exact" This reverts commit cd20896. * refactor(admin): drive username rename updates by primary key Reworks the sweep to the supplied query shape: each UPDATE now selects the rows to touch by primary key through a derived table rather than filtering on the audit column directly. The SELECT ... AS temp wrapper is what MySQL requires to read from the same table an UPDATE targets (error 1093), and driving by PK keeps the statements usable under safe-update mode. Carries each table's primary key in the registry; all 28 were verified against the AMRIT-DB migrations. Both audit columns are now set off a CreatedBy match, per the supplied queries, replacing the earlier split into one statement per column. Preview counts CreatedBy alone to match, and still reports m_user, so preview and result line up row for row. Keeps eligible_couple_tracking lower case: the schema creates it that way and MySQL table names are case sensitive on Linux. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(admin): drop the username rename preview endpoint Removes POST /username/renameUsername/preview along with the service method behind it, the two counting queries it used, and the now-unused preview flag on the response. /username/renameUsername is unchanged and remains the only endpoint. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(admin): accept an optional new Employee ID on username rename EmployeeID was hardcoded to the new username in both branches of the m_user update. It is now only touched when the request supplies a new value, so renaming a username no longer implies changing the Employee ID. The SET clause is built from what was actually asked for. Splits the uniqueness check in two. UserName and EmployeeID hold separate UNIQUE keys on m_user, so each conflicts only with its own column — the previous combined check rejected a new username merely because some row used it as an Employee ID, which was only correct while the two were forced to match. Both checks exclude the row being renamed, so re-entering the value that row already holds is not reported as a conflict with itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(admin): add username/employee ID availability endpoint Adds POST /username/checkAvailability so the screen can report a duplicate as it is typed rather than at submit. It reuses the same repository checks rename() runs, so the two cannot disagree — including counting soft-deleted rows, which still hold m_user's UNIQUE keys. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(admin): update username and employee ID independently Both new values are now optional. Each is normalised to null when blank or already equal to what the row holds, and the m_user UPDATE is built from whichever columns actually change — so a username-only change, an employee-ID-only change, or both are all valid. The request is rejected only when neither would change anything. The 28-table audit sweep is skipped entirely when the username is unchanged: CreatedBy/ModifiedBy record the username, so an employee-ID-only change leaves every audit row already correct. That also keeps such a change off the unindexed scan path. Drops the updateEmployeeId flag (supplying a value is the intent) and the /username/checkAvailability endpoint, since the screen now uses the same m/FindEmployeeByName and m/FindEmployeeDetails checks as Employee Master. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(admin): address the rename target by userID Takes userID on the rename request and uses it as the identity of the row being changed. The username is the very thing being renamed, so a string match is a poor way to address it; the primary key is not. The m_user UPDATE is now keyed on UserID, and both uniqueness checks exclude self by UserID rather than by username — the same way the Employee Master edit path does it via findEmployeeByNameForUpdate. The old username is now read from the row rather than trusted from the request, and a mismatch is rejected: if the row was renamed after the screen loaded its list, sweeping on the stale username would repoint the wrong audit records. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(admin): return the employee ID in the rename response The response carried only the username pair, so a caller had no way to see what happened to the employee ID. Adds oldEmployeeId (read before the update) and newEmployeeId. Also adds userNameUpdated/employeeIdUpdated booleans. OutputResponse re-serialises the envelope with a GsonBuilder that has no serializeNulls, so any null field drops out of the JSON entirely — which is why an unset employee ID appears to be missing rather than null. A primitive boolean always survives that pass, so the caller can tell "unchanged" from "absent". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(admin): drop row/table counts from the rename response Removes rowsPerTable, tablesAffected and totalRowsAffected. The response now reports only what changed: the username and employee ID before and after, plus the flags saying whether each was written. The total row count is still summed and logged, so the scale of a rename remains traceable without exposing the table list to callers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Revert "fix(employee-master): validate username uniqueness on edit, stop clearing Employee ID" This reverts commit 4f6371f. * revert: undo the employee edit page username/Employee ID changes Reverts 4f6371f — the editUserDetails uniqueness check, the Employee ID null-guard and findEmployeeByNameForUpdate. Verified independent of the Change Username feature: nothing in the username package called any of it, so the rename API is unaffected. Drops the comment that pointed at the removed query. Note this restores the prior editUserDetails behaviour, including the unconditional setEmployeeID that nulls Employee ID when the edit form does not submit that field. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * style(admin): remove comments from the username rename classes Pure deletions — no code changed. GPL license headers kept. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(admin): address the scan findings on the username rename Log injection (UsernameRenameServiceImpl): the rename start line logged the old/new username and employee ID straight from the request, so a value containing CR/LF could forge log entries. Those values are now flattened to a safe character set and length-capped before logging, and the line also carries the userID, which is an integer and cannot be tampered with. Dynamic SQL (UsernameRenameRepository): schema, table and column names cannot be bound as parameters, so they are interpolated. Each is now checked against a strict SQL-identifier pattern before it can reach a statement, so anything that is not a plain identifier throws instead of being concatenated in. All caller-supplied data was, and remains, bound. Verified every identifier in the table registry satisfies the pattern. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(admin): stop logging request-derived strings on rename The sanitising helper did not clear Sonar's taint analysis — a custom regex replace is not recognised as a sanitiser, so the rule still traced request data into the logger and the Quality Gate stayed at Security Rating C. Logs the userID and two booleans saying which columns are changing instead. Nothing request-derived reaches the log, so the taint path is gone rather than filtered. The values themselves are still available in the response and in m_user. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(admin): build rename SQL from constants, not formatted strings Sonar reported three MAJOR vulnerabilities for dynamically formatted SQL in UsernameRenameRepository, holding New Code at Security Rating C and failing the Quality Gate. Each query call now receives a constant rather than a formatted string: - the two uniqueness counts become two fixed queries instead of one with an interpolated column name - the m_user update selects one of five constants covering the possible combinations, instead of joining a SET clause at runtime - the per-table rename SQL is built once in AuditTable's constructor and read back through a getter, so the query call takes a plain value Identifier validation moves to AuditTable, where the identifiers now live, and rejects anything that is not a plain SQL identifier. The generated SQL is unchanged: verified byte-identical for the per-table rename and for all eight combinations of the m_user update. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Sneha <sneha@ADMINs-MacBook-Pro.local> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> * fix employee id issue (#150) * fix employee id issue * fix employee id issue * fix employee id issue * fix employee id issue * fix employee id issue * fix employee id issue --------- Co-authored-by: Sneha <sneha@ADMINs-MacBook-Pro.local> Co-authored-by: SnehaRH <77656297+snehar-nd@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Vishwanath Balkur <118195001+vishwab1@users.noreply.github.com> Co-authored-by: Saurav Mishra <saurav.mishra@bizbrolly.com> Co-authored-by: Sushant <77480199+sushant-bizbrolly@users.noreply.github.com> Co-authored-by: Saurav Mishra <80103738+SauravBizbRolly@users.noreply.github.com> Co-authored-by: Mithun James <drtechie@users.noreply.github.com> Co-authored-by: Ravi Shanigarapu <ravi.shanigarapu@wipro.com> Co-authored-by: ravishanigarapu <133210792+ravishanigarapu@users.noreply.github.com> Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com> Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com> Co-authored-by: KOPPIREDDY DURGA PRASAD <144464542+DurgaPrasad-54@users.noreply.github.com> Co-authored-by: Varun Deep Saini <deep.sa@rippling.com> Co-authored-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com> Co-authored-by: vishwab1 <vishwanath@navadhiti.com>
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.
This PR cherry-picks health monitoring and version API enhancements from the main branch into the release-3.6.1 branch to ensure the improvements are included in the upcoming production release.