[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-13 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1047635664


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   Done!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2805: FINERACT-1724 - Swagger generated class name collision

2022-12-13 Thread GitBox


galovics merged PR #2805:
URL: https://github.com/apache/fineract/pull/2805


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] ruchiD opened a new pull request, #2807: FINERACT-1818-New-Parameter-Loan-Api

2022-12-13 Thread GitBox


ruchiD opened a new pull request, #2807:
URL: https://github.com/apache/fineract/pull/2807

   ## Description
   Fix for loan transaction summary when no association parameters given for 
loan retrieve api.
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-13 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1047148112


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   Please undo the changes you done in the `LoanAccountData` and **only** 
change the `clientExternalId` as i asked.  Please do not change the loan 
externalid as it was not part of this story and we will conflict.
   
   You have modified the `externalId` field which should have been left AS-IS, 
it's part of my story to change that and you havent changed the 
`clientExternalId` which was part of your story. Please undo these latest 
changes and change only the `clientExternalId` field in the `LoanAccountData`
   
   @josehernandezfintecheandomx is that okay?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-13 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1047148112


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   Please undo the changes you done in the `LoanAccountData` and **only** 
change the `clientExternalId` as i asked.  Please do not change the loan 
externalid as it was not part of this story and we will conflict.
   
   You have modified the `externalId` field which should have been left AS-IS, 
it's part of my story to change that and you not changed the `clientExternalId` 
which should be part of your story. Please undo these latest changes and change 
only the `clientExternalId` field in the `LoanAccountData`
   
   @josehernandezfintecheandomx is that okay?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-13 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1047148112


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   Please undo the changes you done in the `LoanAccountData` and **only** 
change the `clientExternalId` as i asked.  Please do not change the loan 
externalid as it was not part of this story and we will conflict.
   
   You have modified the `externalId` field which should leave AS-IS, it's part 
of my story to change that and you not changed the `clientExternalId` which 
should be part of your story. Please undo these latest changes and change only 
the `clientExternalId` field in the `LoanAccountData`
   
   @josehernandezfintecheandomx is that okay?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-13 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1047148112


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   Please undo the changes you done in the `LoanAccountData` and only change 
the `clientExternalId` as i asked.  Please do not change the loan externalid as 
it was not part of this story and we will conflict.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-13 Thread GitBox


galovics merged PR #2797:
URL: https://github.com/apache/fineract/pull/2797


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2806: chore(deps): bump actions/checkout from 3.1.0 to 3.2.0

2022-12-13 Thread GitBox


galovics merged PR #2806:
URL: https://github.com/apache/fineract/pull/2806


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] dependabot[bot] opened a new pull request, #2806: chore(deps): bump actions/checkout from 3.1.0 to 3.2.0

2022-12-12 Thread GitBox


dependabot[bot] opened a new pull request, #2806:
URL: https://github.com/apache/fineract/pull/2806

   Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 
3.2.0.
   
   Release notes
   Sourced from https://github.com/actions/checkout/releases;>actions/checkout's 
releases.
   
   v3.2.0
   What's Changed
   
   Add GitHub Action to perform release by https://github.com/rentziass;>@​rentziass in https://github-redirect.dependabot.com/actions/checkout/pull/942;>actions/checkout#942
   Fix status badge by https://github.com/ScottBrenner;>@​ScottBrenner in https://github-redirect.dependabot.com/actions/checkout/pull/967;>actions/checkout#967
   Replace datadog/squid with ubuntu/squid Docker image by https://github.com/cory-miller;>@​cory-miller in https://github-redirect.dependabot.com/actions/checkout/pull/1002;>actions/checkout#1002
   Wrap pipeline commands for submoduleForeach in quotes by https://github.com/jokreliable;>@​jokreliable in https://github-redirect.dependabot.com/actions/checkout/pull/964;>actions/checkout#964
   Update @​actions/io to 1.1.2 by https://github.com/cory-miller;>@​cory-miller in https://github-redirect.dependabot.com/actions/checkout/pull/1029;>actions/checkout#1029
   Upgrading version to 3.2.0 by https://github.com/vmjoseph;>@​vmjoseph in https://github-redirect.dependabot.com/actions/checkout/pull/1039;>actions/checkout#1039
   
   New Contributors
   
   https://github.com/ScottBrenner;>@​ScottBrenner made 
their first contribution in https://github-redirect.dependabot.com/actions/checkout/pull/967;>actions/checkout#967
   https://github.com/cory-miller;>@​cory-miller 
made their first contribution in https://github-redirect.dependabot.com/actions/checkout/pull/1002;>actions/checkout#1002
   https://github.com/jokreliable;>@​jokreliable 
made their first contribution in https://github-redirect.dependabot.com/actions/checkout/pull/964;>actions/checkout#964
   https://github.com/vmjoseph;>@​vmjoseph made 
