Skip to content

FINERACT-2587: Remove CLIENTCHARGE|INACTIVATE write path (never implemented since 2015)#5764

Open
AshharAhmadKhan wants to merge 1 commit intoapache:developfrom
AshharAhmadKhan:FINERACT-2587-remove-clientcharge-inactivate-writepath
Open

FINERACT-2587: Remove CLIENTCHARGE|INACTIVATE write path (never implemented since 2015)#5764
AshharAhmadKhan wants to merge 1 commit intoapache:developfrom
AshharAhmadKhan:FINERACT-2587-remove-clientcharge-inactivate-writepath

Conversation

@AshharAhmadKhan
Copy link
Copy Markdown
Contributor

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:

@AshharAhmadKhan
Copy link
Copy Markdown
Contributor Author

@adamsaghy failure unrelated to my code. Please re run it when you get a chance!

Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants