Skip to content

FINERACT-2165: Migrate event, provisioning, and standing instruction helpers to fineract-client-feign#5946

Open
elnafateh wants to merge 1 commit into
apache:developfrom
elnafateh:FINERACT-2165/migrated-event-and-provisioning-helpers
Open

FINERACT-2165: Migrate event, provisioning, and standing instruction helpers to fineract-client-feign#5946
elnafateh wants to merge 1 commit into
apache:developfrom
elnafateh:FINERACT-2165/migrated-event-and-provisioning-helpers

Conversation

@elnafateh

Copy link
Copy Markdown
Contributor

Description

  • Migrated ExternalEventConfigurationHelper and ExternalEventHelper
  • Migrated StandingInstructionsHelper
  • Migrated ProvisioningHelper and ProvisioningTransactionHelper
  • Updated corresponding integration test suites to use migrated helper classes

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.

@elnafateh elnafateh force-pushed the FINERACT-2165/migrated-event-and-provisioning-helpers branch from d80ec46 to d67b44b Compare June 6, 2026 21:08
final HashMap<String, Object> map = new HashMap<>();
map.put("loanProducts", addLoanProducts(loanProducts));
map.put("definitions", addProvisioningCategories(categories, liability, expense));
public static Map<String, Object> createProvisioningCriteriaJson(List<Integer> loanProducts, List<ProvisioningCategoryData> categories,

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.

Do we still need this? It would be better to completely remove.

private static ArrayList<HashMap<String, Integer>> addLoanProducts(ArrayList<Integer> loanProducts) {
ArrayList<HashMap<String, Integer>> list = new ArrayList<>();
for (int i = 0; i < loanProducts.size(); i++) {
private static List<HashMap<String, Integer>> addLoanProducts(List<Integer> loanProducts) {

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.

what is this for?

int minStart = 0;
int maxStart = 30;

public static List<HashMap<String, Object>> addProvisioningCategories(List<ProvisioningCategoryData> categories, Account liability,

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.

use type safe requests and responses

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

Looks half baked cookie...

Please finish the refactor and remove all:

  • JSON
  • GSON
  • Manually creating Lists and Maps

After the refactor we should only use type-safe requests and responses

@elnafateh

Copy link
Copy Markdown
Contributor Author

@adamsaghy You're right it looks half done but here's why. the first commit for this PR carries a full migration of these modules

  • ExternalEventConfigurationHelper
  • ExternalEventHelper
  • StandingInstructionsHelper
  • ProvisioningHelper
  • ProvisioningTransactionHelper

when pushed the migrations then CI failed some DB checks, Indicating some mismatch in the OpenAPI spec from Provisioning* modules (PostProvisioningCriteriaRequestgenerated model serializes the definitions list asprovisioningcriteriavia Jackson, but the server API expectsdefinitions ). Am left w two choice, either drop the Provisioning* modules from the migration or create some workaround/patch, I then choose the former and obviously the revert was not complete

@elnafateh

Copy link
Copy Markdown
Contributor Author

what do u think will be best for it?

@adamsaghy

Copy link
Copy Markdown
Contributor

what do u think will be best for it?

Its fine if backward compatibility check fails due to API or swagger fix

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