Backend – Support Village-Level Pincode and Residential Area and Fix Village

XMLWordPrintable

    • Type: Task
    • Resolution: Unresolved
    • Priority: High
    • 3.13
    • Affects Version/s: None
    • STOP TB
    • All

      Description:

      Problem Statement

      Two backend issues were identified during STOP-412 testing:

      1. The getUserDetail API currently returns only villageId and villageName. It needs to provide Pincode and Residential Area for each assigned village so the Android application can auto-populate these fields during registration.
      2. Village changes are not persisted for some seeded/imported beneficiaries. Although syncDataToAmrit returns success, the next changes-feed pull returns the old village ID.

      Required Changes

      • Add nullable PinCode and ResidentialAreaID columns to m_nikshay_village.
      • Update getUserDetail to return a new villageDetails array containing villageId, villageName, pinCode, residentialAreaId, and residentialArea.
      • Keep existing villageId and villageName fields unchanged for backward compatibility.
      • Add appropriate logs when records cannot be found.

      Acceptance Criteria

      • getUserDetail returns Pincode and Residential Area against each assigned village.
      • Missing master data is returned as NULL.
      • Existing API fields and login flows remain backward compatible.
      • Village changes are correctly persisted for both app-created and imported/seeded beneficiaries.
      • The next changes-feed pull returns the updated village ID.

      References:

              Assignee:
              Madhava Ramu N
              Reporter:
              Ankit Singh Bish
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: