diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/model/ReportRedactionEntry.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/model/ReportRedactionEntry.java index 360e175..90452de 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/model/ReportRedactionEntry.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/model/ReportRedactionEntry.java @@ -19,5 +19,5 @@ public class ReportRedactionEntry { private String value; private String entityDisplayName; private boolean isSkipped; - + private String entityClosestHeadline; } diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/EntityLogConverterService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/EntityLogConverterService.java index d7beb99..1c74bd3 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/EntityLogConverterService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/EntityLogConverterService.java @@ -176,7 +176,8 @@ public class EntityLogConverterService { entry.getValue(), mapOfEntityDisplayName.get(entry.getType()) == null ? entry.getType() : mapOfEntityDisplayName.get(entry.getType()), - entry.getState() == EntryState.SKIPPED || entry.getState() == EntryState.IGNORED)); + entry.getState() == EntryState.SKIPPED || entry.getState() == EntryState.IGNORED, + entry.getClosestHeadline())); } } }); diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java index ceaa1ed..f076e41 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/ExcelReportGenerationService.java @@ -25,6 +25,7 @@ import static com.iqser.red.service.redaction.report.v1.server.service.Placehold import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.PARAGRAPH_INDEX_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.PARAGRAPH_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER; +import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.REDACTION_ENTITY_HEADLINE_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.REDACTION_VALUE_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.RSS_PLACEHOLDER_BASE; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.SCM_FUNCTION_PLACEHOLDER; @@ -103,7 +104,8 @@ public class ExcelReportGenerationService { SKIPPED_PLACEHOLDER, FILE_ATTRIBUTES_PLACEHOLDER, INDEX_PLACEHOLDER, - COMPONENT_PLACEHOLDER); + COMPONENT_PLACEHOLDER, + REDACTION_ENTITY_HEADLINE_PLACEHOLDER); private final ScmReportService componentReportService; private final FileAttributesConfigClient fileAttributesConfigClient; @@ -538,6 +540,7 @@ public class ExcelReportGenerationService { .getEntityDisplayName(); case REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER -> input -> input.getEntry().getEntityDisplayName(); case SKIPPED_PLACEHOLDER -> input -> input.getEntry().isSkipped() ? "true" : "false"; + case REDACTION_ENTITY_HEADLINE_PLACEHOLDER -> input -> input.getEntry().getEntityClosestHeadline(); default -> input -> ""; }; diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/PlaceholderService.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/PlaceholderService.java index 4db3f4f..706575a 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/PlaceholderService.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/main/java/com/iqser/red/service/redaction/report/v1/server/service/PlaceholderService.java @@ -58,6 +58,8 @@ public class PlaceholderService { public static final String FILE_ATTRIBUTES_PLACEHOLDER = "{{file.attributes}}"; public static final String INDEX_PLACEHOLDER = "{{index}}"; + public static final String REDACTION_ENTITY_HEADLINE_PLACEHOLDER = "{{redaction.entity.closestHeadline}}"; + public static final DateTimeFormatter FORMAT_DATE_ISO = DateTimeFormatter.ofPattern("yyyy-MM-dd"); public static final DateTimeFormatter FORMAT_DATE_GER = DateTimeFormatter.ofPattern("dd.MM.yyyy"); public static final DateTimeFormatter FORMAT_DATE_ENG = DateTimeFormatter.ofPattern("MM/dd/yyyy"); @@ -93,7 +95,7 @@ public class PlaceholderService { SEEDS_FUNCTION_REDACTION_GROUPED_BY_JUSTIFICATION_PAGES_PLACEHOLDER, SEEDS_FUNCTION_JUSTIFICATION_PLACEHOLDER, REDACTION_ENTITY_DISPLAY_NAME_PLACEHOLDER, - SKIPPED_PLACEHOLDER); + SKIPPED_PLACEHOLDER, REDACTION_ENTITY_HEADLINE_PLACEHOLDER); private final ReportTemplateClient reportTemplateClient; private final ReportStorageService reportStorageService; diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java index 0e324cd..f3a0106 100644 --- a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java +++ b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/java/com/iqser/red/service/redaction/report/v1/server/RedactionReportIntegrationTest.java @@ -7,6 +7,7 @@ import static com.iqser.red.service.redaction.report.v1.server.service.Placehold import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.FORMAT_DATE_ISO_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.FORMAT_TIME_ISO_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.IUCLID_FUNCTION_PLACEHOLDER; +import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.REDACTION_ENTITY_HEADLINE_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.SEEDS_FUNCTION_JUSTIFICATION_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.service.PlaceholderService.SEEDS_FUNCTION_REDACTION_GROUPED_BY_JUSTIFICATION_PAGES_PLACEHOLDER; import static com.iqser.red.service.redaction.report.v1.server.utils.OsUtils.getTemporaryDirectory; @@ -742,7 +743,7 @@ public class RedactionReportIntegrationTest { DOSSIER_NAME_PLACEHOLDER, IUCLID_FUNCTION_PLACEHOLDER, SEEDS_FUNCTION_REDACTION_GROUPED_BY_JUSTIFICATION_PAGES_PLACEHOLDER, - SEEDS_FUNCTION_JUSTIFICATION_PLACEHOLDER)); + SEEDS_FUNCTION_JUSTIFICATION_PLACEHOLDER, REDACTION_ENTITY_HEADLINE_PLACEHOLDER)); defaultPlaceHolder.addAll(dossierAttributes.keySet()); defaultPlaceHolder.addAll(fileAttributes.keySet()); return new PlaceholderModel(defaultPlaceHolder, imagePlaceholders, dossierAttributes, null, fileAttributes, new HashMap<>()); diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel QC (incl. Skipped Redactions).xlsx b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel QC (incl. Skipped Redactions).xlsx index 880779f..235a863 100644 Binary files a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel QC (incl. Skipped Redactions).xlsx and b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel QC (incl. Skipped Redactions).xlsx differ diff --git a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel Report.xlsx b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel Report.xlsx index 531a3be..bfcd62c 100644 Binary files a/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel Report.xlsx and b/redaction-report-service-v1/redaction-report-service-server-v1/src/test/resources/templates/Excel Report.xlsx differ