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
| Screen | What it does | Source |
|---|---|---|
| Action plan 2025-26 | Whole KAP form with header, three columns and submit. | app/src/main/java/org/platformcommons/urvi/view/aap_25_26/ActionPlanFragment2025To2026.kt |
What it captures
| Field | Type | Required | Validation | Options from |
|---|---|---|---|---|
| C1 Extent (acres) - 24-25 current / 25-26 | Decimal | If enabled | 0-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-26 | Decimal | If enabled | 0-99.99, <= C1 of the same year. | User input; endorsed value from server |
| PMDS practising years | Checkboxes 2019-20 to 2024-25 | If enabled | At 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-26 | Decimal | If enabled | 0-99.99, <= C1 of the same year. | User input; endorsed value from server |
| A Grade extent - 24-25 current / 25-26 | Decimal | If enabled | 0-99.99, <= S2S of the same year. | User input; endorsed value from server |
| S2S extent in compact block (NF) - 24-25 current / 25-26 | Decimal | If enabled | 0-99.99, <= S2S of the same year. | User input; endorsed value from server |
| Desi cows - 24-25 current / 25-26 | Number | If enabled | User input; endorsed value from server | |
| 365 DKG - 24-25 current / 25-26 | Choice: No / Seasonal / 365 | Yes | Fixed options | |
| ATM - 24-25 current / 25-26 | Yes/No | Yes | Fixed options | |
| Is the farmer practising 365 DGC? (25-26) | Yes/No + seasons (PMDS, Kharif, Rabi, RDSS1, RDSS2) | If enabled | If Yes, at least 1 season. No clears and disables seasons. | Fixed options |
Rules
Conditions from the code, rewritten as plain decision rules.
| When | Then |
|---|---|
| isKAPEnabled = 0 | Toast "no entries allowed". |
| Farmer has no category | Toast "update category". |
| Farmer is C4 | Toast "no KAP access". |
| Farmer is not C5 and land is not authenticated | Toast "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-26 | Sum of totalQuantity of all the farmer's land assets, only for Farmer-category IEs; otherwise 0. |
| Category starts with "Farmer" or the Telugu equivalent | Header shows category as "Farmer". |
| Current category is C4 or C5 | C1, PMDS, S2S, NF-in-CB, A Grade and PMDS years are disabled. |
| Farmer endorsement status = ENDORSED | Everything including Submit is disabled; banner "Editing Annual Plan is not allowed since farmer has been endorsed." |
| Read-only UIC mode | Everything including Submit is disabled. |
| Total land extent 24-25 is empty or 0 | All 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 = 0 | 2025-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 confirmed | JSON 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.
| Today: call | Use | Replaced by |
|---|---|---|
GET /rtld/api/dataset/v1/execute?name=AAP_REJECT_REASON | Load the reasons a reviewer can pick when rejecting an annual action plan. | |
GET /gateway/commons-report-service/api/v1/datasets/name/AAP2025_26/execute | Download 2025-26 annual action plans for a chunk of farmers. | |
GET /gateway/asset-service/api/v1/annual-action-plan-extended?ownerEntityIds=&ownerEntityType=ENTITY_TYPE.IE | Get 2025-26 annual action plans (extended) for farmers. | |
GET /rtld/api/dataset/v1/execute?name=PlusOneAAP2526IEIDStatus | Get the review status of farmers' 2025-26 action plans. | |
POST /gateway/asset-service/api/v1/annual-action-plan-extended | Create a 2025-26 annual action plan. | |
PUT /gateway/asset-service/api/v1/annual-action-plan-extended | Update a 2025-26 annual action plan. | |
PATCH /gateway/asset-service/api/v1/annual-action-plans | Update a 2024-25 (legacy season) annual action plan. |
| App Service v2: operation | Use |
|---|---|
GET /config | Typed config bundle (ETag) |
GET /farmers/snapshot | Cursor-paged hydrated farmer snapshot |
GET /farmers/changes | Delta sync: upserts and tombstones since a cursor |
GET /farmers/{farmerId}/metrics | Owned, leased, used and available acres |
GET /farmers/{farmerId}/plan | KAP / annual action plan for a season |
POST /sync/batch | Apply 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.