[ 
https://issues.apache.org/jira/browse/FINERACT-2978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129677#comment-18129677
 ] 

Godspower patrick commented on FINERACT-2978:
---------------------------------------------

Pull request: https://github.com/apache/fineract/pull/6708

> Global configurations accept invalid stringValue for configurations with a 
> fixed set of values
> ----------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-2978
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2978
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Godspower patrick
>            Priority: Major
>
> PUT /configurations/\{id\} only checks that {{stringValue}} is not null, so 
> any text is stored. The problem only shows up later, when the configuration 
> is used:
> * {{outstanding-interest-calculation-strategy-for-external-asset-transfer}}: 
> an unknown value throws {{UnsupportedOperationException}} during external 
> asset transfers.
> * {{next-payment-due-date}}: an unknown value makes the delinquency details 
> return no next payment date.
> * {{charge-accrual-date}}: anything other than {{submitted-date}} is silently 
> treated as {{due-date}}.
> *Steps to reproduce*
> PUT /configurations/\{id of next-payment-due-date\} with {{\{"stringValue": 
> "abc"\}}}. It returns 200 and stores "abc".
> *Expected*
> A 400 validation error on {{stringValue}} listing the allowed values. Blank 
> values (which fall back to the default) and configurations without a fixed 
> set of values should stay as they are.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to