Merge branch 'RED-8302' into 'master'

RED-8302: Fixed missing non-readable content in uiclid report for image types

Closes RED-8302

See merge request redactmanager/redaction-report-service!46
This commit is contained in:
Dominique Eifländer 2024-01-24 11:14:49 +01:00
commit d569625b4e
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ public class IuclidFunctionService {
while (iterator.hasNext()) {
ReportRedactionEntry entry = iterator.next();
s.append("P").append(entry.getPage()).append(" ");
if (StringUtils.isBlank(entry.getValue()) || entry.getValue().equalsIgnoreCase("Rectangle")) {
if (StringUtils.isBlank(entry.getValue()) || entry.getValue().equalsIgnoreCase("Rectangle") || entry.getValue().startsWith("Image:")) {
s.append(entry.getEntityDisplayName()).append(" - non-readable content");
} else {
s.append(entry.getValue().replaceAll("\n", " ").replaceAll(" ", " "));

View File

@ -276,7 +276,7 @@ public class RedactionReportIntegrationTest {
EntityLog entityLog = objectMapper.readValue(new ClassPathResource("files/entityLog.json").getInputStream(), EntityLog.class);
List<EntityLogLegalBasis> legalBasisMapping = objectMapper.readValue(new ClassPathResource("files/legalBasisMapping.json").getInputStream(), new TypeReference<>() {
});
List<ReportRedactionEntry> reportEntries = entityLogConverterService.convertAndSort(DOSSIER_ID, FILE_ID, entityLog, legalBasisMapping, new HashMap<>());
List<ReportRedactionEntry> reportEntries = entityLogConverterService.convertAndSort(DOSSIER_ID, FILE_ID, entityLog, legalBasisMapping, Map.of("signature", "Signature", "logo", "Logo"));
ClassPathResource templateResource = new ClassPathResource("templates/IUCLID_Template.docx");
XWPFDocument doc = new XWPFDocument(templateResource.getInputStream());

View File

@ -8,4 +8,4 @@ relates to: P5 +49 2113 2311 563, P5 +49 2113 2311 560, P5 +81 764770164, P5 +81
Article 39(e)(3) of Regulation (EC) No 178/2002
relates to: P1 Image:Logo, P1 Doe J., P2 Michael N., P2 Funnarie B., P2 Feuer A., P3 Desiree, P3 Melanie, P4 library@outlook.com, P4 gordonjcp@msn.com, P4 dinther@comcast.net, P4 kawasaki@me.com, P5 Central Research Industry, P5 Maximiliam Schmitt, P5 +274 1432 8991, P5 493 1223 4592, P5 European Central Institute, P5 Emilia Lockhart, P6 This is a special case, everything between this and the next keyword should be redacted, P6 Central Research Industry, P6 Maximiliam Schmitt, P6 +274 1432 8991, P6 493 1223 4592, P6 European Central Institute, P6 Emilia Lockhart, P7 Dr. Alan Grant, P7 Dr. Alan Grant, P9 Image:Signature, P9 Image:Signature, P9 Müller, P9 Image:Logo
relates to: P1 Logo - non-readable content, P1 Doe J., P2 Michael N., P2 Funnarie B., P2 Feuer A., P3 Desiree, P3 Melanie, P4 library@outlook.com, P4 gordonjcp@msn.com, P4 dinther@comcast.net, P4 kawasaki@me.com, P5 Central Research Industry, P5 Maximiliam Schmitt, P5 +274 1432 8991, P5 493 1223 4592, P5 European Central Institute, P5 Emilia Lockhart, P6 This is a special case, everything between this and the next keyword should be redacted, P6 Central Research Industry, P6 Maximiliam Schmitt, P6 +274 1432 8991, P6 493 1223 4592, P6 European Central Institute, P6 Emilia Lockhart, P7 Dr. Alan Grant, P7 Dr. Alan Grant, P9 Signature - non-readable content, P9 Signature - non-readable content, P9 Müller, P9 Logo - non-readable content