Skip to content

fix: Stop TB bulk user upload district validation and qualification c… - #140

Merged
SauravBizbRolly merged 1 commit into
release-3.8.2from
vb/release-3.8.2-fix
Aug 3, 2026
Merged

fix: Stop TB bulk user upload district validation and qualification c…#140
SauravBizbRolly merged 1 commit into
release-3.8.2from
vb/release-3.8.2-fix

Conversation

@vishwab1

@vishwab1 vishwab1 commented Aug 3, 2026

Copy link
Copy Markdown
Member

…rash

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.

📋 Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

…rash

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.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 440ea7d7-ebd5-4555-82df-a63f02c1edc2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@SauravBizbRolly
SauravBizbRolly merged commit bf251a4 into release-3.8.2 Aug 3, 2026
3 of 4 checks passed
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