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/04/26 15:54:23 UTC

[GitHub] [fineract] josehernandezfintecheandomx commented on a diff in pull request #2295: Datatables Backward compatibility with CodeLookUp values

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


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java:
##########
@@ -226,38 +216,16 @@ public List<ResultsetColumnHeaderData> fillResultsetColumnHeaders(final String d
 
             List<ResultsetColumnValueData> columnValues = new ArrayList<>();
             String codeName = null;
-            if ("varchar".equalsIgnoreCase(columnType)) {
-
-                final int codePosition = columnName.indexOf("_cv");
+            final int codePosition = columnName.indexOf("_cd");
+            if ("varchar".equalsIgnoreCase(columnType) || "int".equalsIgnoreCase(columnType) || "integer".equalsIgnoreCase(columnType)) {
                 if (codePosition > 0) {
                     codeName = columnName.substring(0, codePosition);
-
                     columnValues = retreiveColumnValues(codeName);
                 }
-

Review Comment:
   There were a couple of unused components and I applied some refactoring because there was some duplicated code to do the same steps



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