fineract-dev mailing list archives

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

    https://github.com/apache/incubator-fineract/pull/60#discussion_r59589622
  
    --- 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 --
    
    I was also confused at this! But the requirement in the issue tracker specifically assumes
that there are only 4 categories 
    https://mifosforge.jira.com/browse/MIFOSX-2310
    
    > Currently under category we have "STANDARD", "SUB-STANDARD", "DOUBTFUL" and "LOSS"
options.  In which if the Loss is considered as the last category it would be better to set
the Max Age as Infinity (Blank)
    
    This is why I uneasily did this fix. Will think of a way to abstract his out!


---
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