From 245788d600c8f114ca136acdebc7e5fd6b1947d1 Mon Sep 17 00:00:00 2001 From: Leonardo Hildt Date: Fri, 1 Dec 2023 10:35:29 -0300 Subject: [PATCH] Fix for FBR-469 - Update center name --- .../GroupingTypesWritePlatformServiceJpaRepositoryImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java index 4efbdc36207..e98b29107eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java @@ -1148,7 +1148,7 @@ public CommandProcessingResult generateCentersByPortfolio(Portfolio portfolio) { for (CodeValueData meetingDay : meetingDayOptions) { // complete required fields for entity - final String centerName = generateCenterName(portfolio.getId(), rangeTemplateData, meetingDay); + final String centerName = generateCenterName(portfolio.getName(), rangeTemplateData, meetingDay); final Integer meetingDayValue = meetingDay.getId().intValue(); final Integer meetingStart = rangeTemplateData.getStartDay(); final Integer meetingEnd = rangeTemplateData.getEndDay(); @@ -1269,9 +1269,9 @@ private void handleCenterDataIntegrityIssues(final JsonCommand command, final Th "Unknown data integrity issue with resource."); } - private String generateCenterName(Long portfolioId, RangeTemplateData rangeTemplateData, CodeValueData meetingDay) { + private String generateCenterName(String portfolioName, RangeTemplateData rangeTemplateData, CodeValueData meetingDay) { final StringBuilder centerName = new StringBuilder(); - centerName.append(portfolioId); + centerName.append(portfolioName); centerName.append("-"); centerName.append(rangeTemplateData.getCode()); centerName.append("-");