AshharAhmadKhan opened a new pull request, #5764:
URL: https://github.com/apache/fineract/pull/5764
## Description
`POST /clients/{clientId}/charges/{chargeId}?command=inactivate` has thrown
`error.msg.command.unsupported` on every call since August 2015 and has never
returned a successful response in any version of Fineract or its predecessor
MifosX.
The service method `inactivateCharge()` was a stub returning `null` from its
very
first commit (`d0fd3e4a6c`, August 17 2015, Vishwas Babu A J). No command
handler
for `CLIENTCHARGE|INACTIVATE` was ever registered in any commit across the
full
repository history. `git log --all -S "clientCharge.inactivate"` returns
zero results.
Runtime confirmation against `apache/fineract:latest` (April 2026): HTTP 400,
`error.msg.command.unsupported`. `m_portfolio_command_source` shows
`made_on_date=NULL`, `status=5` — rejected before any processing began.
`m_client_charge.is_active` was never written. Historical record showed zero
prior attempts before the validation run.
Following community discussion on the DEV list, architectural direction from
Victor (charges should be account-associated, not client-associated) and
confirmation from PMC Chair James Dailey, this PR removes the write path
scaffolding (Phase 1 only).
**What this PR removes:**
- `else if` routing branch for `command=inactivate` in
`ClientChargesApiResource`
- `inactivateCharge()` interface method and null stub implementation in
`ClientChargeWritePlatformService` and `ClientChargeWritePlatformServiceImpl`
- `inactivateClientCharge()` builder method in `CommandWrapperBuilder`
- `CLIENT_CHARGE_ACTION_INACTIVATE` and
`CLIENT_CHARGE_COMMAND_INACTIVATE_CHARGE` constants from `ClientApiConstants`
- Liquibase changeset `0228` deleting `INACTIVATE_CLIENTCHARGE` and
`INACTIVATE_CLIENTCHARGE_CHECKER` from `m_permission`
- Corresponding rows in `barebones_db.sql` and `load_sample_data.sql`
**What this PR does NOT remove (Phase 2 decision):**
- `isActive` and `inactivationDate` from the GET
`/clients/{clientId}/charges` response — removing these fields changes the
response contract and requires a separate deprecation notice
**Observable behavior change for callers:**
- Before: `?command=inactivate` → HTTP 400, `error.msg.command.unsupported`
- After: `?command=inactivate` → HTTP 400, `error.msg.unrecognized.param`
- HTTP status code does not change. This command has never produced a
successful response.
**References:**
- JIRA: https://issues.apache.org/jira/browse/FINERACT-2587
- Related ticket: https://issues.apache.org/jira/browse/FINERACT-2545
- DEV list thread (72-hour notice posted April 9, 2026, three +1s received):
https://lists.apache.org/thread/lhh0hx0t2y7vzdrs98fg3qyfx1xo9d0y
- Original investigation PR: https://github.com/apache/fineract/pull/5655
--
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]