FINERACT-2101: Loan product using global config values - #3951
FINERACT-2101: Loan product using global config values#3951alberto-art3ch wants to merge 1 commit into
Conversation
| public Boolean enableInstallmentLevelDelinquency; | ||
| @Schema(example = "true") | ||
| public Boolean disallowExpectedDisbursements; | ||
| @Schema(example = "false") |
There was a problem hiding this comment.
Do we need this for GetLoanCharge?
| @Column(name = "repayment_start_date_type_enum", nullable = false) | ||
| private RepaymentStartDateType repaymentStartDateType; | ||
|
|
||
| @Column(name = "use_due_repayment_global_configs", nullable = false) |
There was a problem hiding this comment.
This was not stored previously?
adamsaghy
left a comment
There was a problem hiding this comment.
FINERACT-2101: UI data required from Fineract seems unrelated story. Can you please use proper story to cover this changes?
Also, can you please explain a little further the reasoning behind introducing new field on loan product and so? I am not fully understand.
| @Schema(example = "false") | ||
| public Boolean enableInstallmentLevelDelinquency; | ||
| @Schema(example = "false") | ||
| public Boolean useDueRepaymentGlobalConfigs; |
There was a problem hiding this comment.
I would prefer the following:
- We dont have a new field that contains a boolean value to decide whether something got fetched from global configuration or not.
Instead, if we have any settings on the loan product, fetch it, if not, we read from global configuration.
User can decide whether they provide any value for it or not... Basically these field would be optional ones, and what we can do when we fetch the loan product or the loan product template, we can send back the values from the global configuration and as a hint it can be shown on the UI. After that the user can decide whether they are happy with it or wanna override it. What do you think?
@bharathc27
There was a problem hiding this comment.
This boolean attribute is to let the UI know If the products uses or not the global config values. This is because in the UI exists a checkbox to indicate this. When you are creating and select that checkbox the global values are sent to Fineract. Until this, It is ok
The problem exists when you edit a Loan Product, the UI can not to know If the values of these configurations are or not copied from the global config
This issue was reported by Peter. The UI has the logic to read the value, but If Fineract does not return any value for this, then the UI can not indicate if the configurations are or not inherit from the global configurations
There was a problem hiding this comment.
I still believe we should not have the which indicates whether it is coming from global configuration or not. I would simply leave these fields as optional and if user does not fill them, it is coming from global configurations. If user provide a value then that will be used instead of the one from global configurations. Additionally we can enhance further and return the values from global configurations and we can show it on the UI to inform the user if nothing is sent, those value will be used, but they should be different values and do not send it back to backend!
What are your thoughts?
Description
There is an issue when loan product with "enabled" state for using global config values for
dueDaysForRepaymentEventandoverDueDaysForRepaymentEventis edited, when opening edit screen, use global values checkbox is not checked, but global values are in the fields (so basically the values are ok, but this point by submitting the loan product the “use globals” will be disabledFINERACT-2101
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Write the commit message as per https://github.com/apache/fineract/#pull-requests
Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
Create/update unit or integration tests for verifying the changes made.
Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.