their first contribution in https://github-redirect.dependabot.com/actions/checkout/pull/1039;>actions/checkout#1039
   
   Full Changelog: https://github.com/actions/checkout/compare/v3...v3.2.0;>https://github.com/actions/checkout/compare/v3...v3.2.0
   
   
   
   Commits
   
   https://github.com/actions/checkout/commit/755da8c3cf115ac066823e79a1e1788f8940201b;>755da8c
 3.2.0 (https://github-redirect.dependabot.com/actions/checkout/issues/1039;>#1039)
   https://github.com/actions/checkout/commit/26d48e8ea150211a9bc3b1f0c20448599687d926;>26d48e8
 Update @​actions/io to 1.1.2 (https://github-redirect.dependabot.com/actions/checkout/issues/1029;>#1029)
   https://github.com/actions/checkout/commit/bf085276cecdb0cc76fbbe0687a5a0e786646936;>bf08527
 wrap pipeline commands for submoduleForeach in quotes (https://github-redirect.dependabot.com/actions/checkout/issues/964;>#964)
   https://github.com/actions/checkout/commit/5c3ccc22eb2c950a0fa5bc7c47190d8e3f7e681a;>5c3ccc2
 Replace datadog/squid with ubuntu/squid Docker image (https://github-redirect.dependabot.com/actions/checkout/issues/1002;>#1002)
   https://github.com/actions/checkout/commit/1f9a0c22da41e6ebfa534300ef656657ea2c6707;>1f9a0c2
 README - fix status badge (https://github-redirect.dependabot.com/actions/checkout/issues/967;>#967)
   https://github.com/actions/checkout/commit/8230315d06ad95c617244d2f265d237a1682d445;>8230315
 Add workflow to update a main version (https://github-redirect.dependabot.com/actions/checkout/issues/942;>#942)
   See full diff in https://github.com/actions/checkout/compare/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8...755da8c3cf115ac066823e79a1e1788f8940201b;>compare
 view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout=github_actions=3.1.0=3.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046644809


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   Well, It can be implemented in different ways. This one was used for the 
Fees in the previous change and now is the same code in the Penalties method. 
Plus the logic for validating the dates was reusing the same functions.
   
   Based on that, I've updated the code as you suggest and I've removed the 
code added in the previous change that is not more needed. @adamsaghy 
   
   https://user-images.githubusercontent.com/44206706/207225728-23cab1e3-898b-4e8e-baf6-0892d6344d6b.png;>
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046644809


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   Well, It can be implemented in different ways. This one was used for the 
Fees in the previous change and now is the same code in the Penalties method. 
Plus the logic for validating the dates was reusing the same functions.
   
   Based on that, I've updated the code as you suggest and I've removed the 
code added in the previous change that is not more needed. @adamsaghy 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] github-actions[bot] closed pull request #2578: FINERACT-1732: Introduce Lombok to bulkimport module

2022-12-12 Thread GitBox


github-actions[bot] closed pull request #2578: FINERACT-1732: Introduce Lombok 
to bulkimport module
URL: https://github.com/apache/fineract/pull/2578


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] github-actions[bot] closed pull request #2591: FINERACT-1742: Introduce Lombok to dataqueries module

2022-12-12 Thread GitBox


github-actions[bot] closed pull request #2591: FINERACT-1742: Introduce Lombok 
to dataqueries module
URL: https://github.com/apache/fineract/pull/2591


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] b0c1 opened a new pull request, #2805: FINERACT-1724

2022-12-12 Thread GitBox


b0c1 opened a new pull request, #2805:
URL: https://github.com/apache/fineract/pull/2805

   FINERACT-1724
   - [x] Swagger `Changes` class name collision.
   
   ## Description
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request 
- thanks!
   
   - [x] Write the commit message as per 
https://github.com/apache/fineract/#pull-requests
   
   - [x] 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.
   
   - [x] Create/update unit or integration tests for verifying the changes made.
   
   - [x] Follow coding conventions at 
https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   
   - [x] 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
   
   - [x] 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


adamsaghy commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046294626


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   I would rather do this:
   - If this is the first period
   AND
   - first period startdate == loanCharge due date
   
   I dont think your approach is wrong, but its harder to understand. 
`loanCharge.isDueForCollectionFromIncludingAndUpToAndIncluding` is hard to 
understand what it is doing.
   
   Also this special case is only to handle when the charge due date is equals 
with first instalment start date. We dont necessarily need to check from - to, 
inclusive / including stuffs... only whether they are equals or not...
   @josehernandezfintecheandomx what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


adamsaghy commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046294626


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   I would rather do this:
   - If this is the first period
   AND
   - first period startdate == loanCharge due date
   
   I dont think your approach is wrong, but its harder to understand. 
`loanCharge.isDueForCollectionFromIncludingAndUpToAndIncluding` is hard to 
understand what it is doing.
   
   Also this special case is only to handle when the charge due date is equals 
with first instalment start date. We dont necessarily need to check from - to, 
inclusive / including stuffs... only whether it is equals or not...
   @josehernandezfintecheandomx what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


adamsaghy commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046294626


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   I would rather do this:
   - If this is the first period
   AND
   - first period startdate == loanCharge due date
   
   I dont think your approach is wrong, but its harder to understand. 
`loanCharge.isDueForCollectionFromIncludingAndUpToAndIncluding` is hard to 
understand what it is doing.
   
   Also this special case is only when the charge due date is equals with first 
instalment start date. 
   @josehernandezfintecheandomx what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


adamsaghy commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046294626


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   I would rather do this:
   - If this is the first period
   AND
   - first period startdate == loanCharge due date
   
   I dont think it is wrong your approach, but i feel not straightforward to do 
this `loanCharge.isDueForCollectionFromIncludingAndUpToAndIncluding` which is 
hard to understand what it is doing.
   
   Also this special case is only when the charge due date is equals with first 
instalment start date. 
   @josehernandezfintecheandomx what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


adamsaghy commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046272829


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   i dont think this newly added branch will ever be executed.
   
   the condition in line 214 will always be true before it could reach the new 
branch in line 217.
   Also both of them do exactly the same thing. 
   @josehernandezfintecheandomx could you advise on this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1046234696


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1046086290


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -545,90 +543,77 @@ public ClientData mapRow(final ResultSet rs, final int 
rowNum) throws SQLExcepti
 }
 }
 
-@Override
-public Collection retrieveActiveClientMembersOfCenter(final 
Long centerId) {
-
-final AppUser currentUser = this.context.authenticatedUser();
-final String hierarchy = currentUser.getOffice().getHierarchy();
-final String hierarchySearchString = hierarchy + "%";
-
-final String sql = "select " + this.membersOfGroupMapper.schema()
-+ " left join m_group g on pgc.group_id=g.id where o.hierarchy 
like ? and g.parent_id = ? and c.status_enum = ? group by c.id";
-
-return this.jdbcTemplate.query(sql, this.membersOfGroupMapper, // 
NOSONAR
-hierarchySearchString, centerId, 
ClientStatus.ACTIVE.getValue());
-}
-
-private static final class ClientMapper implements RowMapper {
+private static final class ClientMembersOfGroupMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMapper() {
-final StringBuilder builder = new StringBuilder(400);
+ClientMembersOfGroupMapper() {
+final StringBuilder sqlBuilder = new StringBuilder(200);

Review Comment:
   The variable never was renamed, Please take a look of the next screenshot to 
you can see the git diff is getting that difference...
   
   https://user-images.githubusercontent.com/44206706/207104159-1d323868-6f99-4f3c-a1f6-ad2def054f02.png;>
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1046085648


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {
+
+String sqlSearch = searchParameters.getSqlSearch();
+final Long officeId = searchParameters.getOfficeId();
+final String externalId = searchParameters.getExternalId();
+final String displayName = searchParameters.getName();
+final String firstname = searchParameters.getFirstname();
+final String lastname = searchParameters.getLastname();
+final String status = searchParameters.getStatus();
+
+String extraCriteria = "";
+if (sqlSearch != null) {
+sqlSearch = sqlSearch.replaceAll(" display_name ", " 
c.display_name ");
+sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name 
");
+extraCriteria = " and (" + sqlSearch + ")";
+this.columnValidator.validateSqlInjection(schemaSql, sqlSearch);
+}
+
+if (officeId != null) {
+extraCriteria += " and c.office_id = ? ";
+paramList.add(officeId);
+}
+
+if (externalId != null) {
+paramList.add(externalId);
+extraCriteria += " and c.external_id like ? ";
+}
+
+if (displayName != null) {
+// extraCriteria += " and concatcoalesce(c.firstname, ''),
+// if(c.firstname > '',' ', '') , coalesce(c.lastname, '')) like "
+paramList.add("%" + displayName + "%");
+extraCriteria += " and c.display_name like ? ";
+}
+
+if (status != null) {
+ClientStatus clientStatus = ClientStatus.fromString(status);
+extraCriteria += " and c.status_enum = " + 
clientStatus.getValue().toString() + " ";
+}
+
+if (firstname != null) {
+paramList.add(firstname);
+extraCriteria += " and c.firstname like ? ";
+}
+
+if (lastname != null) {
+paramList.add(lastname);
+extraCriteria += " and c.lastname like ? ";
+}
+
+if (searchParameters.isScopedByOfficeHierarchy()) {
+paramList.add(searchParameters.getHierarchy() + "%");
+extraCriteria += " and o.hierarchy like ? ";
+}
+
+if (searchParameters.isOrphansOnly()) {
+extraCriteria += " and c.id NOT IN (select client_id from 
m_group_client) ";
+}
+
+if (StringUtils.isNotBlank(extraCriteria)) {
+extraCriteria = extraCriteria.substring(4);
+}
+return extraCriteria;
+}
+
+private static final class ClientToDataMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMembersOfGroupMapper() {
-final StringBuilder sqlBuilder = new StringBuilder(200);
+ClientToDataMapper() {
+final StringBuilder builder = new StringBuilder(400);

Review Comment:
   The variable never was renamed, Please take a look of the next screenshot to 
you can see the git diff is getting that difference...
   
   https://user-images.githubusercontent.com/44206706/207104028-b577942c-e156-4483-886a-8aa219246d57.png;>
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046080521


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeSpecificDueDateTest.java:
##
@@ -110,7 +110,60 @@ public void 
testApplyLoanSpecificDueDateChargeWithDisbursementDate() {
 
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 assertNotNull(getLoansLoanIdResponse);
-validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"));
+validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"), false);
+
+}
+
+@Test
+public void testApplyLoanSpecificDueDatePenaltyWithDisbursementDate() {
+
+final LocalDate todaysDate = Utils.getLocalDateOfTenant();
+
+// Client and Loan account creation
+final Integer clientId = ClientHelper.createClient(this.requestSpec, 
this.responseSpec, "01 January 2012");
+final GetLoanProductsProductIdResponse getLoanProductsProductResponse 
= createLoanProduct(loanTransactionHelper, null);
+assertNotNull(getLoanProductsProductResponse);
+
+// Older date to have more than one overdue installment
+LocalDate transactionDate = todaysDate;
+String operationDate = Utils.dateFormatter.format(transactionDate);
+log.info("Operation date {}", transactionDate);
+
+// Create Loan Account
+final Integer loanId = createLoanAccount(loanTransactionHelper, 
clientId.toString(),
+getLoanProductsProductResponse.getId().toString(), 
operationDate);
+
+// Get loan details
+GetLoansLoanIdResponse getLoansLoanIdResponse = 
loanTransactionHelper.getLoan(requestSpec, responseSpec, loanId);
+validateLoanAccount(getLoansLoanIdResponse, 
Double.valueOf(principalAmount), Double.valueOf("0.00"), true);
+
+// Apply Loan Charge with specific due date
+
+final String feeAmount = "10.00";
+String payloadJSON = 
ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT,
 feeAmount, true);
+final PostChargesResponse postChargesResponse = 
ChargesHelper.createLoanCharge(requestSpec, responseSpec, payloadJSON);
+assertNotNull(postChargesResponse);
+final Long loanChargeId = postChargesResponse.getResourceId();
+
+payloadJSON = 
LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(loanChargeId.toString(),
 operationDate, feeAmount);
+PostLoansLoanIdChargesResponse postLoansLoanIdChargesResponse = 
loanTransactionHelper.addChargeForLoan(loanId, payloadJSON,
+responseSpec);
+assertNotNull(postLoansLoanIdChargesResponse);
+
+// Get loan details expecting to have a delinquency classification
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+validateLoanAccount(getLoansLoanIdResponse, 
Double.valueOf(principalAmount), Double.valueOf("10.00"), true);
+
+// Make a full repayment to close the Loan
+Float amount = Float.valueOf("1010.00");
+PostLoansLoanIdTransactionsResponse loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, amount,
+loanId);
+assertNotNull(loanIdTransactionsResponse);
+log.info("Loan Transaction Id: {} {}", loanId, 
loanIdTransactionsResponse.getResourceId());
+
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertNotNull(getLoansLoanIdResponse);
+validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"), true);

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046064916


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanTransactionHelper.java:
##
@@ -1563,6 +1563,14 @@ public void 
validateLoanFeesOustandingBalance(GetLoansLoanIdResponse getLoansLoa
 }
 }
 
+public void validateLoanPenaltiesOustandingBalance(GetLoansLoanIdResponse 
getLoansLoanIdResponse, Double amountExpected) {
+GetLoansLoanIdSummary getLoansLoanIdSummary = 
getLoansLoanIdResponse.getSummary();
+if (getLoansLoanIdSummary != null) {

Review Comment:
   This is not the main assertion pf this method, that is below, but anyway, It 
is updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046060125


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   This is a special case or requirement for the first installment, the other 
installments must to be in the other if



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1046058356


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeSpecificDueDateTest.java:
##
@@ -110,7 +110,60 @@ public void 
testApplyLoanSpecificDueDateChargeWithDisbursementDate() {
 
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 assertNotNull(getLoansLoanIdResponse);
-validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"));
+validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"), false);
+
+}
+
+@Test
+public void testApplyLoanSpecificDueDatePenaltyWithDisbursementDate() {
+
+final LocalDate todaysDate = Utils.getLocalDateOfTenant();
+
+// Client and Loan account creation
+final Integer clientId = ClientHelper.createClient(this.requestSpec, 
this.responseSpec, "01 January 2012");
+final GetLoanProductsProductIdResponse getLoanProductsProductResponse 
= createLoanProduct(loanTransactionHelper, null);
+assertNotNull(getLoanProductsProductResponse);
+
+// Older date to have more than one overdue installment
+LocalDate transactionDate = todaysDate;
+String operationDate = Utils.dateFormatter.format(transactionDate);
+log.info("Operation date {}", transactionDate);
+
+// Create Loan Account
+final Integer loanId = createLoanAccount(loanTransactionHelper, 
clientId.toString(),
+getLoanProductsProductResponse.getId().toString(), 
operationDate);
+
+// Get loan details
+GetLoansLoanIdResponse getLoansLoanIdResponse = 
loanTransactionHelper.getLoan(requestSpec, responseSpec, loanId);
+validateLoanAccount(getLoansLoanIdResponse, 
Double.valueOf(principalAmount), Double.valueOf("0.00"), true);
+
+// Apply Loan Charge with specific due date
+
+final String feeAmount = "10.00";
+String payloadJSON = 
ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT,
 feeAmount, true);
+final PostChargesResponse postChargesResponse = 
ChargesHelper.createLoanCharge(requestSpec, responseSpec, payloadJSON);
+assertNotNull(postChargesResponse);
+final Long loanChargeId = postChargesResponse.getResourceId();

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] b0c1 commented on a diff in pull request #2795: FINERACT-1744 - Batch API Support

2022-12-12 Thread GitBox


b0c1 commented on code in PR #2795:
URL: https://github.com/apache/fineract/pull/2795#discussion_r1045987299


##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java:
##
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.core.domain;
+
+import java.util.Optional;
+import javax.servlet.http.HttpServletRequest;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+public final class FineractRequestContextHolder {
+
+private FineractRequestContextHolder() {}
+
+public static Object getAttribute(String key) {
+return getAttribute(key, null);
+}
+
+public static Object getAttribute(String key, HttpServletRequest request) {
+if (isBatchRequest()) {
+return 
Optional.ofNullable(BatchRequestContextHolder.getRequestAttributes()).map(attributes
 -> attributes.get(key))
+.orElse(null);
+} else if (request != null) {

Review Comment:
   Removed, BatchRequestContextHolder moved into FineractRequestContextHolder



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2798: FINERACT-1760-Index-or-Unique-column-creation-datatables

2022-12-12 Thread GitBox


galovics merged PR #2798:
URL: https://github.com/apache/fineract/pull/2798


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics commented on a diff in pull request #2798: FINERACT-1760-Index-or-Unique-column-creation-datatables

2022-12-12 Thread GitBox


galovics commented on code in PR #2798:
URL: https://github.com/apache/fineract/pull/2798#discussion_r1045939862


##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java:
##
@@ -871,6 +884,24 @@ public CommandProcessingResult createDatatable(final 
JsonCommand command) {
 return new 
CommandProcessingResultBuilder().withCommandId(command.commandId()).withResourceIdAsString(datatableName).build();
 }
 
+private void createIndexesForTable(String datatableName, JsonArray 
columns) {
+for (final JsonElement column : columns) {
+createIndexForColumn(datatableName, column.getAsJsonObject());
+}
+}
+
+private void createIndexForColumn(String datatableName, JsonObject column) 
{
+String name = column.has("name") ? column.get("name").getAsString() : 
null;
+final Boolean unique = column.has("unique") ? 
column.get("unique").getAsBoolean() : false;
+final Boolean indexed = column.has("indexed") ? 
column.get("indexed").getAsBoolean() : false;
+if (indexed) {
+if (!unique) {

Review Comment:
   Yeah, right.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-12 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1045871843


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java:
##
@@ -1485,7 +1486,7 @@ public LoanAccountData 
retrieveClientDetailsTemplate(final Long clientId) {
 final LocalDate expectedDisbursementDate = 
DateUtils.getBusinessLocalDate();
 
 return LoanAccountData.clientDefaults(clientAccount.getId(), 
clientAccount.getAccountNo(), clientAccount.getDisplayName(),
-clientAccount.getOfficeId(), clientAccount.getExternalId(), 
expectedDisbursementDate);
+clientAccount.getOfficeId(), 
clientAccount.getExternalId().getValue(), expectedDisbursementDate);

Review Comment:
   @josehernandezfintecheandomx 
   Please use the ExternalId object here and modify the 
`LoanAccountData.clientExternalId` to be ExternalId type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2801: chore(deps): update actions/stale action to v6

2022-12-12 Thread GitBox


galovics merged PR #2801:
URL: https://github.com/apache/fineract/pull/2801


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-12 Thread GitBox


galovics commented on code in PR #2797:
URL: https://github.com/apache/fineract/pull/2797#discussion_r1045560791


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final 
LocalDate periodStart, fin
 cumulative = cumulative.plus(loanChargeAmt);
 } else if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
 cumulative = cumulative.plus(loanCharge.amount());
+// Special case for Loan Charges (Due Date) added the same 
disbursement date
+} else if (period.isFirstPeriod()

Review Comment:
   Why don't we check directly whether the charge is due on disbursement date? 
This condition is kinda confusing to me and probably to you too, that's why you 
put the comment there.
   
   Let's make it crystal clear, loan charge on disbursement date.



##
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeSpecificDueDateTest.java:
##
@@ -110,7 +110,60 @@ public void 
testApplyLoanSpecificDueDateChargeWithDisbursementDate() {
 
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 assertNotNull(getLoansLoanIdResponse);
-validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"));
+validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"), false);
+
+}
+
+@Test
+public void testApplyLoanSpecificDueDatePenaltyWithDisbursementDate() {
+
+final LocalDate todaysDate = Utils.getLocalDateOfTenant();
+
+// Client and Loan account creation
+final Integer clientId = ClientHelper.createClient(this.requestSpec, 
this.responseSpec, "01 January 2012");
+final GetLoanProductsProductIdResponse getLoanProductsProductResponse 
= createLoanProduct(loanTransactionHelper, null);
+assertNotNull(getLoanProductsProductResponse);
+
+// Older date to have more than one overdue installment
+LocalDate transactionDate = todaysDate;
+String operationDate = Utils.dateFormatter.format(transactionDate);
+log.info("Operation date {}", transactionDate);
+
+// Create Loan Account
+final Integer loanId = createLoanAccount(loanTransactionHelper, 
clientId.toString(),
+getLoanProductsProductResponse.getId().toString(), 
operationDate);
+
+// Get loan details
+GetLoansLoanIdResponse getLoansLoanIdResponse = 
loanTransactionHelper.getLoan(requestSpec, responseSpec, loanId);
+validateLoanAccount(getLoansLoanIdResponse, 
Double.valueOf(principalAmount), Double.valueOf("0.00"), true);
+
+// Apply Loan Charge with specific due date
+
+final String feeAmount = "10.00";
+String payloadJSON = 
ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT,
 feeAmount, true);
+final PostChargesResponse postChargesResponse = 
ChargesHelper.createLoanCharge(requestSpec, responseSpec, payloadJSON);
+assertNotNull(postChargesResponse);
+final Long loanChargeId = postChargesResponse.getResourceId();

Review Comment:
   Let's assert that the resourceId is not null.



##
integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanTransactionHelper.java:
##
@@ -1563,6 +1563,14 @@ public void 
validateLoanFeesOustandingBalance(GetLoansLoanIdResponse getLoansLoa
 }
 }
 
+public void validateLoanPenaltiesOustandingBalance(GetLoansLoanIdResponse 
getLoansLoanIdResponse, Double amountExpected) {
+GetLoansLoanIdSummary getLoansLoanIdSummary = 
getLoansLoanIdResponse.getSummary();
+if (getLoansLoanIdSummary != null) {

Review Comment:
   Having a null-check here and in general within tests is a really really bad 
pattern cause it could prevent assertions from being evaluation therefore 
making the tests pass.



##
integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeSpecificDueDateTest.java:
##
@@ -110,7 +110,60 @@ public void 
testApplyLoanSpecificDueDateChargeWithDisbursementDate() {
 
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 assertNotNull(getLoansLoanIdResponse);
-validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"));
+validateLoanAccount(getLoansLoanIdResponse, Double.valueOf("0.00"), 
Double.valueOf("0.00"), false);
+
+}
+
+@Test
+public void testApplyLoanSpecificDueDatePenaltyWithDisbursementDate() {
+
+final LocalDate todaysDate = Utils.getLocalDateOfTenant();
+
+// Client and Loan account creation
+final Integer clientId = 

[GitHub] [fineract] galovics commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-12 Thread GitBox


galovics commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1045521379


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {
+
+String sqlSearch = searchParameters.getSqlSearch();
+final Long officeId = searchParameters.getOfficeId();
+final String externalId = searchParameters.getExternalId();
+final String displayName = searchParameters.getName();
+final String firstname = searchParameters.getFirstname();
+final String lastname = searchParameters.getLastname();
+final String status = searchParameters.getStatus();
+
+String extraCriteria = "";
+if (sqlSearch != null) {
+sqlSearch = sqlSearch.replaceAll(" display_name ", " 
c.display_name ");
+sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name 
");
+extraCriteria = " and (" + sqlSearch + ")";
+this.columnValidator.validateSqlInjection(schemaSql, sqlSearch);
+}
+
+if (officeId != null) {
+extraCriteria += " and c.office_id = ? ";
+paramList.add(officeId);
+}
+
+if (externalId != null) {
+paramList.add(externalId);
+extraCriteria += " and c.external_id like ? ";
+}
+
+if (displayName != null) {
+// extraCriteria += " and concatcoalesce(c.firstname, ''),
+// if(c.firstname > '',' ', '') , coalesce(c.lastname, '')) like "
+paramList.add("%" + displayName + "%");
+extraCriteria += " and c.display_name like ? ";
+}
+
+if (status != null) {
+ClientStatus clientStatus = ClientStatus.fromString(status);
+extraCriteria += " and c.status_enum = " + 
clientStatus.getValue().toString() + " ";
+}
+
+if (firstname != null) {
+paramList.add(firstname);
+extraCriteria += " and c.firstname like ? ";
+}
+
+if (lastname != null) {
+paramList.add(lastname);
+extraCriteria += " and c.lastname like ? ";
+}
+
+if (searchParameters.isScopedByOfficeHierarchy()) {
+paramList.add(searchParameters.getHierarchy() + "%");
+extraCriteria += " and o.hierarchy like ? ";
+}
+
+if (searchParameters.isOrphansOnly()) {
+extraCriteria += " and c.id NOT IN (select client_id from 
m_group_client) ";
+}
+
+if (StringUtils.isNotBlank(extraCriteria)) {
+extraCriteria = extraCriteria.substring(4);
+}
+return extraCriteria;
+}
+
+private static final class ClientToDataMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMembersOfGroupMapper() {
-final StringBuilder sqlBuilder = new StringBuilder(200);
+ClientToDataMapper() {
+final StringBuilder builder = new StringBuilder(400);

Review Comment:
   The variable was renamed. Please undo it.



##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {

Review Comment:
   I never said this was renamed. The method was reordered within the class. 
Please put it back.



##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -732,6 +718,20 @@ public ClientData mapRow(final ResultSet rs, final int 
rowNum) throws SQLExcepti
 }
 }
 
+@Override
+public Collection retrieveActiveClientMembersOfCenter(final 
Long centerId) {

Review Comment:
   It's been reordered, please undo it.



##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String 

[GitHub] [fineract] ruchiD commented on a diff in pull request #2798: FINERACT-1760-Index-or-Unique-column-creation-datatables

2022-12-12 Thread GitBox


ruchiD commented on code in PR #2798:
URL: https://github.com/apache/fineract/pull/2798#discussion_r1045507415


##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java:
##
@@ -871,6 +884,24 @@ public CommandProcessingResult createDatatable(final 
JsonCommand command) {
 return new 
CommandProcessingResultBuilder().withCommandId(command.commandId()).withResourceIdAsString(datatableName).build();
 }
 
+private void createIndexesForTable(String datatableName, JsonArray 
columns) {
+for (final JsonElement column : columns) {
+createIndexForColumn(datatableName, column.getAsJsonObject());
+}
+}
+
+private void createIndexForColumn(String datatableName, JsonObject column) 
{
+String name = column.has("name") ? column.get("name").getAsString() : 
null;
+final Boolean unique = column.has("unique") ? 
column.get("unique").getAsBoolean() : false;
+final Boolean indexed = column.has("indexed") ? 
column.get("indexed").getAsBoolean() : false;
+if (indexed) {
+if (!unique) {

Review Comment:
   When unique constraint is added on a column, an index is created by database 
with the same name as unique constraint name. so no need to create index 
separately.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics commented on a diff in pull request #2798: FINERACT-1760-Index-or-Unique-column-creation-datatables

2022-12-12 Thread GitBox


galovics commented on code in PR #2798:
URL: https://github.com/apache/fineract/pull/2798#discussion_r1045499016


##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseQueryService.java:
##
@@ -29,4 +29,6 @@ public interface DatabaseQueryService {
 
 // TODO: This needs to be improved to have a custom POJO return type 
instead of the raw SqlRowSet
 SqlRowSet getTableColumns(DataSource dataSource, String tableName);
+
+SqlRowSet getTableIndexes(DataSource dataSource, String tableName);

Review Comment:
   As I originally wrote in the comment above, a POJO/DTO return type would be 
better here instead of a plain SqlRowSet.
   
   @ruchiD do you think you could change at least the new method 
(getTableIndexes)?



##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java:
##
@@ -238,12 +244,36 @@ public List 
fillResultsetColumnHeaders(final String d
 }
 
 columnHeaders.add(ResultsetColumnHeaderData.detailed(columnName, 
columnType, columnLength, columnNullable, columnIsPrimaryKey,
-columnValues, codeName));
+columnValues, codeName, columnIsUnique, columnIsIndexed));
 }
 
 return columnHeaders;
 }
 
+private boolean checkUniqueOrIndexed(String datatable, String columnName, 
SqlRowSet indexDefinitions, Boolean isUnique) {
+String keyNameToCheck = "uk_" + datatable + "_" + columnName;
+if (!isUnique) {

Review Comment:
   Can't we create 2 separate methods, one for checking whether a column is 
unique and another one for checking whether its indexed?
   Would be much more cleaner and responsibilities wouldn't mix.



##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java:
##
@@ -871,6 +884,24 @@ public CommandProcessingResult createDatatable(final 
JsonCommand command) {
 return new 
CommandProcessingResultBuilder().withCommandId(command.commandId()).withResourceIdAsString(datatableName).build();
 }
 
+private void createIndexesForTable(String datatableName, JsonArray 
columns) {
+for (final JsonElement column : columns) {
+createIndexForColumn(datatableName, column.getAsJsonObject());
+}
+}
+
+private void createIndexForColumn(String datatableName, JsonObject column) 
{
+String name = column.has("name") ? column.get("name").getAsString() : 
null;
+final Boolean unique = column.has("unique") ? 
column.get("unique").getAsBoolean() : false;
+final Boolean indexed = column.has("indexed") ? 
column.get("indexed").getAsBoolean() : false;
+if (indexed) {
+if (!unique) {

Review Comment:
   Can you pls explain why we don't create the index if the column is also 
marked as unique? Thanks.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics commented on a diff in pull request #2795: FINERACT-1744 - Batch API Support

2022-12-11 Thread GitBox


galovics commented on code in PR #2795:
URL: https://github.com/apache/fineract/pull/2795#discussion_r1045277210


##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java:
##
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.core.domain;
+
+import java.util.Optional;
+import javax.servlet.http.HttpServletRequest;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+public final class FineractRequestContextHolder {
+
+private FineractRequestContextHolder() {}
+
+public static Object getAttribute(String key) {

Review Comment:
   Instead of making this static, it could simply be a Spring bean and that'll 
also increase the testability of the code where used.



##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchCallHandler.java:
##
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.core.filters;
+
+import java.util.List;
+import java.util.function.BiFunction;
+import javax.ws.rs.core.UriInfo;
+import lombok.RequiredArgsConstructor;
+import org.apache.fineract.batch.domain.BatchRequest;
+import org.apache.fineract.batch.domain.BatchResponse;
+
+@RequiredArgsConstructor
+public class BatchCallHandler implements BatchFilterChain {
+
+private final List filters;
+
+private final BiFunction lastElement;

Review Comment:
   Let's call this something like `serviceCall` or something more meaningful.



##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java:
##
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.core.domain;
+
+import java.util.Optional;
+import javax.servlet.http.HttpServletRequest;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+public final class FineractRequestContextHolder {
+
+private FineractRequestContextHolder() {}
+
+public static Object getAttribute(String key) {
+return getAttribute(key, null);
+}
+
+public static Object getAttribute(String key, HttpServletRequest request) {
+if (isBatchRequest()) {
+return 
Optional.ofNullable(BatchRequestContextHolder.getRequestAttributes()).map(attributes
 -> attributes.get(key))
+.orElse(null);
+} else if (request != null) {

Review 

[GitHub] [fineract] renovate-bot opened a new pull request, #2804: chore(deps): update dependency org.slf4j:jul-to-slf4j to v2

2022-12-11 Thread GitBox


renovate-bot opened a new pull request, #2804:
URL: https://github.com/apache/fineract/pull/2804

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Change | Age | Adoption | Passing | Confidence |
   |---|---|---|---|---|---|
   | [org.slf4j:jul-to-slf4j](http://www.slf4j.org) 
([source](https://togithub.com/qos-ch/slf4j)) | `1.7.36` -> `2.0.5` | 
[![age](https://badges.renovateapi.com/packages/maven/org.slf4j:jul-to-slf4j/2.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/org.slf4j:jul-to-slf4j/2.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/org.slf4j:jul-to-slf4j/2.0.5/compatibility-slim/1.7.36)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/org.slf4j:jul-to-slf4j/2.0.5/confidence-slim/1.7.36)](https://docs.renovatebot.com/merge-confidence/)
 |
   
   ---
   
   ### ⚠ Dependency Lookup Warnings ⚠
   
   Warnings were logged while processing this repo. Please check the Dependency 
Dashboard for more information.
   
   ---
   
   ### Configuration
   
    **Schedule**: Branch creation - "before 3am on Monday" (UTC), Automerge - 
At any time (no schedule defined).
   
    **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
checkbox.
   
    **Ignore**: Close this PR and you won't be reminded about this update 
again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [Mend 
Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository 
job log [here](https://app.renovatebot.com/dashboard#github/apache/fineract).
   

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] renovate-bot opened a new pull request, #2803: chore(deps): update dependency org.slf4j:jcl-over-slf4j to v2

2022-12-11 Thread GitBox


renovate-bot opened a new pull request, #2803:
URL: https://github.com/apache/fineract/pull/2803

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Change | Age | Adoption | Passing | Confidence |
   |---|---|---|---|---|---|
   | [org.slf4j:jcl-over-slf4j](http://www.slf4j.org) 
([source](https://togithub.com/qos-ch/slf4j)) | `1.7.36` -> `2.0.5` | 
[![age](https://badges.renovateapi.com/packages/maven/org.slf4j:jcl-over-slf4j/2.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/org.slf4j:jcl-over-slf4j/2.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/org.slf4j:jcl-over-slf4j/2.0.5/compatibility-slim/1.7.36)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/org.slf4j:jcl-over-slf4j/2.0.5/confidence-slim/1.7.36)](https://docs.renovatebot.com/merge-confidence/)
 |
   
   ---
   
   ### ⚠ Dependency Lookup Warnings ⚠
   
   Warnings were logged while processing this repo. Please check the Dependency 
Dashboard for more information.
   
   ---
   
   ### Configuration
   
    **Schedule**: Branch creation - "before 3am on Monday" (UTC), Automerge - 
At any time (no schedule defined).
   
    **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
checkbox.
   
    **Ignore**: Close this PR and you won't be reminded about this update 
again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [Mend 
Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository 
job log [here](https://app.renovatebot.com/dashboard#github/apache/fineract).
   

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] renovate-bot opened a new pull request, #2802: chore(deps): update dependency io.github.resilience4j:resilience4j-spring-boot2 to v2

2022-12-11 Thread GitBox


renovate-bot opened a new pull request, #2802:
URL: https://github.com/apache/fineract/pull/2802

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Change | Age | Adoption | Passing | Confidence |
   |---|---|---|---|---|---|
   | 
[io.github.resilience4j:resilience4j-spring-boot2](https://resilience4j.readme.io)
 ([source](https://togithub.com/resilience4j/resilience4j)) | `1.7.1` -> 
`2.0.2` | 
[![age](https://badges.renovateapi.com/packages/maven/io.github.resilience4j:resilience4j-spring-boot2/2.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/io.github.resilience4j:resilience4j-spring-boot2/2.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/io.github.resilience4j:resilience4j-spring-boot2/2.0.2/compatibility-slim/1.7.1)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/io.github.resilience4j:resilience4j-spring-boot2/2.0.2/confidence-slim/1.7.1)](https://docs.renovatebot.com/merge-confidence/)
 |
   
   ---
   
   ### ⚠ Dependency Lookup Warnings ⚠
   
   Warnings were logged while processing this repo. Please check the Dependency 
Dashboard for more information.
   
   ---
   
   ### Release Notes
   
   
   resilience4j/resilience4j
   
   ### 
[`v2.0.2`](https://togithub.com/resilience4j/resilience4j/releases/tag/v2.0.2)
   
   ### Bugs
   
   -   Issue 
[#1835](https://togithub.com/resilience4j/resilience4j/issues/1835): 
Fixed CircuitBreaker CheckedSupplier and CheckedFunction decorator not opening 
on recordResultPredicate
   
   ### 
[`v2.0.1`](https://togithub.com/resilience4j/resilience4j/releases/tag/v2.0.1)
   
   ### Enhancements
   
   -   Support Spring Boot 3 by adding resilience4j-spring-boot3 and 
resilience4j-spring6
   
   -   Issue 
[#1787](https://togithub.com/resilience4j/resilience4j/issues/1787): 
Apply Spring Boot customizers even if there is no instance entry in the config 
file
   
   ### Bugs
   
   -   Issue 
[#1825](https://togithub.com/resilience4j/resilience4j/issues/1825): 
Aspectj must not be mandatory in Spring Boot modules
   
   -   Issue 
[#1809](https://togithub.com/resilience4j/resilience4j/issues/1809): 
Fixed concurrency issue in Cache module
   
   ### 
[`v2.0.0`](https://togithub.com/resilience4j/resilience4j/releases/tag/v2.0.0)
   
   -   Removed Vavr as a dependency
   -   Upgraded to Java 17
   -   Upgraded to Kotlin 1.7.20
   -   Upgraded to Spring Boot 2.7
   -   Upgraded to Micronaut 3.7.3
   
   
   
   ---
   
   ### Configuration
   
    **Schedule**: Branch creation - "before 3am on Monday" (UTC), Automerge - 
At any time (no schedule defined).
   
    **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
checkbox.
   
    **Ignore**: Close this PR and you won't be reminded about this update 
again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [Mend 
Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository 
job log [here](https://app.renovatebot.com/dashboard#github/apache/fineract).
   

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] renovate-bot opened a new pull request, #2801: chore(deps): update actions/stale action to v6

2022-12-11 Thread GitBox


renovate-bot opened a new pull request, #2801:
URL: https://github.com/apache/fineract/pull/2801

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Type | Update | Change |
   |---|---|---|---|
   | [actions/stale](https://togithub.com/actions/stale) | action | major | 
`v5` -> `v6` |
   
   ---
   
   ### ⚠ Dependency Lookup Warnings ⚠
   
   Warnings were logged while processing this repo. Please check the Dependency 
Dashboard for more information.
   
   ---
   
   ### Release Notes
   
   
   actions/stale
   
   ### [`v6`](https://togithub.com/actions/stale/compare/v5...v6)
   
   [Compare Source](https://togithub.com/actions/stale/compare/v5...v6)
   
   
   
   ---
   
   ### Configuration
   
    **Schedule**: Branch creation - "before 3am on Monday" (UTC), Automerge - 
At any time (no schedule defined).
   
    **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
checkbox.
   
    **Ignore**: Close this PR and you won't be reminded about this update 
again.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [Mend 
Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository 
job log [here](https://app.renovatebot.com/dashboard#github/apache/fineract).
   

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] renovate-bot opened a new pull request, #2800: fix(deps): update non-major

2022-12-11 Thread GitBox


renovate-bot opened a new pull request, #2800:
URL: https://github.com/apache/fineract/pull/2800

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Change | Age | Adoption | Passing | Confidence |
   |---|---|---|---|---|---|
   | 
[com.github.sevntu-checkstyle:sevntu-checks](http://nexus.sonatype.org/oss-repository-hosting.html)
 ([source](http://svn.sonatype.org/spice/trunk/oss/oss-parent-9)) | `1.43.0` -> 
`1.44.0` | 
[![age](https://badges.renovateapi.com/packages/maven/com.github.sevntu-checkstyle:sevntu-checks/1.44.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/com.github.sevntu-checkstyle:sevntu-checks/1.44.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/com.github.sevntu-checkstyle:sevntu-checks/1.44.0/compatibility-slim/1.43.0)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/com.github.sevntu-checkstyle:sevntu-checks/1.44.0/confidence-slim/1.43.0)](https://docs.renovatebot.com/merge-confidence/)
 |
   | [org.apache.tomcat:tomcat](https://tomcat.apache.org/) | `9.0.69` -> 
`9.0.70` | 
[![age](https://badges.renovateapi.com/packages/maven/org.apache.tomcat:tomcat/9.0.70/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/org.apache.tomcat:tomcat/9.0.70/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/org.apache.tomcat:tomcat/9.0.70/compatibility-slim/9.0.69)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/org.apache.tomcat:tomcat/9.0.70/confidence-slim/9.0.69)](https://docs.renovatebot.com/merge-confidence/)
 |
   
   ---
   
   ### ⚠ Dependency Lookup Warnings ⚠
   
   Warnings were logged while processing this repo. Please check the Dependency 
Dashboard for more information.
   
   ---
   
   ### Configuration
   
    **Schedule**: Branch creation - "before 3am on Monday" (UTC), Automerge - 
At any time (no schedule defined).
   
    **Automerge**: Disabled by config. Please merge this manually once you are 
satisfied.
   
   ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry 
checkbox.
   
    **Immortal**: This PR will be recreated if closed unmerged. Get [config 
help](https://togithub.com/renovatebot/renovate/discussions) if that's 
undesired.
   
   ---
   
- [ ] If you want to rebase/retry this PR, check this 
box
   
   ---
   
   This PR has been generated by [Mend 
Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository 
job log [here](https://app.renovatebot.com/dashboard#github/apache/fineract).
   

   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] renovate-bot opened a new pull request, #2799: chore(deps): update all non-major dependencies

2022-12-11 Thread GitBox


renovate-bot opened a new pull request, #2799:
URL: https://github.com/apache/fineract/pull/2799

   [![Mend 
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
   
   This PR contains the following updates:
   
   | Package | Type | Update | Change | Age | Adoption | Passing | Confidence |
   |---|---|---|---|---|---|---|---|
   | [gradle](https://gradle.org) 
([source](https://togithub.com/gradle/gradle)) |  | minor | `7.5.1` -> `7.6` | 
[![age](https://badges.renovateapi.com/packages/gradle-version/gradle/7.6/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/gradle-version/gradle/7.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/gradle-version/gradle/7.6/compatibility-slim/7.5.1)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/gradle-version/gradle/7.6/confidence-slim/7.5.1)](https://docs.renovatebot.com/merge-confidence/)
 |
   | 
[org.liquibase:liquibase-core](http://www.liquibase.org/liquibase-root/liquibase-dist)
 ([source](https://togithub.com/liquibase/liquibase)) | devDependencies | minor 
| `4.17.2` -> `4.18.0` | 
[![age](https://badges.renovateapi.com/packages/maven/org.liquibase:liquibase-core/4.18.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/org.liquibase:liquibase-core/4.18.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/org.liquibase:liquibase-core/4.18.0/compatibility-slim/4.17.2)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/org.liquibase:liquibase-core/4.18.0/confidence-slim/4.17.2)](https://docs.renovatebot.com/merge-confidence/)
 |
   | 
[com.google.cloud.sql:mysql-socket-factory-connector-j-8](https://togithub.com/GoogleCloudPlatform/cloud-sql-mysql-socket-factory)
 | devDependencies | minor | `1.7.2` -> `1.8.0` | 
[![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.sql:mysql-socket-factory-connector-j-8/1.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.sql:mysql-socket-factory-connector-j-8/1.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.sql:mysql-socket-factory-connector-j-8/1.8.0/compatibility-slim/1.7.2)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.sql:mysql-socket-factory-connector-j-8/1.8.0/confidence-slim/1.7.2)](https://docs.renovatebot.com/merge-confidence/)
 |
   | [com.intuit.karate:karate-junit5](https://togithub.com/karatelabs/karate) 
| devDependencies | patch | `1.3.0` -> `1.3.1` | 
[![age](https://badges.renovateapi.com/packages/maven/com.intuit.karate:karate-junit5/1.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/com.intuit.karate:karate-junit5/1.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/com.intuit.karate:karate-junit5/1.3.1/compatibility-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/com.intuit.karate:karate-junit5/1.3.1/confidence-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/)
 |
   | 
[io.github.classgraph:classgraph](https://togithub.com/classgraph/classgraph) | 
devDependencies | patch | `4.8.151` -> `4.8.152` | 
[![age](https://badges.renovateapi.com/packages/maven/io.github.classgraph:classgraph/4.8.152/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![adoption](https://badges.renovateapi.com/packages/maven/io.github.classgraph:classgraph/4.8.152/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![passing](https://badges.renovateapi.com/packages/maven/io.github.classgraph:classgraph/4.8.152/compatibility-slim/4.8.151)](https://docs.renovatebot.com/merge-confidence/)
 | 
[![confidence](https://badges.renovateapi.com/packages/maven/io.github.classgraph:classgraph/4.8.152/confidence-slim/4.8.151)](https://docs.renovatebot.com/merge-confidence/)
 |
   | [com.amazonaws:aws-java-sdk-s3](https://aws.amazon.com/sdkforjava) 
([source](https://togithub.com/aws/aws-sdk-java)) | devDependencies | patch | 
`1.12.357` -> `1.12.362` | 
[![age](https://badges.renovateapi.com/packages/maven/com.amazonaws:aws-java-sdk-s3/1.12.362/age-slim)](https://docs.renovatebot.com/merge-confidence/)
 | 

[GitHub] [fineract] github-actions[bot] closed pull request #2592: FINERACT-1743: Introduce Lombok to documentmanagement module

2022-12-11 Thread GitBox


github-actions[bot] closed pull request #2592: FINERACT-1743: Introduce Lombok 
to documentmanagement module
URL: https://github.com/apache/fineract/pull/2592


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] github-actions[bot] closed pull request #2642: Refinement to existing documentation on the enhanced ability to separate read/write/batch API operations for greater performance

2022-12-11 Thread GitBox


github-actions[bot] closed pull request #2642: Refinement to existing 
documentation on the enhanced ability to separate read/write/batch API 
operations for greater performance
URL: https://github.com/apache/fineract/pull/2642


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] ruchiD opened a new pull request, #2798: FINERACT-1760-Index-or-Unique-column-creation-datatables

2022-12-09 Thread GitBox


ruchiD opened a new pull request, #2798:
URL: https://github.com/apache/fineract/pull/2798

   ## Description
   1.Added unique and indexed attributes for datatable columns
   2.Updated column details to show unique or indexed status
   3.Modified to add support for columns to indexed or unique for datable 
creation and modification
   4.Integration Test
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2796: FINERACT-1724: Fix delinquency tags swagger response type

2022-12-09 Thread GitBox


galovics merged PR #2796:
URL: https://github.com/apache/fineract/pull/2796


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx opened a new pull request, #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

2022-12-09 Thread GitBox


josehernandezfintecheandomx opened a new pull request, #2797:
URL: https://github.com/apache/fineract/pull/2797

   ## Description
   
   When trying to apply specified due date fees or penalties on the date of the 
loan’s disbursement date, it won’t be effective and It's not added as 
outstanding
   
   [FINERACT-1785](https://issues.apache.org/jira/browse/FINERACT-1785)
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044529090


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {
+
+String sqlSearch = searchParameters.getSqlSearch();
+final Long officeId = searchParameters.getOfficeId();
+final String externalId = searchParameters.getExternalId();
+final String displayName = searchParameters.getName();
+final String firstname = searchParameters.getFirstname();
+final String lastname = searchParameters.getLastname();
+final String status = searchParameters.getStatus();
+
+String extraCriteria = "";
+if (sqlSearch != null) {
+sqlSearch = sqlSearch.replaceAll(" display_name ", " 
c.display_name ");
+sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name 
");
+extraCriteria = " and (" + sqlSearch + ")";
+this.columnValidator.validateSqlInjection(schemaSql, sqlSearch);
+}
+
+if (officeId != null) {
+extraCriteria += " and c.office_id = ? ";
+paramList.add(officeId);
+}
+
+if (externalId != null) {
+paramList.add(externalId);
+extraCriteria += " and c.external_id like ? ";
+}
+
+if (displayName != null) {
+// extraCriteria += " and concatcoalesce(c.firstname, ''),
+// if(c.firstname > '',' ', '') , coalesce(c.lastname, '')) like "
+paramList.add("%" + displayName + "%");
+extraCriteria += " and c.display_name like ? ";
+}
+
+if (status != null) {
+ClientStatus clientStatus = ClientStatus.fromString(status);
+extraCriteria += " and c.status_enum = " + 
clientStatus.getValue().toString() + " ";
+}
+
+if (firstname != null) {
+paramList.add(firstname);
+extraCriteria += " and c.firstname like ? ";
+}
+
+if (lastname != null) {
+paramList.add(lastname);
+extraCriteria += " and c.lastname like ? ";
+}
+
+if (searchParameters.isScopedByOfficeHierarchy()) {
+paramList.add(searchParameters.getHierarchy() + "%");
+extraCriteria += " and o.hierarchy like ? ";
+}
+
+if (searchParameters.isOrphansOnly()) {
+extraCriteria += " and c.id NOT IN (select client_id from 
m_group_client) ";
+}
+
+if (StringUtils.isNotBlank(extraCriteria)) {
+extraCriteria = extraCriteria.substring(4);
+}
+return extraCriteria;
+}
+
+private static final class ClientToDataMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMembersOfGroupMapper() {
-final StringBuilder sqlBuilder = new StringBuilder(200);
+ClientToDataMapper() {
+final StringBuilder builder = new StringBuilder(400);
 
-sqlBuilder.append(
+builder.append(
 "c.id as id, c.account_no as accountNo, c.external_id as 
externalId, c.status_enum as statusEnum,c.sub_status as subStatus, ");
-sqlBuilder.append(
+builder.append(
 "cvSubStatus.code_value as 
subStatusValue,cvSubStatus.code_description as subStatusDesc,c.office_id as 
officeId, o.name as officeName, ");
-sqlBuilder.append("c.transfer_to_office_id as transferToOfficeId, 
transferToOffice.name as transferToOfficeName, ");
-sqlBuilder.append("c.firstname as firstname, c.middlename as 
middlename, c.lastname as lastname, ");
-sqlBuilder.append("c.fullname as fullname, c.display_name as 
displayName, ");
-sqlBuilder.append("c.mobile_no as mobileNo, ");
-sqlBuilder.append("c.is_staff as isStaff, ");
-sqlBuilder.append("c.email_address as emailAddress, ");
-sqlBuilder.append("c.date_of_birth as dateOfBirth, ");
-sqlBuilder.append("c.gender_cv_id as genderId, ");
-sqlBuilder.append("cv.code_value as genderValue, ");
-sqlBuilder.append("c.client_type_cv_id as clienttypeId, ");
-sqlBuilder.append("cvclienttype.code_value as clienttypeValue, ");
-sqlBuilder.append("c.client_classification_cv_id as 
classificationId, ");
-sqlBuilder.append("cvclassification.code_value as 
classificationValue, ");
-sqlBuilder.append("c.legal_form_enum 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044527454


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {
+
+String sqlSearch = searchParameters.getSqlSearch();
+final Long officeId = searchParameters.getOfficeId();
+final String externalId = searchParameters.getExternalId();
+final String displayName = searchParameters.getName();
+final String firstname = searchParameters.getFirstname();
+final String lastname = searchParameters.getLastname();
+final String status = searchParameters.getStatus();
+
+String extraCriteria = "";
+if (sqlSearch != null) {
+sqlSearch = sqlSearch.replaceAll(" display_name ", " 
c.display_name ");
+sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name 
");
+extraCriteria = " and (" + sqlSearch + ")";
+this.columnValidator.validateSqlInjection(schemaSql, sqlSearch);
+}
+
+if (officeId != null) {
+extraCriteria += " and c.office_id = ? ";
+paramList.add(officeId);
+}
+
+if (externalId != null) {
+paramList.add(externalId);
+extraCriteria += " and c.external_id like ? ";
+}
+
+if (displayName != null) {
+// extraCriteria += " and concatcoalesce(c.firstname, ''),
+// if(c.firstname > '',' ', '') , coalesce(c.lastname, '')) like "
+paramList.add("%" + displayName + "%");
+extraCriteria += " and c.display_name like ? ";
+}
+
+if (status != null) {
+ClientStatus clientStatus = ClientStatus.fromString(status);
+extraCriteria += " and c.status_enum = " + 
clientStatus.getValue().toString() + " ";
+}
+
+if (firstname != null) {
+paramList.add(firstname);
+extraCriteria += " and c.firstname like ? ";
+}
+
+if (lastname != null) {
+paramList.add(lastname);
+extraCriteria += " and c.lastname like ? ";
+}
+
+if (searchParameters.isScopedByOfficeHierarchy()) {
+paramList.add(searchParameters.getHierarchy() + "%");
+extraCriteria += " and o.hierarchy like ? ";
+}
+
+if (searchParameters.isOrphansOnly()) {
+extraCriteria += " and c.id NOT IN (select client_id from 
m_group_client) ";
+}
+
+if (StringUtils.isNotBlank(extraCriteria)) {
+extraCriteria = extraCriteria.substring(4);
+}
+return extraCriteria;
+}
+
+private static final class ClientToDataMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMembersOfGroupMapper() {
-final StringBuilder sqlBuilder = new StringBuilder(200);
+ClientToDataMapper() {
+final StringBuilder builder = new StringBuilder(400);
 
-sqlBuilder.append(
+builder.append(
 "c.id as id, c.account_no as accountNo, c.external_id as 
externalId, c.status_enum as statusEnum,c.sub_status as subStatus, ");
-sqlBuilder.append(
+builder.append(
 "cvSubStatus.code_value as 
subStatusValue,cvSubStatus.code_description as subStatusDesc,c.office_id as 
officeId, o.name as officeName, ");
-sqlBuilder.append("c.transfer_to_office_id as transferToOfficeId, 
transferToOffice.name as transferToOfficeName, ");
-sqlBuilder.append("c.firstname as firstname, c.middlename as 
middlename, c.lastname as lastname, ");
-sqlBuilder.append("c.fullname as fullname, c.display_name as 
displayName, ");
-sqlBuilder.append("c.mobile_no as mobileNo, ");
-sqlBuilder.append("c.is_staff as isStaff, ");
-sqlBuilder.append("c.email_address as emailAddress, ");
-sqlBuilder.append("c.date_of_birth as dateOfBirth, ");
-sqlBuilder.append("c.gender_cv_id as genderId, ");
-sqlBuilder.append("cv.code_value as genderValue, ");
-sqlBuilder.append("c.client_type_cv_id as clienttypeId, ");
-sqlBuilder.append("cvclienttype.code_value as clienttypeValue, ");
-sqlBuilder.append("c.client_classification_cv_id as 
classificationId, ");
-sqlBuilder.append("cvclassification.code_value as 
classificationValue, ");
-sqlBuilder.append("c.legal_form_enum 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044480018


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -732,6 +718,20 @@ public ClientData mapRow(final ResultSet rs, final int 
rowNum) throws SQLExcepti
 }
 }
 
+@Override
+public Collection retrieveActiveClientMembersOfCenter(final 
Long centerId) {

Review Comment:
   There are different (old) Client mapper for covering different flows, 
individual client, group client, etc. In this case It was not renamed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044479707


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {

Review Comment:
   There are different (old) Client mapper for covering different flows, 
individual client, group client, etc. In this case It was not renamed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044479372


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {
+
+String sqlSearch = searchParameters.getSqlSearch();
+final Long officeId = searchParameters.getOfficeId();
+final String externalId = searchParameters.getExternalId();
+final String displayName = searchParameters.getName();
+final String firstname = searchParameters.getFirstname();
+final String lastname = searchParameters.getLastname();
+final String status = searchParameters.getStatus();
+
+String extraCriteria = "";
+if (sqlSearch != null) {
+sqlSearch = sqlSearch.replaceAll(" display_name ", " 
c.display_name ");
+sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name 
");
+extraCriteria = " and (" + sqlSearch + ")";
+this.columnValidator.validateSqlInjection(schemaSql, sqlSearch);
+}
+
+if (officeId != null) {
+extraCriteria += " and c.office_id = ? ";
+paramList.add(officeId);
+}
+
+if (externalId != null) {
+paramList.add(externalId);
+extraCriteria += " and c.external_id like ? ";
+}
+
+if (displayName != null) {
+// extraCriteria += " and concatcoalesce(c.firstname, ''),
+// if(c.firstname > '',' ', '') , coalesce(c.lastname, '')) like "
+paramList.add("%" + displayName + "%");
+extraCriteria += " and c.display_name like ? ";
+}
+
+if (status != null) {
+ClientStatus clientStatus = ClientStatus.fromString(status);
+extraCriteria += " and c.status_enum = " + 
clientStatus.getValue().toString() + " ";
+}
+
+if (firstname != null) {
+paramList.add(firstname);
+extraCriteria += " and c.firstname like ? ";
+}
+
+if (lastname != null) {
+paramList.add(lastname);
+extraCriteria += " and c.lastname like ? ";
+}
+
+if (searchParameters.isScopedByOfficeHierarchy()) {
+paramList.add(searchParameters.getHierarchy() + "%");
+extraCriteria += " and o.hierarchy like ? ";
+}
+
+if (searchParameters.isOrphansOnly()) {
+extraCriteria += " and c.id NOT IN (select client_id from 
m_group_client) ";
+}
+
+if (StringUtils.isNotBlank(extraCriteria)) {
+extraCriteria = extraCriteria.substring(4);
+}
+return extraCriteria;
+}
+
+private static final class ClientToDataMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMembersOfGroupMapper() {
-final StringBuilder sqlBuilder = new StringBuilder(200);
+ClientToDataMapper() {
+final StringBuilder builder = new StringBuilder(400);

Review Comment:
   There are different (old) Client mapper for covering different flows, 
individual client, group client, etc. In this case It was not renamed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044478616


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -545,90 +543,77 @@ public ClientData mapRow(final ResultSet rs, final int 
rowNum) throws SQLExcepti
 }
 }
 
-@Override
-public Collection retrieveActiveClientMembersOfCenter(final 
Long centerId) {
-
-final AppUser currentUser = this.context.authenticatedUser();
-final String hierarchy = currentUser.getOffice().getHierarchy();
-final String hierarchySearchString = hierarchy + "%";
-
-final String sql = "select " + this.membersOfGroupMapper.schema()
-+ " left join m_group g on pgc.group_id=g.id where o.hierarchy 
like ? and g.parent_id = ? and c.status_enum = ? group by c.id";
-
-return this.jdbcTemplate.query(sql, this.membersOfGroupMapper, // 
NOSONAR
-hierarchySearchString, centerId, 
ClientStatus.ACTIVE.getValue());
-}
-
-private static final class ClientMapper implements RowMapper {
+private static final class ClientMembersOfGroupMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMapper() {
-final StringBuilder builder = new StringBuilder(400);
+ClientMembersOfGroupMapper() {
+final StringBuilder sqlBuilder = new StringBuilder(200);

Review Comment:
   There are different (old) Client mapper for covering different flows, 
individual client, group client, etc. In this case It was not renamed, we 
remove the ClientMapper to be now as MapStruct mapper



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-09 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1044464638


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/mapper/ClientMapper.java:
##
@@ -0,0 +1,159 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.client.mapper;
+
+import org.apache.fineract.infrastructure.codes.data.CodeValueData;
+import org.apache.fineract.infrastructure.codes.domain.CodeValue;
+import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig;
+import org.apache.fineract.infrastructure.core.data.EnumOptionData;
+import org.apache.fineract.portfolio.client.data.ClientData;
+import org.apache.fineract.portfolio.client.data.ClientTimelineData;
+import org.apache.fineract.portfolio.client.domain.Client;
+import org.apache.fineract.portfolio.client.domain.ClientEnumerations;
+import org.apache.fineract.useradministration.domain.AppUser;
+import org.mapstruct.Mapper;
+import org.mapstruct.Mapping;
+import org.mapstruct.Named;
+
+@Mapper(config = MapstructMapperConfig.class)
+public interface ClientMapper {
+
+@Mapping(target = "accountNo", source = "source.accountNumber")
+@Mapping(target = "status", source = "source", qualifiedByName = 
"clientStatusEnum")
+@Mapping(target = "subStatus", source = "source", qualifiedByName = 
"clientSubStatusCode")
+@Mapping(target = "officeId", source = "source.office.id")
+@Mapping(target = "officeName", source = "source.office.name")
+@Mapping(target = "transferToOfficeId", source = 
"source.transferToOffice.id")
+@Mapping(target = "transferToOfficeName", source = 
"source.transferToOffice.name")
+@Mapping(target = "externalId", source = "source.externalId")
+@Mapping(target = "gender", source = "source", qualifiedByName = 
"clientGenderCode")
+@Mapping(target = "imageId", source = "source.image.id")
+@Mapping(target = "staffId", source = "source.staff.id")
+@Mapping(target = "staffName", source = "source.staff.displayName")
+@Mapping(target = "timeline", source = "source", qualifiedByName = 
"clientTimeloneData")
+@Mapping(target = "savingsProductId", source = "source.savingsProductId")
+@Mapping(target = "savingsProductName", source = "source.id")
+@Mapping(target = "savingsAccountId", source = "source.savingsAccountId")
+@Mapping(target = "clientType", source = "source", qualifiedByName = 
"clientTypeCode")
+@Mapping(target = "clientClassification", source = "source", 
qualifiedByName = "clientClassificationCode")
+@Mapping(target = "legalForm", source = "source", qualifiedByName = 
"clientLegalFormEnum")
+@Mapping(target = "isStaff", source = "source", qualifiedByName = 
"clientIsStaff")
+@Mapping(target = "imagePresent", ignore = true)

Review Comment:
   The `ClientData` dto is used for different scenarios, Individual clients, 
Group clients for instance. So In this specific case we are talking just for 
Individual clients and the other attributes are not filled/used in this case 
and that is the way to be not filled (ignoring them) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2794: FINERACT-1707: Update r_enum_value table with new transaction_types v…

2022-12-09 Thread GitBox


galovics merged PR #2794:
URL: https://github.com/apache/fineract/pull/2794


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy opened a new pull request, #2796: FINERACT-1724: Fix delinquency tags swagger response type

2022-12-09 Thread GitBox


adamsaghy opened a new pull request, #2796:
URL: https://github.com/apache/fineract/pull/2796

   ## Description
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] IOhacker closed pull request #2768: FINERACT-1821 Postgresql Support for Tellers ->Cashiers->Transactions

2022-12-08 Thread GitBox


IOhacker closed pull request #2768: FINERACT-1821 Postgresql Support for 
Tellers ->Cashiers->Transactions
URL: https://github.com/apache/fineract/pull/2768


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] b0c1 opened a new pull request, #2795: FINERACT-1744 - Batch API Support

2022-12-08 Thread GitBox


b0c1 opened a new pull request, #2795:
URL: https://github.com/apache/fineract/pull/2795

   FINERACT-1744 - Batch API Support
   - [x] Batch api support for idempotency
   - [x] BatchFilter for generic batch filtering
   - [x] LoanCOBApiFilter extend with BatchFilter support
   - [x] FineractRequestContextHolder generic context holder with batch and 
http request supports
   
   ## Description
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request 
- thanks!
   
   - [x] Write the commit message as per 
https://github.com/apache/fineract/#pull-requests
   
   - [x] 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.
   
   - [x] Create/update unit or integration tests for verifying the changes made.
   
   - [x] Follow coding conventions at 
https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   
   - [x] 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
   
   - [x] 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-08 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1043556557


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -358,7 +324,7 @@ private void validate() {
 
 }
 
-private void validateUpdate() {
+public void validateUpdate() {

Review Comment:
   Yes, but It has a call to the client method `validateActivationDate` and 
this is used in other part inside of `Client` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx opened a new pull request, #2794: FINERACT-1707: Update r_enum_value table with new transaction_types v…

2022-12-08 Thread GitBox


josehernandezfintecheandomx opened a new pull request, #2794:
URL: https://github.com/apache/fineract/pull/2794

   …alues
   
   ## Description
   
   We need to add all the newly introduced `transaction_types`  into 
`r_enum_value` table and It is done using a `liquibase` migration so that will 
be applied for new deployments too
   
   [FINERACT-1707](https://issues.apache.org/jira/browse/FINERACT-1707)
   
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract-cn-fims-web-app] dependabot[bot] opened a new pull request, #36: Bump express from 4.16.3 to 4.18.2

2022-12-08 Thread GitBox


dependabot[bot] opened a new pull request, #36:
URL: https://github.com/apache/fineract-cn-fims-web-app/pull/36

   Bumps [express](https://github.com/expressjs/express) from 4.16.3 to 4.18.2.
   
   Release notes
   Sourced from https://github.com/expressjs/express/releases;>express's 
releases.
   
   4.18.2
   
   Fix regression routing a large stack in a single route
   deps: body-parser@1.20.1
   
   deps: qs@6.11.0
   perf: remove unnecessary object clone
   
   
   deps: qs@6.11.0
   
   4.18.1
   
   Fix hanging on large stack of sync routes
   
   4.18.0
   
   Add root option to res.download
   Allow options without filename in 
res.download
   Deprecate string and non-integer arguments to 
res.status
   Fix behavior of null/undefined as 
maxAge in res.cookie
   Fix handling very large stacks of sync middleware
   Ignore Object.prototype values in settings through 
app.set/app.get
   Invoke default with same arguments as types in 
res.format
   Support proper 205 responses using res.send
   Use http-errors for res.format error
   deps: body-parser@1.20.0
   
   Fix error message for json parse whitespace in strict
   Fix internal error when inflated body exceeds limit
   Prevent loss of async hooks context
   Prevent hanging when request already read
   deps: depd@2.0.0
   deps: http-errors@2.0.0
   deps: on-finished@2.4.1
   deps: qs@6.10.3
   deps: raw-body@2.5.1
   
   
   deps: cookie@0.5.0
   
   Add priority option
   Fix expires option to reject invalid dates
   
   
   deps: depd@2.0.0
   
   Replace internal eval usage with Function 
constructor
   Use instance methods on process to check for listeners
   
   
   deps: finalhandler@1.2.0
   
   Remove set content headers that break response
   deps: on-finished@2.4.1
   deps: statuses@2.0.1
   
   
   deps: on-finished@2.4.1
   
   Prevent loss of async hooks context
   
   
   deps: qs@6.10.3
   deps: send@0.18.0
   
   Fix emitted 416 error missing headers property
   Limit the headers removed for 304 response
   deps: depd@2.0.0
   deps: destroy@1.2.0
   deps: http-errors@2.0.0
   deps: on-finished@2.4.1
   
   
   
   
   
   ... (truncated)
   
   
   Changelog
   Sourced from https://github.com/expressjs/express/blob/master/History.md;>express's 
changelog.
   
   4.18.2 / 2022-10-08
   
   Fix regression routing a large stack in a single route
   deps: body-parser@1.20.1
   
   deps: qs@6.11.0
   perf: remove unnecessary object clone
   
   
   deps: qs@6.11.0
   
   4.18.1 / 2022-04-29
   
   Fix hanging on large stack of sync routes
   
   4.18.0 / 2022-04-25
   
   Add root option to res.download
   Allow options without filename in 
res.download
   Deprecate string and non-integer arguments to 
res.status
   Fix behavior of null/undefined as 
maxAge in res.cookie
   Fix handling very large stacks of sync middleware
   Ignore Object.prototype values in settings through 
app.set/app.get
   Invoke default with same arguments as types in 
res.format
   Support proper 205 responses using res.send
   Use http-errors for res.format error
   deps: body-parser@1.20.0
   
   Fix error message for json parse whitespace in strict
   Fix internal error when inflated body exceeds limit
   Prevent loss of async hooks context
   Prevent hanging when request already read
   deps: depd@2.0.0
   deps: http-errors@2.0.0
   deps: on-finished@2.4.1
   deps: qs@6.10.3
   deps: raw-body@2.5.1
   
   
   deps: cookie@0.5.0
   
   Add priority option
   Fix expires option to reject invalid dates
   
   
   deps: depd@2.0.0
   
   Replace internal eval usage with Function 
constructor
   Use instance methods on process to check for listeners
   
   
   deps: finalhandler@1.2.0
   
   Remove set content headers that break response
   deps: on-finished@2.4.1
   deps: statuses@2.0.1
   
   
   deps: on-finished@2.4.1
   
   Prevent loss of async hooks context
   
   
   deps: qs@6.10.3
   deps: send@0.18.0
   
   
   
   ... (truncated)
   
   
   Commits
   
   https://github.com/expressjs/express/commit/8368dc178af16b91b576c4c1d135f701a0007e5d;>8368dc1
 4.18.2
   https://github.com/expressjs/express/commit/61f40491222dbede653b9938e6a4676f187aab44;>61f4049
 docs: replace Freenode with Libera Chat
   https://github.com/expressjs/express/commit/bb7907b932afe3a19236a642f6054b6c8f7349a0;>bb7907b
 build: Node.js@18.10
   https://github.com/expressjs/express/commit/f56ce73186e885a938bfdb3d3d1005a58e6ae12b;>f56ce73
 build: supertest@6.3.0
   https://github.com/expressjs/express/commit/24b3dc551670ac4fb0cd5a2bd5ef643c9525e60f;>24b3dc5
 deps: qs@6.11.0
   https://github.com/expressjs/express/commit/689d175b8b39d8860b81d723233fb83d15201827;>689d175
 deps: body-parser@1.20.1
   https://github.com/expressjs/express/commit/340be0f79afb9b3176afb76235aa7f92acbd5050;>340be0f
 build: eslint@8.24.0
   https://github.com/expressjs/express/commit/33e8dc303af9277f8a7e4f46abfdcb5e72f6797b;>33e8dc3
 docs: use Node.js name style
   

[GitHub] [fineract-cn-group-finance] sonarcloud[bot] commented on pull request #20: Bump express from 4.16.3 to 4.18.2

2022-12-07 Thread GitBox


sonarcloud[bot] commented on PR #20:
URL: 
https://github.com/apache/fineract-cn-group-finance/pull/20#issuecomment-1342106610

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_fineract-cn-group-finance=20)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_fineract-cn-group-finance=20=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_fineract-cn-group-finance=20=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_fineract-cn-group-finance=20=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=20=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_fineract-cn-group-finance=20)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_fineract-cn-group-finance=20=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_fineract-cn-group-finance=20=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract-cn-group-finance] dependabot[bot] opened a new pull request, #20: Bump express from 4.16.3 to 4.18.2

2022-12-07 Thread GitBox


dependabot[bot] opened a new pull request, #20:
URL: https://github.com/apache/fineract-cn-group-finance/pull/20

   Bumps [express](https://github.com/expressjs/express) from 4.16.3 to 4.18.2.
   
   Release notes
   Sourced from https://github.com/expressjs/express/releases;>express's 
releases.
   
   4.18.2
   
   Fix regression routing a large stack in a single route
   deps: body-parser@1.20.1
   
   deps: qs@6.11.0
   perf: remove unnecessary object clone
   
   
   deps: qs@6.11.0
   
   4.18.1
   
   Fix hanging on large stack of sync routes
   
   4.18.0
   
   Add root option to res.download
   Allow options without filename in 
res.download
   Deprecate string and non-integer arguments to 
res.status
   Fix behavior of null/undefined as 
maxAge in res.cookie
   Fix handling very large stacks of sync middleware
   Ignore Object.prototype values in settings through 
app.set/app.get
   Invoke default with same arguments as types in 
res.format
   Support proper 205 responses using res.send
   Use http-errors for res.format error
   deps: body-parser@1.20.0
   
   Fix error message for json parse whitespace in strict
   Fix internal error when inflated body exceeds limit
   Prevent loss of async hooks context
   Prevent hanging when request already read
   deps: depd@2.0.0
   deps: http-errors@2.0.0
   deps: on-finished@2.4.1
   deps: qs@6.10.3
   deps: raw-body@2.5.1
   
   
   deps: cookie@0.5.0
   
   Add priority option
   Fix expires option to reject invalid dates
   
   
   deps: depd@2.0.0
   
   Replace internal eval usage with Function 
constructor
   Use instance methods on process to check for listeners
   
   
   deps: finalhandler@1.2.0
   
   Remove set content headers that break response
   deps: on-finished@2.4.1
   deps: statuses@2.0.1
   
   
   deps: on-finished@2.4.1
   
   Prevent loss of async hooks context
   
   
   deps: qs@6.10.3
   deps: send@0.18.0
   
   Fix emitted 416 error missing headers property
   Limit the headers removed for 304 response
   deps: depd@2.0.0
   deps: destroy@1.2.0
   deps: http-errors@2.0.0
   deps: on-finished@2.4.1
   
   
   
   
   
   ... (truncated)
   
   
   Changelog
   Sourced from https://github.com/expressjs/express/blob/master/History.md;>express's 
changelog.
   
   4.18.2 / 2022-10-08
   
   Fix regression routing a large stack in a single route
   deps: body-parser@1.20.1
   
   deps: qs@6.11.0
   perf: remove unnecessary object clone
   
   
   deps: qs@6.11.0
   
   4.18.1 / 2022-04-29
   
   Fix hanging on large stack of sync routes
   
   4.18.0 / 2022-04-25
   
   Add root option to res.download
   Allow options without filename in 
res.download
   Deprecate string and non-integer arguments to 
res.status
   Fix behavior of null/undefined as 
maxAge in res.cookie
   Fix handling very large stacks of sync middleware
   Ignore Object.prototype values in settings through 
app.set/app.get
   Invoke default with same arguments as types in 
res.format
   Support proper 205 responses using res.send
   Use http-errors for res.format error
   deps: body-parser@1.20.0
   
   Fix error message for json parse whitespace in strict
   Fix internal error when inflated body exceeds limit
   Prevent loss of async hooks context
   Prevent hanging when request already read
   deps: depd@2.0.0
   deps: http-errors@2.0.0
   deps: on-finished@2.4.1
   deps: qs@6.10.3
   deps: raw-body@2.5.1
   
   
   deps: cookie@0.5.0
   
   Add priority option
   Fix expires option to reject invalid dates
   
   
   deps: depd@2.0.0
   
   Replace internal eval usage with Function 
constructor
   Use instance methods on process to check for listeners
   
   
   deps: finalhandler@1.2.0
   
   Remove set content headers that break response
   deps: on-finished@2.4.1
   deps: statuses@2.0.1
   
   
   deps: on-finished@2.4.1
   
   Prevent loss of async hooks context
   
   
   deps: qs@6.10.3
   deps: send@0.18.0
   
   
   
   ... (truncated)
   
   
   Commits
   
   https://github.com/expressjs/express/commit/8368dc178af16b91b576c4c1d135f701a0007e5d;>8368dc1
 4.18.2
   https://github.com/expressjs/express/commit/61f40491222dbede653b9938e6a4676f187aab44;>61f4049
 docs: replace Freenode with Libera Chat
   https://github.com/expressjs/express/commit/bb7907b932afe3a19236a642f6054b6c8f7349a0;>bb7907b
 build: Node.js@18.10
   https://github.com/expressjs/express/commit/f56ce73186e885a938bfdb3d3d1005a58e6ae12b;>f56ce73
 build: supertest@6.3.0
   https://github.com/expressjs/express/commit/24b3dc551670ac4fb0cd5a2bd5ef643c9525e60f;>24b3dc5
 deps: qs@6.11.0
   https://github.com/expressjs/express/commit/689d175b8b39d8860b81d723233fb83d15201827;>689d175
 deps: body-parser@1.20.1
   https://github.com/expressjs/express/commit/340be0f79afb9b3176afb76235aa7f92acbd5050;>340be0f
 build: eslint@8.24.0
   https://github.com/expressjs/express/commit/33e8dc303af9277f8a7e4f46abfdcb5e72f6797b;>33e8dc3
 docs: use Node.js name style
   

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-07 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1042815557


##
gradle.properties:
##
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-org.gradle.jvmargs=-Xmx2g --add-exports 
jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED 
--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.security=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.management/javax.management=ALL-UNNAMED 
--add-opens=java.naming/javax.naming=ALL-UNNAMED 
--add-opens=java.rmi/sun.rmi.transport=null
+org.gradle.jvmargs=-Xmx4g --add-exports 
jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports 
jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED 
--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.security=ALL-UNNAMED 
--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.management/javax.management=ALL-UNNAMED 
--add-opens=java.naming/javax.naming=ALL-UNNAMED 
--add-opens=java.rmi/sun.rmi.transport=null

Review Comment:
   As we discussed It's generating an issue



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract-cn-fims-web-app] dependabot[bot] opened a new pull request, #35: Bump qs from 6.2.3 to 6.2.4

2022-12-07 Thread GitBox


dependabot[bot] opened a new pull request, #35:
URL: https://github.com/apache/fineract-cn-fims-web-app/pull/35

   Bumps [qs](https://github.com/ljharb/qs) from 6.2.3 to 6.2.4.
   
   Changelog
   Sourced from https://github.com/ljharb/qs/blob/main/CHANGELOG.md;>qs's 
changelog.
   
   6.2.4
   
   [Fix] parse: ignore __proto__ keys (https://github-redirect.dependabot.com/ljharb/qs/issues/428;>#428)
   [Fix] utils.merge: avoid a crash with a null target and an 
array source
   [Fix] utils.merge: avoid a crash with a null target and a 
truthy non-array source
   [Fix] utils: merge: fix crash when 
source is a truthy primitive  no options are provided
   [Fix] when parseArrays is false, properly handle keys 
ending in []
   [Robustness] stringify: avoid relying on a global 
undefined (https://github-redirect.dependabot.com/ljharb/qs/issues/427;>#427)
   [Refactor] use cached Array.isArray
   [Docs] Clarify the need for arrayLimit option
   [meta] fix README.md (https://github-redirect.dependabot.com/ljharb/qs/issues/399;>#399)
   [meta] Clean up license text so it’s properly detected as 
BSD-3-Clause
   [meta] add FUNDING.yml
   [actions] backport actions from main
   [Tests] use safer-buffer instead of Buffer 
constructor
   [Tests] remove nonexistent tape option
   [Dev Deps] backport from main
   
   
   
   
   Commits
   
   https://github.com/ljharb/qs/commit/90d9f2b45715b7b03da92113a7b8af236c01088d;>90d9f2b
 v6.2.4
   https://github.com/ljharb/qs/commit/ba24e74dd17931f825adb52f5633e48293b584e1;>ba24e74
 [Fix] parse: ignore __proto__ keys (https://github-redirect.dependabot.com/ljharb/qs/issues/428;>#428)
   https://github.com/ljharb/qs/commit/f047c9d527c329017d3d94ccbb146e6de4cff75c;>f047c9d
 [Dev Deps] backport from main
   https://github.com/ljharb/qs/commit/5f8e28bd80d8431929b85eeca35e3180147a6462;>5f8e28b
 [actions] backport actions from main
   https://github.com/ljharb/qs/commit/2c38654f781751e7401d1066ddbb596b1f58a394;>2c38654
 [Robustness] stringify: avoid relying on a global 
undefined (https://github-redirect.dependabot.com/ljharb/qs/issues/427;>#427)
   https://github.com/ljharb/qs/commit/37e176d06e6c035d1270b023ed82bc72d70aad88;>37e176d
 [meta] fix README.md (https://github-redirect.dependabot.com/ljharb/qs/issues/399;>#399)
   https://github.com/ljharb/qs/commit/081a3ab2ca94b8ebe35ed7a018300996cb3694fd;>081a3ab
 [Tests] use safer-buffer instead of Buffer 
constructor
   https://github.com/ljharb/qs/commit/943e41177c1053d287c7cb4cdef049ed84505d51;>943e411
 [meta] Clean up license text so it’s properly detected as BSD-3-Clause
   https://github.com/ljharb/qs/commit/0d8291611f243ab925be9871154ab77ce93fbe3e;>0d82916
 [Fix] utils.merge: avoid a crash with a null target and an array 
source
   https://github.com/ljharb/qs/commit/c103b909b2b4a12be5bd6437149115f31268a63a;>c103b90
 [Fix] utils.merge`: avoid a crash with a null target and a truthy 
non-array...
   Additional commits viewable in https://github.com/ljharb/qs/compare/v6.2.3...v6.2.4;>compare 
view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=qs=npm_and_yarn=6.2.3=6.2.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   - `@dependabot use these labels` will set the current labels as the default 
for future PRs for this repo and language
   - `@dependabot use 

[GitHub] [fineract] galovics merged pull request #2793: FINERACT-1760: Batch API for datatable query update

2022-12-07 Thread GitBox


galovics merged PR #2793:
URL: https://github.com/apache/fineract/pull/2793


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract-cn-group-finance] sonarcloud[bot] commented on pull request #19: Bump qs from 6.3.2 to 6.3.3

2022-12-07 Thread GitBox


sonarcloud[bot] commented on PR #19:
URL: 
https://github.com/apache/fineract-cn-group-finance/pull/19#issuecomment-1341556621

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_fineract-cn-group-finance=19)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_fineract-cn-group-finance=19=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_fineract-cn-group-finance=19=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_fineract-cn-group-finance=19=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_fineract-cn-group-finance=19=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_fineract-cn-group-finance=19)
 No Coverage information  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_fineract-cn-group-finance=19=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_fineract-cn-group-finance=19=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract-cn-group-finance] dependabot[bot] opened a new pull request, #19: Bump qs from 6.3.2 to 6.3.3

2022-12-07 Thread GitBox


dependabot[bot] opened a new pull request, #19:
URL: https://github.com/apache/fineract-cn-group-finance/pull/19

   Bumps [qs](https://github.com/ljharb/qs) from 6.3.2 to 6.3.3.
   
   Changelog
   Sourced from https://github.com/ljharb/qs/blob/main/CHANGELOG.md;>qs's 
changelog.
   
   6.3.3
   
   [Fix] parse: ignore __proto__ keys (https://github-redirect.dependabot.com/ljharb/qs/issues/428;>#428)
   [Fix] fix for an impossible situation: when the formatter is called with 
a non-string value
   [Fix] utils.merge: avoid a crash with a null target and an 
array source
   [Fix] utils.merge: avoid a crash with a null target and a 
truthy non-array source
   [Fix] stringify: fix a crash with 
strictNullHandling and a custom 
filter/serializeDate (https://github-redirect.dependabot.com/ljharb/qs/issues/279;>#279)
   [Fix] utils: merge: fix crash when 
source is a truthy primitive  no options are provided
   [Fix] when parseArrays is false, properly handle keys 
ending in []
   [Robustness] stringify: avoid relying on a global 
undefined (https://github-redirect.dependabot.com/ljharb/qs/issues/427;>#427)
   [Refactor] use cached Array.isArray
   [Refactor] stringify: Avoid arr = arr.concat(...), push to 
the existing instance (https://github-redirect.dependabot.com/ljharb/qs/issues/269;>#269)
   [Docs] Clarify the need for arrayLimit option
   [meta] fix README.md (https://github-redirect.dependabot.com/ljharb/qs/issues/399;>#399)
   [meta] Clean up license text so it’s properly detected as 
BSD-3-Clause
   [meta] add FUNDING.yml
   [actions] backport actions from main
   [Tests] use safer-buffer instead of Buffer 
constructor
   [Tests] remove nonexistent tape option
   [Dev Deps] backport from main
   
   
   
   
   Commits
   
   https://github.com/ljharb/qs/commit/ff235b4ca81f82728b745b71fbd4bad173535305;>ff235b4
 v6.3.3
   https://github.com/ljharb/qs/commit/4310742efbd8c03f6495f07906b45213da0a32ec;>4310742
 [Fix] parse: ignore __proto__ keys (https://github-redirect.dependabot.com/ljharb/qs/issues/428;>#428)
   https://github.com/ljharb/qs/commit/da1eee03f599f3cdd802557874257091b3c4dac1;>da1eee0
 [Dev Deps] backport from main
   https://github.com/ljharb/qs/commit/2c103b6fd7fefc22004b8889f3f0de34d8cf9b38;>2c103b6
 [actions] backport actions from main
   https://github.com/ljharb/qs/commit/aa4580e6911e1cf2e25d9d38250db6e960f0ef33;>aa4580e
 [Robustness] stringify: avoid relying on a global 
undefined (https://github-redirect.dependabot.com/ljharb/qs/issues/427;>#427)
   https://github.com/ljharb/qs/commit/f8510a125b6963af3964b5b885adf68e04ffee83;>f8510a1
 [meta] fix README.md (https://github-redirect.dependabot.com/ljharb/qs/issues/399;>#399)
   https://github.com/ljharb/qs/commit/4c036ced428e265037f6d4d69034f88d3da2601f;>4c036ce
 [Fix] fix for an impossible situation: when the formatter is called with a 
no...
   https://github.com/ljharb/qs/commit/180bfa532e5a1be34323c97e5067fe0c7fda6a0d;>180bfa5
 [meta] Clean up license text so it’s properly detected as BSD-3-Clause
   https://github.com/ljharb/qs/commit/e0b2c4b0d4a126337bb550395e61265258c3c083;>e0b2c4b
 [Tests] use safer-buffer instead of Buffer 
constructor
   https://github.com/ljharb/qs/commit/f7139bfdb67312a6f8c55ecc7ec4657f6d60ae89;>f7139bf
 [Fix] utils.merge: avoid a crash with a null target and an array 
source
   Additional commits viewable in https://github.com/ljharb/qs/compare/v6.3.2...v6.3.3;>compare 
view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=qs=npm_and_yarn=6.3.2=6.3.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-07 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1042269698


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -463,7 +459,7 @@ public boolean isWithdrawn() {
 return ClientStatus.fromInt(this.status).isWithdrawn();
 }
 
-public Map update(final JsonCommand command) {
+public Map update(final ExternalId externalId, final 
JsonCommand command) {

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy opened a new pull request, #2793: FINERACT-1760: Batch API for datatable query update

2022-12-07 Thread GitBox


adamsaghy opened a new pull request, #2793:
URL: https://github.com/apache/fineract/pull/2793

   ## Description
   
   Describe the changes made and why they were made.
   
   Ignore if these details are present on the associated [Apache Fineract JIRA 
ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-07 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1042242044


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientDomainServiceImpl.java:
##
@@ -0,0 +1,225 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.client.domain;
+
+import java.time.LocalDate;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.fineract.infrastructure.codes.domain.CodeValue;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.domain.ExternalId;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.organisation.office.domain.Office;
+import org.apache.fineract.organisation.staff.domain.Staff;
+import org.apache.fineract.portfolio.client.api.ClientApiConstants;
+import org.apache.fineract.portfolio.group.domain.Group;
+import org.apache.fineract.useradministration.domain.AppUser;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ClientDomainServiceImpl implements ClientDomainService {
+
+@Override
+public Client createClient(final AppUser currentUser, final Office 
clientOffice, final Group clientParentGroup, final Staff staff,
+final Long savingsProductId, final CodeValue gender, final 
CodeValue clientType, final CodeValue clientClassification,
+final Integer legalForm, final ExternalId externalId, final 
JsonCommand command) {
+
+final String accountNo = 
command.stringValueOfParameterNamed(ClientApiConstants.accountNoParamName);
+final String mobileNo = 
command.stringValueOfParameterNamed(ClientApiConstants.mobileNoParamName);
+final String emailAddress = 
command.stringValueOfParameterNamed(ClientApiConstants.emailAddressParamName);
+
+final String firstname = 
command.stringValueOfParameterNamed(ClientApiConstants.firstnameParamName);
+final String middlename = 
command.stringValueOfParameterNamed(ClientApiConstants.middlenameParamName);
+final String lastname = 
command.stringValueOfParameterNamed(ClientApiConstants.lastnameParamName);
+final String fullname = 
command.stringValueOfParameterNamed(ClientApiConstants.fullnameParamName);
+
+final boolean isStaff = 
command.booleanPrimitiveValueOfParameterNamed(ClientApiConstants.isStaffParamName);
+
+final LocalDate dataOfBirth = 
command.localDateValueOfParameterNamed(ClientApiConstants.dateOfBirthParamName);
+
+ClientStatus status = ClientStatus.PENDING;
+boolean active = false;
+if (command.hasParameter("active")) {
+active = 
command.booleanPrimitiveValueOfParameterNamed(ClientApiConstants.activeParamName);
+}
+
+LocalDate activationDate = null;
+LocalDate officeJoiningDate = null;
+if (active) {
+status = ClientStatus.ACTIVE;
+activationDate = 
command.localDateValueOfParameterNamed(ClientApiConstants.activationDateParamName);
+officeJoiningDate = activationDate;
+}
+
+LocalDate submittedOnDate = DateUtils.getBusinessLocalDate();
+if (command.hasParameter(ClientApiConstants.submittedOnDateParamName)) 
{
+submittedOnDate = 
command.localDateValueOfParameterNamed(ClientApiConstants.submittedOnDateParamName);
+}
+if (active && submittedOnDate.isAfter(activationDate)) {
+submittedOnDate = activationDate;
+}
+final Long savingsAccountId = null;
+
+return Client.instance(currentUser, status, clientOffice, 
clientParentGroup, accountNo, firstname, middlename, lastname, fullname,
+activationDate, officeJoiningDate, externalId, mobileNo, 
emailAddress, staff, submittedOnDate, savingsProductId,
+savingsAccountId, dataOfBirth, gender, clientType, 
clientClassification, legalForm, isStaff);
+
+}
+
+@Override
+public Map updateClient(Client client, final ExternalId 
externalId, final JsonCommand command) {
+
+final Map actualChanges = 

[GitHub] [fineract] galovics commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-07 Thread GitBox


galovics commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1042072148


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java:
##
@@ -370,77 +305,141 @@ public Collection 
retrieveActiveClientMembersOfGroup(final Long grou
 hierarchySearchString, groupId, 
ClientStatus.ACTIVE.getValue());
 }
 
-private static final class ClientMembersOfGroupMapper implements 
RowMapper {
+private String buildSqlStringFromClientCriteria(String schemaSql, final 
SearchParameters searchParameters, List paramList) {
+
+String sqlSearch = searchParameters.getSqlSearch();
+final Long officeId = searchParameters.getOfficeId();
+final String externalId = searchParameters.getExternalId();
+final String displayName = searchParameters.getName();
+final String firstname = searchParameters.getFirstname();
+final String lastname = searchParameters.getLastname();
+final String status = searchParameters.getStatus();
+
+String extraCriteria = "";
+if (sqlSearch != null) {
+sqlSearch = sqlSearch.replaceAll(" display_name ", " 
c.display_name ");
+sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name 
");
+extraCriteria = " and (" + sqlSearch + ")";
+this.columnValidator.validateSqlInjection(schemaSql, sqlSearch);
+}
+
+if (officeId != null) {
+extraCriteria += " and c.office_id = ? ";
+paramList.add(officeId);
+}
+
+if (externalId != null) {
+paramList.add(externalId);
+extraCriteria += " and c.external_id like ? ";
+}
+
+if (displayName != null) {
+// extraCriteria += " and concatcoalesce(c.firstname, ''),
+// if(c.firstname > '',' ', '') , coalesce(c.lastname, '')) like "
+paramList.add("%" + displayName + "%");
+extraCriteria += " and c.display_name like ? ";
+}
+
+if (status != null) {
+ClientStatus clientStatus = ClientStatus.fromString(status);
+extraCriteria += " and c.status_enum = " + 
clientStatus.getValue().toString() + " ";
+}
+
+if (firstname != null) {
+paramList.add(firstname);
+extraCriteria += " and c.firstname like ? ";
+}
+
+if (lastname != null) {
+paramList.add(lastname);
+extraCriteria += " and c.lastname like ? ";
+}
+
+if (searchParameters.isScopedByOfficeHierarchy()) {
+paramList.add(searchParameters.getHierarchy() + "%");
+extraCriteria += " and o.hierarchy like ? ";
+}
+
+if (searchParameters.isOrphansOnly()) {
+extraCriteria += " and c.id NOT IN (select client_id from 
m_group_client) ";
+}
+
+if (StringUtils.isNotBlank(extraCriteria)) {
+extraCriteria = extraCriteria.substring(4);
+}
+return extraCriteria;
+}
+
+private static final class ClientToDataMapper implements 
RowMapper {
 
 private final String schema;
 
-ClientMembersOfGroupMapper() {
-final StringBuilder sqlBuilder = new StringBuilder(200);
+ClientToDataMapper() {
+final StringBuilder builder = new StringBuilder(400);
 
-sqlBuilder.append(
+builder.append(
 "c.id as id, c.account_no as accountNo, c.external_id as 
externalId, c.status_enum as statusEnum,c.sub_status as subStatus, ");
-sqlBuilder.append(
+builder.append(
 "cvSubStatus.code_value as 
subStatusValue,cvSubStatus.code_description as subStatusDesc,c.office_id as 
officeId, o.name as officeName, ");
-sqlBuilder.append("c.transfer_to_office_id as transferToOfficeId, 
transferToOffice.name as transferToOfficeName, ");
-sqlBuilder.append("c.firstname as firstname, c.middlename as 
middlename, c.lastname as lastname, ");
-sqlBuilder.append("c.fullname as fullname, c.display_name as 
displayName, ");
-sqlBuilder.append("c.mobile_no as mobileNo, ");
-sqlBuilder.append("c.is_staff as isStaff, ");
-sqlBuilder.append("c.email_address as emailAddress, ");
-sqlBuilder.append("c.date_of_birth as dateOfBirth, ");
-sqlBuilder.append("c.gender_cv_id as genderId, ");
-sqlBuilder.append("cv.code_value as genderValue, ");
-sqlBuilder.append("c.client_type_cv_id as clienttypeId, ");
-sqlBuilder.append("cvclienttype.code_value as clienttypeValue, ");
-sqlBuilder.append("c.client_classification_cv_id as 
classificationId, ");
-sqlBuilder.append("cvclassification.code_value as 
classificationValue, ");
-sqlBuilder.append("c.legal_form_enum as legalFormEnum, 

[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-07 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041911963


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -358,7 +324,7 @@ private void validate() {
 
 }
 
-private void validateUpdate() {
+public void validateUpdate() {

Review Comment:
   you might wanna move this method into the `ClientDomainServiceImpl`. it is 
not used anywhere else.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-07 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041911174


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientDomainServiceImpl.java:
##
@@ -0,0 +1,225 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.client.domain;
+
+import java.time.LocalDate;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.fineract.infrastructure.codes.domain.CodeValue;
+import org.apache.fineract.infrastructure.core.api.JsonCommand;
+import org.apache.fineract.infrastructure.core.domain.ExternalId;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.organisation.office.domain.Office;
+import org.apache.fineract.organisation.staff.domain.Staff;
+import org.apache.fineract.portfolio.client.api.ClientApiConstants;
+import org.apache.fineract.portfolio.group.domain.Group;
+import org.apache.fineract.useradministration.domain.AppUser;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ClientDomainServiceImpl implements ClientDomainService {
+
+@Override
+public Client createClient(final AppUser currentUser, final Office 
clientOffice, final Group clientParentGroup, final Staff staff,
+final Long savingsProductId, final CodeValue gender, final 
CodeValue clientType, final CodeValue clientClassification,
+final Integer legalForm, final ExternalId externalId, final 
JsonCommand command) {
+
+final String accountNo = 
command.stringValueOfParameterNamed(ClientApiConstants.accountNoParamName);
+final String mobileNo = 
command.stringValueOfParameterNamed(ClientApiConstants.mobileNoParamName);
+final String emailAddress = 
command.stringValueOfParameterNamed(ClientApiConstants.emailAddressParamName);
+
+final String firstname = 
command.stringValueOfParameterNamed(ClientApiConstants.firstnameParamName);
+final String middlename = 
command.stringValueOfParameterNamed(ClientApiConstants.middlenameParamName);
+final String lastname = 
command.stringValueOfParameterNamed(ClientApiConstants.lastnameParamName);
+final String fullname = 
command.stringValueOfParameterNamed(ClientApiConstants.fullnameParamName);
+
+final boolean isStaff = 
command.booleanPrimitiveValueOfParameterNamed(ClientApiConstants.isStaffParamName);
+
+final LocalDate dataOfBirth = 
command.localDateValueOfParameterNamed(ClientApiConstants.dateOfBirthParamName);
+
+ClientStatus status = ClientStatus.PENDING;
+boolean active = false;
+if (command.hasParameter("active")) {
+active = 
command.booleanPrimitiveValueOfParameterNamed(ClientApiConstants.activeParamName);
+}
+
+LocalDate activationDate = null;
+LocalDate officeJoiningDate = null;
+if (active) {
+status = ClientStatus.ACTIVE;
+activationDate = 
command.localDateValueOfParameterNamed(ClientApiConstants.activationDateParamName);
+officeJoiningDate = activationDate;
+}
+
+LocalDate submittedOnDate = DateUtils.getBusinessLocalDate();
+if (command.hasParameter(ClientApiConstants.submittedOnDateParamName)) 
{
+submittedOnDate = 
command.localDateValueOfParameterNamed(ClientApiConstants.submittedOnDateParamName);
+}
+if (active && submittedOnDate.isAfter(activationDate)) {
+submittedOnDate = activationDate;
+}
+final Long savingsAccountId = null;
+
+return Client.instance(currentUser, status, clientOffice, 
clientParentGroup, accountNo, firstname, middlename, lastname, fullname,
+activationDate, officeJoiningDate, externalId, mobileNo, 
emailAddress, staff, submittedOnDate, savingsProductId,
+savingsAccountId, dataOfBirth, gender, clientType, 
clientClassification, legalForm, isStaff);
+
+}
+
+@Override
+public Map updateClient(Client client, final ExternalId 
externalId, final JsonCommand command) {
+
+final Map actualChanges = new 

[GitHub] [fineract] galovics merged pull request #2788: FINERACT-1827: Last installment is not closed if there is a chargeback transaction

2022-12-06 Thread GitBox


galovics merged PR #2788:
URL: https://github.com/apache/fineract/pull/2788


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


adamsaghy commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041379158


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -463,7 +459,7 @@ public boolean isWithdrawn() {
 return ClientStatus.fromInt(this.status).isWithdrawn();
 }
 
-public Map update(final JsonCommand command) {
+public Map update(final ExternalId externalId, final 
JsonCommand command) {

Review Comment:
   i thought you will move this logic into the only service which calls it... :/



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041320902


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformService.java:
##
@@ -60,4 +61,7 @@ public interface ClientReadPlatformService {
 LocalDate retrieveClientTransferProposalDate(Long clientId);
 
 void validateClient(Long clientId);
+

Review Comment:
   This is a legacy code, but anyway, removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041317869


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -224,12 +227,11 @@ public class Client extends 
AbstractAuditableWithUTCDateTimeCustom {
 @OneToMany(mappedBy = "client", cascade = CascadeType.ALL, orphanRemoval = 
true, fetch = FetchType.LAZY)
 private Set clientCollateralManagements = new 
HashSet<>();
 
-public static Client createNew(final AppUser currentUser, final Office 
clientOffice, final Group clientParentGroup, final Staff staff,
+public static Client instance(final AppUser currentUser, final Office 
clientOffice, final Group clientParentGroup, final Staff staff,
 final Long savingsProductId, final CodeValue gender, final 
CodeValue clientType, final CodeValue clientClassification,
-final Integer legalForm, final JsonCommand command) {
+final Integer legalForm, final ExternalId externalId, final 
JsonCommand command) {

Review Comment:
   Done, Interface and Service created `ClientDomainService` 



##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -463,7 +459,7 @@ public boolean isWithdrawn() {
 return ClientStatus.fromInt(this.status).isWithdrawn();
 }
 
-public Map update(final JsonCommand command) {
+public Map update(final ExternalId externalId, final 
JsonCommand command) {

Review Comment:
   Done, Interface and Service created `ClientDomainService` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2787: chore(deps): update all non-major dependencies

2022-12-06 Thread GitBox


galovics merged PR #2787:
URL: https://github.com/apache/fineract/pull/2787


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] adamsaghy merged pull request #2792: FINERACT-1828: Fix datatable audit time handling

2022-12-06 Thread GitBox


adamsaghy merged PR #2792:
URL: https://github.com/apache/fineract/pull/2792


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041084358


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientExternalIdTest.java:
##
@@ -0,0 +1,320 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import io.restassured.builder.RequestSpecBuilder;
+import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.ContentType;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.util.List;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.client.models.DeleteClientsClientIdResponse;
+import org.apache.fineract.client.models.GetClientTransferProposalDateResponse;
+import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse;
+import org.apache.fineract.client.models.GetClientsClientIdResponse;
+import org.apache.fineract.client.models.GetObligeeData;
+import org.apache.fineract.client.models.PostClientsClientIdResponse;
+import org.apache.fineract.client.models.PostClientsResponse;
+import org.apache.fineract.client.models.PutClientsClientIdResponse;
+import org.apache.fineract.integrationtests.common.ClientHelper;
+import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.apache.fineract.portfolio.client.domain.ClientStatus;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+@Slf4j
+public class ClientExternalIdTest {
+
+private ResponseSpecification responseSpec;
+private RequestSpecification requestSpec;
+
+@BeforeEach
+public void setup() {
+Utils.initializeRESTAssured();
+requestSpec = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
+requestSpec.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
+responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
false);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNull(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClientWithValue() {
+// given
+final String externalId = Utils.randomStringGenerator("ID_", 7);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+externalId);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNotNull(clientResponse.getResourceExternalId());
+assertEquals(externalId, clientResponse.getResourceExternalId());
+
+fetchClientByExternalId(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOnCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
true);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+  

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041079865


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientExternalIdTest.java:
##
@@ -0,0 +1,320 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import io.restassured.builder.RequestSpecBuilder;
+import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.ContentType;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.util.List;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.client.models.DeleteClientsClientIdResponse;
+import org.apache.fineract.client.models.GetClientTransferProposalDateResponse;
+import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse;
+import org.apache.fineract.client.models.GetClientsClientIdResponse;
+import org.apache.fineract.client.models.GetObligeeData;
+import org.apache.fineract.client.models.PostClientsClientIdResponse;
+import org.apache.fineract.client.models.PostClientsResponse;
+import org.apache.fineract.client.models.PutClientsClientIdResponse;
+import org.apache.fineract.integrationtests.common.ClientHelper;
+import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.apache.fineract.portfolio.client.domain.ClientStatus;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+@Slf4j
+public class ClientExternalIdTest {
+
+private ResponseSpecification responseSpec;
+private RequestSpecification requestSpec;
+
+@BeforeEach
+public void setup() {
+Utils.initializeRESTAssured();
+requestSpec = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
+requestSpec.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
+responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
false);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNull(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClientWithValue() {
+// given
+final String externalId = Utils.randomStringGenerator("ID_", 7);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+externalId);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNotNull(clientResponse.getResourceExternalId());
+assertEquals(externalId, clientResponse.getResourceExternalId());
+
+fetchClientByExternalId(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOnCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
true);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+  

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041079491


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientExternalIdTest.java:
##
@@ -0,0 +1,320 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import io.restassured.builder.RequestSpecBuilder;
+import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.ContentType;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.util.List;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.client.models.DeleteClientsClientIdResponse;
+import org.apache.fineract.client.models.GetClientTransferProposalDateResponse;
+import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse;
+import org.apache.fineract.client.models.GetClientsClientIdResponse;
+import org.apache.fineract.client.models.GetObligeeData;
+import org.apache.fineract.client.models.PostClientsClientIdResponse;
+import org.apache.fineract.client.models.PostClientsResponse;
+import org.apache.fineract.client.models.PutClientsClientIdResponse;
+import org.apache.fineract.integrationtests.common.ClientHelper;
+import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.apache.fineract.portfolio.client.domain.ClientStatus;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+@Slf4j
+public class ClientExternalIdTest {
+
+private ResponseSpecification responseSpec;
+private RequestSpecification requestSpec;
+
+@BeforeEach
+public void setup() {
+Utils.initializeRESTAssured();
+requestSpec = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
+requestSpec.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
+responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
false);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNull(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClientWithValue() {
+// given
+final String externalId = Utils.randomStringGenerator("ID_", 7);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+externalId);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNotNull(clientResponse.getResourceExternalId());
+assertEquals(externalId, clientResponse.getResourceExternalId());
+
+fetchClientByExternalId(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOnCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
true);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+  

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041080198


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientExternalIdTest.java:
##
@@ -0,0 +1,320 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import io.restassured.builder.RequestSpecBuilder;
+import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.ContentType;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import java.util.List;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.client.models.DeleteClientsClientIdResponse;
+import org.apache.fineract.client.models.GetClientTransferProposalDateResponse;
+import org.apache.fineract.client.models.GetClientsClientIdAccountsResponse;
+import org.apache.fineract.client.models.GetClientsClientIdResponse;
+import org.apache.fineract.client.models.GetObligeeData;
+import org.apache.fineract.client.models.PostClientsClientIdResponse;
+import org.apache.fineract.client.models.PostClientsResponse;
+import org.apache.fineract.client.models.PutClientsClientIdResponse;
+import org.apache.fineract.integrationtests.common.ClientHelper;
+import org.apache.fineract.integrationtests.common.GlobalConfigurationHelper;
+import org.apache.fineract.integrationtests.common.Utils;
+import org.apache.fineract.portfolio.client.domain.ClientStatus;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+@Slf4j
+public class ClientExternalIdTest {
+
+private ResponseSpecification responseSpec;
+private RequestSpecification requestSpec;
+
+@BeforeEach
+public void setup() {
+Utils.initializeRESTAssured();
+requestSpec = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
+requestSpec.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
+responseSpec = new ResponseSpecBuilder().expectStatusCode(200).build();
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
false);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNull(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOffCreateClientWithValue() {
+// given
+final String externalId = Utils.randomStringGenerator("ID_", 7);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+externalId);
+// when
+final PostClientsResponse clientResponse = 
ClientHelper.addClientAsPerson(requestSpec, responseSpec, jsonPayload);
+// then
+assertNotNull(clientResponse);
+assertNotNull(clientResponse.getResourceExternalId());
+assertEquals(externalId, clientResponse.getResourceExternalId());
+
+fetchClientByExternalId(clientResponse.getResourceExternalId());
+}
+
+@Test
+public void whenAutoExternalIdConfigIsOnCreateClient() {
+// given
+GlobalConfigurationHelper.manageConfigurations(requestSpec, 
responseSpec,
+GlobalConfigurationHelper.ENABLE_AUTOGENERATED_EXTERNAL_ID, 
true);
+final String jsonPayload = 
ClientHelper.getBasicClientAsJSON(ClientHelper.DEFAULT_OFFICE_ID, 
ClientHelper.LEGALFORM_ID_PERSON,
+null);
+// when
+  

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041075520


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java:
##
@@ -86,8 +87,21 @@ public Client getActiveClientInUserScope(Long clientId) {
 public Client getClientByAccountNumber(String accountNumber) {
 Client client = 
this.repository.getClientByAccountNumber(accountNumber);
 if (client == null) {
-throw new ClientNotFoundException(accountNumber);
+throw new ClientNotFoundException(accountNumber, "account.number");
 }
 return client;
 }
+
+public Client getClientByClientId(final Long clientId, final String 
hierarchySearchString) {

Review Comment:
   Done, updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041073352


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##
@@ -763,30 +750,18 @@ public boolean isStaff() {
 return this.isStaff;
 }
 
-public String getExternalId() {
-return this.externalId;
+public void setExternalId(ExternalId externalId) {

Review Comment:
   Removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041069351


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041068946


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041068105


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041066866


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041066272


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041064743


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041063786


##
fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java:
##
@@ -415,25 +300,302 @@ public String 
postClientTemplate(@QueryParam("legalFormType") final String legal
 
 @GET
 @Path("{clientId}/obligeedetails")
-@Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client obligee details", description = 
"Retrieve client obligee details")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
 public String retrieveObligeeDetails(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientObligeeDetails(clientId, null);
+}
 
-
context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME);
-
-final List ObligeeList = 
guarantorReadPlatformService.retrieveObligeeDetails(clientId);
+@GET
+@Path("{clientId}/transferproposaldate")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client transfer template", description = 
"Retrieve client transfer template")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+return retrieveClientTransferTemplate(clientId, null);
+}
 
-return toApiJsonSerializer.serialize(ObligeeList);
+@GET
+@Path("/external-id/{externalId}")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve a Client by External Id", description = 
"Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
++ "clients/123-456?template=true\n" + "\n" + "\n" + 
"clients/123-456?fields=id,displayName,officeName")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
+public String retrieveOne(@PathParam("externalId") @Parameter(description 
= "externalId") final String externalId,
+@Context final UriInfo uriInfo,
+@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") 
@Parameter(description = "staffInSelectedOfficeOnly") final boolean 
staffInSelectedOfficeOnly) {
+return retrieveClient(null, externalId, staffInSelectedOfficeOnly, 
uriInfo);
 }
 
 @GET
-@Path("{clientId}/transferproposaldate")
+@Path("/external-id/{externalId}/accounts")
+@Produces({ MediaType.APPLICATION_JSON })
+@Operation(summary = "Retrieve client accounts overview", description = 
"An example of how a loan portfolio summary can be provided. This is requested 
in a specific use case of the community application.\n"
++ "It is quite reasonable to add resources like this to simplify 
User Interface development.\n" + "\n" + "Example Requests:\n "
++ "\n" + "clients/123-456/accounts\n" + "\n" + 
"clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
+@ApiResponses({
+@ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
+@ApiResponse(responseCode = "400", description = "Bad Request") })
+public String retrieveAssociatedAccounts(@PathParam("externalId") 
@Parameter(description = "externalId") final String externalId,
+@Context final UriInfo uriInfo) {
+return retrieveClientAccounts(null, externalId, uriInfo);
+}
+
+@PUT
+@Path("/external-id/{externalId}")
 @Consumes({ MediaType.APPLICATION_JSON })
 @Produces({ MediaType.APPLICATION_JSON })
-public String retrieveTransferTemplate(@PathParam("clientId") final Long 
clientId, @Context final UriInfo uriInfo) {
+@Operation(summary = "Update a Client using the External Id", description 
= "Note: You can update any of the basic attributes of a client (but not its 
associations) using this API.\n"
++ "\n"
++ "Changing the relationship between a client and its office is 
not supported through this API. An API specific to handling transfers of 
clients between offices is available for the same.\n"
++ "\n" + "The relationship 

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2783: FINERACT-1760: Client by External Id

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2783:
URL: https://github.com/apache/fineract/pull/2783#discussion_r1041060275


##
fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java:
##
@@ -130,7 +130,7 @@ protected void setClientAndGroupDateLookupTable(Sheet 
sheet, List cl
 }
 if (containsClientExtId) {
 if (client.getExternalId() != null) {

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2788: FINERACT-1827: Fix to set obligation met date for installment with chargeback transa…

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2788:
URL: https://github.com/apache/fineract/pull/2788#discussion_r1041003032


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+// Pay the Loan to get this as Closed
+loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+assertNotNull(loanIdTransactionsResponse);
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+// Evaluate Installments
+GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+if (getLoanRepaymentSchedule != null) {
+log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+if (period.getPeriod() != null) {
+log.info("Period number {} completed on date {}", 
period.getPeriod(), period.getObligationsMetOnDate());
+assertNotNull(period.getObligationsMetOnDate());

Review Comment:
   The result gets all the periods and It includes the first period 
(disbursement) and this period has not due date, obligations date, period 
number, etc



##
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+// Pay the Loan to get this as Closed
+loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+assertNotNull(loanIdTransactionsResponse);
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+// Evaluate Installments
+GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+if (getLoanRepaymentSchedule != null) {
+log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+if (period.getPeriod() != null) {
+log.info("Period number {} completed on date {}", 
period.getPeriod(), period.getObligationsMetOnDate());
+assertNotNull(period.getObligationsMetOnDate());

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2788: FINERACT-1827: Fix to set obligation met date for installment with chargeback transa…

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2788:
URL: https://github.com/apache/fineract/pull/2788#discussion_r1041016880


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+// Pay the Loan to get this as Closed
+loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+assertNotNull(loanIdTransactionsResponse);
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+// Evaluate Installments
+GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+if (getLoanRepaymentSchedule != null) {
+log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+if (period.getPeriod() != null) {

Review Comment:
   The result gets all the periods and It includes the first period 
(disbursement) and this period has not due date, obligations date, period 
number, etc



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2788: FINERACT-1827: Fix to set obligation met date for installment with chargeback transa…

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2788:
URL: https://github.com/apache/fineract/pull/2788#discussion_r1041012950


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+// Pay the Loan to get this as Closed
+loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+assertNotNull(loanIdTransactionsResponse);
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+// Evaluate Installments
+GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+if (getLoanRepaymentSchedule != null) {

Review Comment:
   Done! now use an assertion



##
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+// Pay the Loan to get this as Closed
+loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+assertNotNull(loanIdTransactionsResponse);
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+// Evaluate Installments
+GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+if (getLoanRepaymentSchedule != null) {
+log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+if (period.getPeriod() != null) {
+log.info("Period number {} completed on date {}", 
period.getPeriod(), period.getObligationsMetOnDate());
+assertNotNull(period.getObligationsMetOnDate());
+assertEquals(true, period.getComplete());

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2788: FINERACT-1827: Fix to set obligation met date for installment with chargeback transa…

2022-12-06 Thread GitBox


josehernandezfintecheandomx commented on code in PR #2788:
URL: https://github.com/apache/fineract/pull/2788#discussion_r1041003032


##
integration-tests/src/test/java/org/apache/fineract/integrationtests/DelinquencyAndChargebackIntegrationTest.java:
##
@@ -281,6 +285,26 @@ public void 
testLoanClassificationStepAsPartOfCOBRepeated() {
 getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
 validateLoanAccount(getLoansLoanIdResponse, amountVal, "400.00", 7, 
Double.valueOf("400.00"));
 
+// Pay the Loan to get this as Closed
+loanIdTransactionsResponse = 
loanTransactionHelper.makeLoanRepayment(operationDate, transactionAmount, 
loanId);
+assertNotNull(loanIdTransactionsResponse);
+getLoansLoanIdResponse = loanTransactionHelper.getLoan(requestSpec, 
responseSpec, loanId);
+assertEquals(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue(), 
getLoansLoanIdResponse.getStatus().getId());
+log.info("Loan id {} with status {}", loanId, 
getLoansLoanIdResponse.getStatus().getCode());
+
+// Evaluate Installments
+GetLoansLoanIdRepaymentSchedule getLoanRepaymentSchedule = 
getLoansLoanIdResponse.getRepaymentSchedule();
+if (getLoanRepaymentSchedule != null) {
+log.info("Loan with {} periods", 
getLoanRepaymentSchedule.getPeriods().size());
+for (GetLoansLoanIdRepaymentPeriod period : 
getLoanRepaymentSchedule.getPeriods()) {
+if (period.getPeriod() != null) {
+log.info("Period number {} completed on date {}", 
period.getPeriod(), period.getObligationsMetOnDate());
+assertNotNull(period.getObligationsMetOnDate());

Review Comment:
   The result gets all the periods and It includes the first period 
(disbursement) and this period has not due date, obligations date, period 
number, etc



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [fineract] galovics merged pull request #2753: FINERACT-1816: Create client with datatable subentity type

2022-12-06 Thread GitBox


galovics merged PR #2753:
URL: https://github.com/apache/fineract/pull/2753


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



<    1   2   3   4   5   6   7   8   9   10   >