fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajuan <...@git.apache.org>
Subject [GitHub] incubator-fineract pull request: [MIFOSX-2310] User allowed to lea...
Date Wed, 13 Apr 2016 06:22:45 GMT
Github user rajuan commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/60#discussion_r59498209
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCriteriaDefinitionJsonDeserializer.java
---
    @@ -104,10 +104,20 @@ public void validateForCreate(final String json) {
                             .parameterAtIndexArray(ProvisioningCriteriaConstants.JSON_MINIMUM_AGE_PARAM,
i + 1).value(minimumAge).notNull()
                             .longZeroOrGreater() ;
     
    -                Long maximumAge = this.fromApiJsonHelper.extractLongNamed(ProvisioningCriteriaConstants.JSON_MAXIMUM_AGE_PARAM,
jsonObject);
    -                baseDataValidator.reset().parameter(ProvisioningCriteriaConstants.JSON_MAXIMUM_AGE_PARAM)
    -                        .parameterAtIndexArray(ProvisioningCriteriaConstants.JSON_MAXIMUM_AGE_PARAM,
i + 1).value(maximumAge).notNull()
    -                        .longGreaterThanNumber(ProvisioningCriteriaConstants.JSON_MINIMUM_AGE_PARAM,
minimumAge, (i+1));
    +
    +                //Allow Max age of "Loss Category" to be blank => Symbolises infinity//
NotNull check removed when  categoryId=4
    +                if(categoryId == 4) {
    --- End diff --
    
    Categories are user configurable. Some organisations can have 3 categories and some other
10. So such hardcoded check will not help. This solution cannot be taken as is. This solution
should be generic to allow only one nullable max age param and it doesn't violate overlap
conditions. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message