You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/01/03 09:32:26 UTC

[GitHub] [fineract] rrpawar96 opened a new pull request #1979: FINERACT-1375:ClientEntityPerson

rrpawar96 opened a new pull request #1979:
URL: https://github.com/apache/fineract/pull/1979


   ## 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/api-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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] francisguchie commented on pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
francisguchie commented on pull request #1979:
URL: https://github.com/apache/fineract/pull/1979#issuecomment-979337940


   Thanks @rrpawar96  
   @awasum  @ptuomola  please note that i have already tested the functionality of this and works for me like 


-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] ptuomola commented on a change in pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
ptuomola commented on a change in pull request #1979:
URL: https://github.com/apache/fineract/pull/1979#discussion_r757739007



##########
File path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
##########
@@ -1336,6 +1344,16 @@ private String dataScopedSQL(final String appTable, final Long appTableId) {
                     + " join m_office o on o.id = c.office_id and o.hierarchy like '" + currentUser.getOffice().getHierarchy() + "%'"
                     + " where c.id = " + appTableId;
         }
+        if (appTable.equalsIgnoreCase("m_client_person")) {
+            scopedSQL = "select o.id as officeId, null as groupId, c.id as clientId, null as savingsId, null as loanId, null as entityId from m_client c "
+                    + " join m_office o on o.id = c.office_id and o.hierarchy like '" + currentUser.getOffice().getHierarchy() + "%'"
+                    + " where c.id = " + appTableId;
+        }
+        if (appTable.equalsIgnoreCase("m_client_entity")) {
+            scopedSQL = "select o.id as officeId, null as groupId, c.id as clientId, null as savingsId, null as loanId, null as entityId from m_client c "
+                    + " join m_office o on o.id = c.office_id and o.hierarchy like '" + currentUser.getOffice().getHierarchy() + "%'"
+                    + " where c.id = " + appTableId;
+        }

Review comment:
       Aren't these two SQL identical? If yes then can you combine them to one if with or condition?




-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] rrpawar96 commented on pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on pull request #1979:
URL: https://github.com/apache/fineract/pull/1979#issuecomment-1003026920


   @ptuomola Please review this PR, This PR resolves the issue by adding a parameter called legalFormName,  while creating Datatables, this param will store value either PERSON or ENTITY, to show the respective datatables to the respective clients (type: person or entity).


-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] rrpawar96 commented on a change in pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on a change in pull request #1979:
URL: https://github.com/apache/fineract/pull/1979#discussion_r778810351



##########
File path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
##########
@@ -1336,6 +1344,16 @@ private String dataScopedSQL(final String appTable, final Long appTableId) {
                     + " join m_office o on o.id = c.office_id and o.hierarchy like '" + currentUser.getOffice().getHierarchy() + "%'"
                     + " where c.id = " + appTableId;
         }
+        if (appTable.equalsIgnoreCase("m_client_person")) {
+            scopedSQL = "select o.id as officeId, null as groupId, c.id as clientId, null as savingsId, null as loanId, null as entityId from m_client c "
+                    + " join m_office o on o.id = c.office_id and o.hierarchy like '" + currentUser.getOffice().getHierarchy() + "%'"
+                    + " where c.id = " + appTableId;
+        }
+        if (appTable.equalsIgnoreCase("m_client_entity")) {
+            scopedSQL = "select o.id as officeId, null as groupId, c.id as clientId, null as savingsId, null as loanId, null as entityId from m_client c "
+                    + " join m_office o on o.id = c.office_id and o.hierarchy like '" + currentUser.getOffice().getHierarchy() + "%'"
+                    + " where c.id = " + appTableId;
+        }

Review comment:
       Ya, In the latest commit, the changes in those SQL scripts have been reversed, and no new changes made.




-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] ptuomola closed pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
ptuomola closed pull request #1979:
URL: https://github.com/apache/fineract/pull/1979


   


-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] rrpawar96 closed pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
rrpawar96 closed pull request #1979:
URL: https://github.com/apache/fineract/pull/1979


   


-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] rrpawar96 closed pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
rrpawar96 closed pull request #1979:
URL: https://github.com/apache/fineract/pull/1979


   


-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] rrpawar96 commented on pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
rrpawar96 commented on pull request #1979:
URL: https://github.com/apache/fineract/pull/1979#issuecomment-1005621429


   @ptuomola, Comment has been addressed, Please re-review the PR.


-- 
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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] ptuomola commented on pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
ptuomola commented on pull request #1979:
URL: https://github.com/apache/fineract/pull/1979#issuecomment-1003317459


   Hi @rrpawar96 - instead of making this very specific to m_client by calling the parameter legalFormName, should we make this a bit more generic? I.e. if you call the new parameter / column something like 'entitySubType' then it could be reused for other tables as well (e.g. only valid for some offices / loans / savings accounts 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-unsubscribe@fineract.apache.org

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



[GitHub] [fineract] ptuomola merged pull request #1979: FINERACT-1375:ClientEntityPerson

Posted by GitBox <gi...@apache.org>.
ptuomola merged pull request #1979:
URL: https://github.com/apache/fineract/pull/1979


   


-- 
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-unsubscribe@fineract.apache.org

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