Skip to content

Conversation

@kapil-panchal
Copy link

Description

Describe the changes made and why they were made.

  1. Implemented code review comments as per FINERACT-1272: Add the possibility to edit currencies available - Creating Currencies (org.apache.fineract.organisation.monetary.api) #4902
  2. Changed the validation messages.

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.

@github-actions
Copy link

This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.

@Size(min = 5, max = 50, message = "{org.apache.fineract.organisation.monetary.currencies" + ".name" + ".size}")
private String name;

@NotNull(message = "{org.apache.fineract.organisation.monetary.currencies.decimalPlaces" + ".notNull}")
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for string concatenation

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I will remove the String concat.

private String name;

@NotNull(message = "{org.apache.fineract.organisation.monetary.currencies.decimalPlaces" + ".notNull}")
@Min(value = 0, message = "{org.apache.fineract.organisation.monetary.currencies" + ".decimalPlaces" + ".min}")
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for string concatenation

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove the String concat.


@NotNull(message = "{org.apache.fineract.organisation.monetary.currencies.decimalPlaces" + ".notNull}")
@Min(value = 0, message = "{org.apache.fineract.organisation.monetary.currencies" + ".decimalPlaces" + ".min}")
@Max(value = 5, message = "{org.apache.fineract.organisation.monetary.currencies" + ".decimalPlaces" + ".max}")
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for string concatenation

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove the String concat.

@Max(value = 5, message = "{org.apache.fineract.organisation.monetary.currencies" + ".decimalPlaces" + ".max}")
private Integer decimalPlaces;

@PositiveOrZero(message = "{org.apache.fineract.organisation.monetary.currencies" + ".inMultiplesOf" + ".positiveOrZero}")
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for string concatenation

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove the String concat.

@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
Copy link
Contributor

Choose a reason for hiding this comment

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

Non need for SuperBuilder annotation

Copy link
Author

Choose a reason for hiding this comment

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

Sure will remove the SuperBuilder.

import lombok.experimental.SuperBuilder;

@Data
@NoArgsConstructor
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need no arg constructor?

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove the NoArgsContructor.

import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
import org.apache.fineract.organisation.monetary.data.CurrencyData;

@Builder
Copy link
Contributor

Choose a reason for hiding this comment

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

Please dont use Builder for JPA entities.

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove the Builder.

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need this. We are using Configuration classes to instantiate this bean.

Copy link
Author

Choose a reason for hiding this comment

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

Sure I will remove the Service annotation.

final ApplicationCurrency currency = currencyMapper.mapToEntity(request);
currency.setNameCode(getNameCode(currency.getCode()));

validateIfExistingCurrency(currency.getCode());
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do the validation first before any mapping.

Copy link
Author

Choose a reason for hiding this comment

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

I will do the validation before mapping.

Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

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

Kindly see my review!

@github-actions github-actions bot removed the stale label Sep 20, 2025
@IOhacker
Copy link
Contributor

@kapil-panchal are you working on it?

@kapil-panchal
Copy link
Author

Hi Victor, yes I am awaiting comments from Aleksandar Vidakovic.

@IOhacker
Copy link
Contributor

@kapil-panchal also there are pending items in the code regarding the comments done by @adamsaghy

@kapilpanchal123
Copy link

@vidakovic awaiting your inputs on this ticket.

@adamsaghy
Copy link
Contributor

@kapil-panchal You can move forward with the comments from others till @vidakovic review's also...

@kapilpanchal123
Copy link

@adamsaghy this ticket has the NewCommandInfrastructure implementation that I needed to get verified by @vidakovic?

@adamsaghy
Copy link
Contributor

Moving this into draft as it was learned new command handler does not support:

  • audit
  • retry
  • idempotency handling

@adamsaghy adamsaghy marked this pull request as draft November 25, 2025 09:50
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.

5 participants