Aman-Mittal commented on PR #509:
URL:
https://github.com/apache/fineract-backoffice-ui/pull/509#issuecomment-5558496878
Pushed `71ebbb4a` — the branch now merges `main` and compiles. Also re-ran
the sync locally to confirm this PR really is the latest spec.
### The spec is current, and reproduces exactly
`apache/fineract:latest` still resolves to the index digest this PR used, so
nothing upstream has moved since it was opened:
```
docker buildx imagetools inspect apache/fineract:latest
Digest:
sha256:6da0292eac85158ccc7a6ed8ede05eb022de5fec1430eaba299bb5f1bc1e28f3
```
Extracting `/app/resources/static/fineract.json` from that image gives
`sha256:635c2132…`, matching `upstreamSha256` in `fineract.provenance.json`.
Regenerating from it with `npm run generate-api` left `git diff -- src/app/api
public/api` empty — the committed client is byte-identical to what the
generator produces today.
### The build failure was pointing at a real defect
The spec now types the body of `PUT
/loans/{loanId}/disbursements/{disbursementId}` as
`PutLoansLoanIdDisbursementsDisbursementIdRequest` instead of a bare `string`,
so `JSON.stringify(this.disbursementEditForm)` stopped compiling. That request
never worked. Sent from the UI on `main`, against a live 1.16.0-SNAPSHOT:
```
PUT /loans/24/disbursements/1
{"expectedDisbursementDate":"25 August 2026","principal":725,"note":""}
400 error.msg.parameter.unsupported [principal] The parameter principal
is not supported.
400 error.msg.parameter.unsupported [note] The parameter note is not
supported.
```

I probed the command's real parameter set on a two-tranche loan rather than
reading it off the schema:
| Body | Result |
|---|---|
| `principal` / `note` | 400, both reported unsupported — one stray
parameter fails the whole request |
| `updated*` only | 400
`validation.msg.loan.update.disbursement.expectedDisbursementDate.cannot.be.blank`
|
| anchor date only | 400
`validation.msg.loan.update.disbursement.principal.cannot.be.blank` |
| no `dateFormat`/`locale` | 400
`validation.msg.missing.dateFormat.parameter` |
| anchor + `updated*` + `dateFormat` + `locale` | **200**, tranche moves |
So `updateDisbursementDate` wants the tranche's current date as
`expectedDisbursementDate` **and** the edit as
`updatedExpectedDisbursementDate` / `updatedPrincipal`, all three mandatory. It
has no `note` at all, which is why that field is gone rather than quietly
dropped — leaving it in the form would keep failing every save.
### Two smaller defects came with it
The platform answers with `expectedDisbursementDate` as a `[year, month,
day]` array even though the spec declares a string, so the plain text box
rendered the array to the user:

It is a date input now, fed by `toEditableDate`, which accepts either shape.
Converting back for the wire deliberately does not go through `new
Date('2026-08-25')` — that is UTC midnight, and `formatDateToFineract` reads
the day back with local getters, giving `24 August 2026` for anyone west of
Greenwich. `isoToFineractDate` splits the parts by hand. The unit tests pass
under `TZ=America/New_York` as well as locally.
### Verified end to end
```
PUT /loans/24/disbursements/1
{"expectedDisbursementDate":"10 August 2026",
"updatedExpectedDisbursementDate":"25 August 2026",
"updatedPrincipal":725,"dateFormat":"dd MMMM yyyy","locale":"en"}
-> 200
GET /loans/24/disbursements/1
->
{"id":1,"loanId":24,"expectedDisbursementDate":[2026,8,25],"principal":725.000000}
```

Screen recordings of both runs:
[before](https://github.com/Aman-Mittal/fineract-backoffice-ui/raw/assets/issue-screenshots/disbursement-tranche-edit-before.webm)
·
[after](https://github.com/Aman-Mittal/fineract-backoffice-ui/raw/assets/issue-screenshots/disbursement-tranche-edit-fixed.webm).
Gates: `npm run build` clean, `npm run lint` clean, `check-translations`
(1612 keys), `check-icons` (117), `check-api-surface` (145 services / 610
operations), and 29/29 in `loan-view.component.test.ts` — 7 of them new,
covering the outgoing body, the array-shaped response and the timezone
conversion.
One thing to flag separately: the full `npm run test:unit` on this branch
reports **37 failed / 1378 passed** — the same 37 that fail on `main`, in the
same two files, so this PR neither causes nor fixes them. Each of those files
passes on its own; they only fail in a full run. Filing that separately.
Merged `main` in rather than rebasing, so the bot's original `b6ef894f` is
untouched.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]