Features / VO & endorsements

Farmer endorsement details

Review workflow in which a Unit In-charge / FMT endorses or flags data at VO (Village Organisation), SHG (Self-Help Group) and farmer level, with a comment thread. Statuses are PENDING, ENDORSED, FLAGGED and FOR_REVIEW.

FactsheetVO & endorsements
Who uses it
Unit login (Unit In-charge / FMT: endorse, flag)Cadre user (mark flagged items resolved, comment)
How you get here
Unit login home or drawer "Endorsement" > VO list > SHG list > Farmer list; or Farmer hub, Comments tile (needs a current category that is not C4 and an existing endorsement status).
Tables
endorsement_entity, endorsement_comment_entity, ie_flat_entity
APIs
6 calls today, 9 App Service operations
Offline
Statuses and comments are cached locally; pre-checks (category deadline, KAP status) and the location filter need internet.

Screens

ScreenWhat it doesSource
VO tabCards for Endorsement, Survey and Compact Block.app/src/main/java/org/platformcommons/urvi/view/endorsements/VoTabFragment.kt
Endorsement listVO > SHG > Farmer drill-down with row menu.app/src/main/java/org/platformcommons/urvi/view/endorsements/vo/EndorsementFragment.kt
Status and comments sheetEndorse / flag / resolve and comments.app/src/main/java/org/platformcommons/urvi/view/endorsements/comment/ResolveCommentsFragment.kt

What it captures

FieldTypeRequiredValidationOptions from
CommentTextYes (when posting)Empty comments are rejected. Each records text, entity, poster first name and time.User input
Location filterDistrict > Mandal > Village > VO > HabitationNoNeeds internet.Server datasets

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
Unit login and status is Pending/noneEndorse and Flag are offered; Flag sets FLAGGED.
Unit login and status is Flagged or For reviewEndorse and Not resolved are offered; Not resolved keeps FLAGGED and adds the comment "not resolved".
Status is EndorsedNo action buttons are offered.
Cadre user and status is FlaggedMark as resolved sets FOR_REVIEW and adds the comment "under review".
Endorsing a farmerThe farmer must have an IE id and a frozen category; C4 farmers are endorsed directly, others need KAP 2025-26 submitted (dataset PlusOneAAP2526IEIDStatus) or the app says "Submit KAP".
Endorsing an SHGAll farmers need IE ids and active farmers a frozen category; if all are C4 it endorses directly, otherwise every C5 member needs KAP submitted; missing ones are listed.
Endorsing a VOEvery SHG in the VO must already be endorsed; pending SHGs are listed.
A VO or SHG is endorsed or flaggedThe status is cascaded to every farmer under it.
Bulk endorse on the non-SHG farmer listEvery farmer with KAP 2025-26 submitted is endorsed after a confirmation list.
Tapping a farmer in the endorsement listTheir KAP 2025-26 plan opens read-only (needs an IE id).

API contracts

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

App Service v2: operationUse
GET /geo/childrenChildren of a geography node
GET /farmers/{farmerId}One hydrated farmer (get-or-create)
GET /farmers/searchSearch farmers in a geography (online)
GET /farmers/{farmerId}/abstractFarmer abstract for a season
GET /farmers/{farmerId}/planKAP / annual action plan for a season
GET /endorsementsEndorsement statuses (VO, SHG, farmer)
GET /endorsements/{entityType}/{entityId}/commentsComment thread of an endorsed entity
GET /endorsements/{entityType}/{entityId}/eligibilityWhy an endorsement action is allowed or blocked
POST /sync/batchApply an ordered batch of offline mutations

Behaviour notes

  • Comments are paged 20 at a time with "load more".
  • Row menu: Raise flag, View comments, Mark as endorsed, Download abstract (VO/SHG), Upload / Get endorsed abstract (VO/SHG when endorsed).
  • Possible bug · unverified "Mark as resolved" sets the reviewed-by field to a timestamp then overwrites it with the user name, losing the review time.

Improve in the rewrite

  • Store reviewer and review time in separate fields.
  • Centralise role checks (Unit login vs Cadre vs HAN) in one policy layer.