Features / Assets & land

Leased land

Lets a farmer record land they lease in from another farmer by picking the lessor and the lessor's parcels. One land record is created per selected lessor parcel.

FactsheetAssets & land
Who uses it
Cadre user
How you get here
Land list > Add Land > Asset Category "Leased-in Land" (Irrigated or Rain-fed).
Tables
ie_asset, farmerassets
APIs
12 calls today, 10 App Service operations
Offline
Partly offline: the location cascade needs internet to start; parcel availability falls back to a local calculation; saves are queued.

Screens

ScreenWhat it doesSource
Add / Edit land (leased-in section)Pick lessor location, lessor and lessor parcels.app/src/main/java/org/platformcommons/urvi/view/landasset/AddUpdateAssetNewDialog.kt

What it captures

FieldTypeRequiredValidationOptions from
District > Mandal > Village > VO > Habitation > SHGCascading dropdownsYes (to find the lessor)Districts are fetched only when online. SHG list starts with "Non-SHG".Server datasets PlusOneGetAllDistricts, ...MandalsForDistrict, ...VillagesForMandal, ...VOForVillage, ...HabitationForVOAliasId, PlusOneHabitationSHGList
Land Leased FromDropdownYesThe current farmer is excluded.SHG farmers (PlusOneWorkNodeFarmerHusbandFatherSHGWise), VO non-SHG farmers, or local farmers
Lessor's land parcelsChecklist with leased acresYes (at least 1)Multi-select when new, single-select when editing. Leased acres must be greater than 0 and no more than the parcel's available land.PlusOneGetOwnedLandByIEID minus PlusOneGetATMNFUsedAcreageByIEID; offline: owned minus leased-out minus ATM minus current Crop Actual

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
Leased acres for a parcel are 0 or more than the parcel's available landError "Land limit exceed."
Editing an existing leaseAvailable land = available + this lease's current acres.
The lease is savedOne asset is created per selected parcel, copying its khata, survey number and leased acres, with lease type INCOMING and lease status PENDING.
The lessor parcel has a geofenceThe new leased-in record inherits it.
The device is offlineDistricts cannot be loaded and available acres are computed locally.

API contracts

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

Today: callUseReplaced by
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetOwnedLandByIEID/executeGet a farmer's owned land, used to validate land entries.
GET /rtld/api/dataset/v1/execute?name=PlusOneGetATMNFUsedAcreageByIEIDGet acreage already used by ATM/natural farming, used to validate entries.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetAllDistricts/executeList districts. Same call duplicated in three client classes.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetAllMandalsForDistrict/executeList mandals in a district. Same call duplicated in three client classes.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetAllVillagesForMandal/executeList villages in a mandal. Same call duplicated in three client classes.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetAllVOForVillage/executeList village organisations (VOs) in a village. Same call duplicated in three client classes.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetAllHabitationForVOAliasId/executeList habitations under a VO. Same call duplicated in three client classes.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneHabitationSHGList/executeList self-help groups (SHGs) in a habitation. Same call duplicated in three client classes.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneWorkNodeFarmerHusbandFatherSHGWise/executeList farmers (with husband/father names) in an SHG.
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneWorkNodeFarmerHusbandFatherVOWiseNonSHG/executeList farmers in a VO who are not in any SHG.
POST /gateway/asset-service/api/v1/assets/Create a land or cattle asset.
PATCH /gateway/asset-service/api/v1/assets/Update land or cattle assets.
App Service v2: operationUse
GET /configTyped config bundle (ETag)
GET /geo/childrenChildren of a geography node
GET /farmers/snapshotCursor-paged hydrated farmer snapshot
GET /farmers/searchSearch farmers in a geography (online)
GET /farmers/{farmerId}/landsA farmer's land parcels
GET /farmers/{farmerId}/metricsOwned, leased, used and available acres
POST /sync/batchApply an ordered batch of offline mutations
POST /filesCreate a file upload (resumable or single-shot)
PATCH /files/{fileId}Append a chunk to a resumable upload
HEAD /files/{fileId}Current offset of a resumable upload

Behaviour notes

  • Rows show Leased-from / Leased-to badges on the Land list.
  • Possible bug · unverified each leased record gets a random-character suffix in its name, and editing several records saves them in a loop; a failure mid-way leaves a partial save.

Improve in the rewrite

  • Model a lease as one record linking lessor parcel and lessee instead of copying parcel data.
  • Save multi-parcel leases atomically.