FINERACT-2587: Remove CLIENTCHARGE|INACTIVATE write path (never implemented since 2015)#5764
Conversation
|
@adamsaghy failure unrelated to my code. Please re run it when you get a chance! |
|
Hi @adamsaghy , could you take a look at this when you have time? I’ve rechecked everything and it looks good from my side. If you have any suggestions, please let me know. |
c5200b9 to
4fd57a8
Compare
|
Hi @adamsaghy , rebased onto latest develop, changeset renumbered from 0228 to 0229. Also failure unrelated to my code, so please re - trigger it when you get a chance! |
Aman-Mittal
left a comment
There was a problem hiding this comment.
Seems OK, Implementation are properly removed and liquibase migration script is maintained
|
Hi @adamsaghy , just circling back on this, would value your feedback whenever you get the chance. |
|
@AshharAhmadKhan there is a conflict to be solved... could you please help us? |
0058bb8 to
b14a429
Compare
|
Hi @adamsaghy @IOhacker , changeset renumbered from 0229 to 0230, all conflicts resolved! |
|
@AshharAhmadKhan Please rebase it one more time (some earlier PRs were merged) |
…mented since 2015)
b14a429 to
49d94eb
Compare
|
Hi @adamsaghy , changeset renumbered from 0230 to 0231. Happy to accommodate any further changes if needed! |
|
@AshharAhmadKhan I notice two items after trying to run this on an existing tenant, Change set author must be "fineract" and there is an issue with a Foreing keys, could you please raise a PR for fixing the issues reported? fineract-server-1 | Caused by: liquibase.exception.MigrationFailedException: Migration failed for changeset db/changelog/tenant/parts/0231_remove_clientcharge_inactivate_permissions.xml::1::ashharahmadkhan: fineract-server-1 | Detail: La llave (id)=(678) todavía es referida desde la tabla «m_role_permission». [Failed SQL: (0) DELETE FROM public.m_permission WHERE code='INACTIVATE_CLIENTCHARGE_CHECKER'] |
|
Thanks for catching this, @IOhacker I’ll put up a follow-up PR to address both issues shortly. Appreciate you validating this on an existing tenant and reporting it. |
Description
POST /clients/{clientId}/charges/{chargeId}?command=inactivatehas thrownerror.msg.command.unsupportedon every call since August 2015 and has neverreturned a successful response in any version of Fineract or its predecessor MifosX.
The service method
inactivateCharge()was a stub returningnullfrom its veryfirst commit (
d0fd3e4a6c, August 17 2015, Vishwas Babu A J). No command handlerfor
CLIENTCHARGE|INACTIVATEwas ever registered in any commit across the fullrepository 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_sourceshowsmade_on_date=NULL,status=5— rejected before any processing began.m_client_charge.is_activewas never written. Historical record showed zeroprior 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 ifrouting branch forcommand=inactivateinClientChargesApiResourceinactivateCharge()interface method and null stub implementation inClientChargeWritePlatformServiceandClientChargeWritePlatformServiceImplinactivateClientCharge()builder method inCommandWrapperBuilderCLIENT_CHARGE_ACTION_INACTIVATEandCLIENT_CHARGE_COMMAND_INACTIVATE_CHARGEconstants fromClientApiConstants0228deletingINACTIVATE_CLIENTCHARGEandINACTIVATE_CLIENTCHARGE_CHECKERfromm_permissionbarebones_db.sqlandload_sample_data.sqlWhat this PR does NOT remove (Phase 2 decision):
isActiveandinactivationDatefrom the GET/clients/{clientId}/chargesresponse — removing these fields changes the response contract and requires a separate deprecation noticeObservable behavior change for callers:
?command=inactivate→ HTTP 400,error.msg.command.unsupported?command=inactivate→ HTTP 400,error.msg.unrecognized.paramReferences: