Features / Planning & tracking

KAP / Annual Action Plan 2025-26

Captures a farmer's natural-farming plan for 2025-26 next to endorsed and current 2024-25 figures (C1, PMDS, S2S, A Grade, compact block extent, cows, 365 DKG, ATM). It can be submitted many times until the farmer is endorsed. The UI calls it KAP 25-26; the code calls it AAP 2025-26.

FactsheetPlanning & tracking
Who uses it
Field staff / CRP (edit)Unit-in-charge / FMT (read-only UIC mode via Endorsement)
How you get here
Farmer profile > Options > "KAP 25-26" (editable). Or Endorsement > farmer row tap (read-only UIC mode, loads plan from server).
Tables
ie_flat_entity
APIs
7 calls today, 6 App Service operations
Offline
Entry form works offline once the farmer is synced; submit stores a local JSON copy and queues the POST with retry (dooWithRetry). UIC mode needs network to load the plan.

Screens

ScreenWhat it doesSource
Action plan 2025-26Whole KAP form with header, three columns and submit.app/src/main/java/org/platformcommons/urvi/view/aap_25_26/ActionPlanFragment2025To2026.kt

What it captures

FieldTypeRequiredValidationOptions from
C1 Extent (acres) - 24-25 current / 25-26DecimalIf enabled0-99.99. 24-25 must be <= total land extent 24-25; 25-26 must be <= total land extent 25-26.User input; 24-25 endorsed value from dataset AAP2025_26
PMDS Extent - 24-25 current / 25-26DecimalIf enabled0-99.99, <= C1 of the same year.User input; endorsed value from server
PMDS practising yearsCheckboxes 2019-20 to 2024-25If enabledAt least one of 2019-20 to 2023-24 must be ticked; 2024-25 alone does not count.Fixed options
S2S Extent - 24-25 current / 25-26DecimalIf enabled0-99.99, <= C1 of the same year.User input; endorsed value from server
A Grade extent - 24-25 current / 25-26DecimalIf enabled0-99.99, <= S2S of the same year.User input; endorsed value from server
S2S extent in compact block (NF) - 24-25 current / 25-26DecimalIf enabled0-99.99, <= S2S of the same year.User input; endorsed value from server
Desi cows - 24-25 current / 25-26NumberIf enabledUser input; endorsed value from server
365 DKG - 24-25 current / 25-26Choice: No / Seasonal / 365YesFixed options
ATM - 24-25 current / 25-26Yes/NoYesFixed options
Is the farmer practising 365 DGC? (25-26)Yes/No + seasons (PMDS, Kharif, Rabi, RDSS1, RDSS2)If enabledIf Yes, at least 1 season. No clears and disables seasons.Fixed options

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
isKAPEnabled = 0Toast "no entries allowed".
Farmer has no categoryToast "update category".
Farmer is C4Toast "no KAP access".
Farmer is not C5 and land is not authenticatedToast "please authenticate land".
Farmer not yet synced (no IE id)Toast "please sync the farmer data before accessing KAP" (UIC mode: "KAP not allowed").
Computing total land extent 25-26Sum of totalQuantity of all the farmer's land assets, only for Farmer-category IEs; otherwise 0.
Category starts with "Farmer" or the Telugu equivalentHeader shows category as "Farmer".
Current category is C4 or C5C1, PMDS, S2S, NF-in-CB, A Grade and PMDS years are disabled.
Farmer endorsement status = ENDORSEDEverything including Submit is disabled; banner "Editing Annual Plan is not allowed since farmer has been endorsed."
Read-only UIC modeEverything including Submit is disabled.
Total land extent 24-25 is empty or 0All 24-25 current numeric fields, PMDS years and DGC are disabled; if category 24-25 is empty or not C5, DKG 24-25, ATM 24-25 and cows 24-25 are also disabled.
Total land extent 25-26 = 02025-26 C1, PMDS, S2S, NF and A Grade are disabled.
Any enabled numeric field is empty"Please add all the data"; empty pre-populated values are sent as "0".
Submit confirmedJSON copy saved in ie_flat_entity (aap2526 column), POST queued with retry, analytics event CREATED_KAP.

API contracts

Each call opens to its use case, headers, request and response bodies, and errors.

App Service v2: operationUse
GET /configTyped config bundle (ETag)
GET /farmers/snapshotCursor-paged hydrated farmer snapshot
GET /farmers/changesDelta sync: upserts and tombstones since a cursor
GET /farmers/{farmerId}/metricsOwned, leased, used and available acres
GET /farmers/{farmerId}/planKAP / annual action plan for a season
POST /sync/batchApply an ordered batch of offline mutations

Behaviour notes

  • Help text: AAP can be submitted any number of times; once SHG/VO is endorsed it cannot be submitted.
  • PUT exists for UIC mode but Submit is disabled there, so it never runs in practice.
  • Possible bug · unverified PMDS-years check ignores 2024-25.
  • Possible bug · unverified A Grade warning says "cannot exceed C1" but the check compares with S2S.
  • Possible bug · unverified the isDataValid flag is overwritten by whichever field was edited last, so an earlier invalid field can be un-flagged.

Improve in the rewrite

  • Validate the whole form on submit instead of tracking a single last-edited flag.
  • Align warning texts with the actual ceilings.
  • Show inline errors per field instead of a generic toast.
  • Move year-specific labels (24-25, 25-26) and years list into config for future plans.