Skip to content

Conversation

hamzafarooqX
Copy link
Collaborator

Description

Describe the changes made and why they were made.

Ignore if these details are present on the associated Apache Fineract JIRA ticket.

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.

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 14:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds next installment due date functionality to loan accounts data by implementing a new field that tracks the next unpaid installment date for active loans.

  • Adds SQL query logic to calculate the next installment due date for active loans (status 200, 300)
  • Introduces a new constant for the next installment date field
  • Maps the calculated date to the loan account summary data object

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
CredXAccountDetailsReadPlatformServiceJpaRepositoryImpl.java Adds SQL query to calculate next installment date and maps it to the account summary data
AccountDataAdditionalProperties.java Defines constant for the new next installment date field

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 187 to 188


Copy link
Preview

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the empty line 187. It adds unnecessary whitespace to the code.

Suggested change

Copilot uses AI. Check for mistakes.

@hayederr hayederr self-requested a review October 2, 2025 08:23
Copy link
Collaborator

@hayederr hayederr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run this command to fix code violations
./gradlew :custom:crediblex:portfolio:accountdetails:spotlessApply

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 06:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +183 to +186
.append(" CASE WHEN l.loan_status_id IN (200, 300) THEN ")
.append(" (SELECT MIN(rps.duedate) FROM m_loan_repayment_schedule rps ").append(" WHERE rps.loan_id = l.id ")
.append(" AND (rps.completed_derived = false OR rps.completed_derived IS NULL)) ")
.append(" ELSE NULL END as nextInstalmentDate")
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded loan status values (200, 300) should be replaced with named constants or enums to improve code maintainability and reduce magic numbers.

Copilot uses AI. Check for mistakes.

public static String IS_FORCED_CLOSURE = "isForcedClosure";
public static String IS_RESTRUCTURED = "isRestructured";
public static String DAYS_PAST_DUE = "daysPastDue";
public static String NEXT_INSTALMENT_DATE = "nextInstalmentDate";
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field should be declared as final to prevent accidental modification since it's intended to be a constant.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants