Skip to content

FINERACT-1183: archive FD and RD products#5967

Open
San-43 wants to merge 1 commit into
apache:developfrom
San-43:FINERACT-1183-archive-FD-and-RD-products
Open

FINERACT-1183: archive FD and RD products#5967
San-43 wants to merge 1 commit into
apache:developfrom
San-43:FINERACT-1183-archive-FD-and-RD-products

Conversation

@San-43

@San-43 San-43 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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 our guidelines
  • 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 our 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
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@San-43 San-43 force-pushed the FINERACT-1183-archive-FD-and-RD-products branch from 446969d to 6cd7264 Compare June 10, 2026 07:48
@adamsaghy

Copy link
Copy Markdown
Contributor

@San-43 This PR has nothing to do with: https://issues.apache.org/jira/browse/FINERACT-1315

@adamsaghy

Copy link
Copy Markdown
Contributor

@San-43 Can you please explain this PR and update the description + use correct Fineract JIRA ticket (or create new if needed)?

@adamsaghy adamsaghy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please review my concerns

@San-43 San-43 changed the title FINERACT-1315: archive FD and RD products FINERACT-1183: archive FD and RD products Jun 10, 2026
@San-43 San-43 force-pushed the FINERACT-1183-archive-FD-and-RD-products branch from 6cd7264 to 4dd3f2b Compare June 10, 2026 16:45
@San-43

San-43 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@San-43 Can you please explain this PR and update the description + use correct Fineract JIRA ticket (or create new if needed)?

Srry @adamsaghy, I referenced the wrong JIRA ticket. This PR addresses FINERACT-1183.

It adds optional validity dates to Fixed Deposit and Recurring Deposit products. Archived products remain visible for administration, but cannot be used for new accounts or reinvestments. Existing accounts remain unaffected.

@San-43 San-43 requested a review from adamsaghy June 12, 2026 22:09
@San-43 San-43 force-pushed the FINERACT-1183-archive-FD-and-RD-products branch 3 times, most recently from 2746743 to 35ebe6e Compare June 14, 2026 06:50
@San-43

San-43 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the failing tests and rebased onto the latest develop.

@adamsaghy

Copy link
Copy Markdown
Contributor

@San-43 Please rebase the PR to resolve the conflicts.

@San-43 San-43 force-pushed the FINERACT-1183-archive-FD-and-RD-products branch from 35ebe6e to b6a51fe Compare June 21, 2026 17:04
@San-43

San-43 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

@adamsaghy done

# Conflicts:
#	fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
@San-43 San-43 force-pushed the FINERACT-1183-archive-FD-and-RD-products branch from b6a51fe to c810e1e Compare June 21, 2026 17:11
@Schema(example = "3")
public Integer maxDepositTermTypeId;
@Schema(example = "10000")
public Long depositAmount;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be BigDecimal

validateDepositTermDetailForUpdate(element, baseDataValidator);

validateChartsData(element, baseDataValidator);
if (fromApiJsonHelper.parameterExists(chartsParamName, element)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This condition can be moved into validateChartsData, so the validator will be unified (none of the other validate methods are wrapped in an if condition).

}
ExternalId externalId = this.externalIdFactory.create();

this.depositAccountAssembler.validateProductApplicationDate(closedDate, account.savingsProduct());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe validations should occur as early as possible. Could we move this validator to be executed as one of the initial steps and only begin processing after it has successfully passed?

sqlBuilder.append("select ");
sqlBuilder.append(DEPOSIT_PRODUCT_LOOKUP_MAPPER.schema());
sqlBuilder.append(" where sp.deposit_type_enum = ? ");
sqlBuilder.append(" and (sp.close_date is null or sp.close_date >= ");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I dont think we should filter them out...

}

private void validateDomainRules(final DataValidatorBuilder baseDataValidator) {
if (getStartDate() != null && getCloseDate() != null && DateUtils.isBefore(getCloseDate(), getStartDate())) {

@adamsaghy adamsaghy Jun 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be handled in validator, not in JPA entity. Please move this logic out.

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