From 7eb0abf4da8765cc34b2c6c676f84ee059b04e50 Mon Sep 17 00:00:00 2001 From: Andrei Isvoran Date: Fri, 3 Nov 2023 08:42:48 +0100 Subject: [PATCH] RED-7712 - Published information does not always trigger the skip mechanism --- .../src/test/resources/drools/acceptance_rules.drl | 4 ++-- .../src/test/resources/drools/all_redact_manager_rules.drl | 4 ++-- .../dictionaries/EFSA_sanitisation_GFL_v1/rules.drl | 4 ++-- .../src/main/resources/all_redact_manager_rules.drl | 4 ++-- .../src/test/resources/all_redact_manager_rules.drl | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl index 3f71868c..ed3716f4 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl @@ -149,8 +149,8 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found $table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("CBI_author")) $tableCell: TableCell() from $table.streamTableCells().toList() $sameRowCell: TableCell(row == $tableCell.row) from $table.streamTableCells().toList() - TextEntity(type == "published_information") from $tableCell.getEntities() - $author: TextEntity(type == "CBI_author") from $tableCell.getEntities() + TextEntity(type == "published_information", active()) from $tableCell.getEntities() + $author: TextEntity(type == "CBI_author", active()) from $tableCell.getEntities() then $author.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $author)); end diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl index 5ae16831..b8d5afd7 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl @@ -332,8 +332,8 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found $table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("CBI_author")) $tableCell: TableCell() from $table.streamTableCells().toList() $sameRowCell: TableCell(row == $tableCell.row) from $table.streamTableCells().toList() - TextEntity(type == "published_information") from $tableCell.getEntities() - $author: TextEntity(type == "CBI_author") from $tableCell.getEntities() + TextEntity(type == "published_information", active()) from $tableCell.getEntities() + $author: TextEntity(type == "CBI_author", active()) from $tableCell.getEntities() then $author.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $author)); end diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/performance/dictionaries/EFSA_sanitisation_GFL_v1/rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/performance/dictionaries/EFSA_sanitisation_GFL_v1/rules.drl index 27872605..ac5b6b78 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/performance/dictionaries/EFSA_sanitisation_GFL_v1/rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/performance/dictionaries/EFSA_sanitisation_GFL_v1/rules.drl @@ -145,8 +145,8 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found $table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("CBI_author")) $tableCell: TableCell() from $table.streamTableCells().toList() $sameRowCell: TableCell(row == $tableCell.row) from $table.streamTableCells().toList() - TextEntity(type == "published_information") from $tableCell.getEntities() - $author: TextEntity(type == "CBI_author") from $tableCell.getEntities() + TextEntity(type == "published_information", active()) from $tableCell.getEntities() + $author: TextEntity(type == "CBI_author", active()) from $tableCell.getEntities() then $author.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $author)); end diff --git a/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl b/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl index 3cfc4031..8bcb710c 100644 --- a/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl +++ b/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl @@ -332,8 +332,8 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found $table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("CBI_author")) $tableCell: TableCell() from $table.streamTableCells().toList() $sameRowCell: TableCell(row == $tableCell.row) from $table.streamTableCells().toList() - TextEntity(type == "published_information") from $tableCell.getEntities() - $author: TextEntity(type == "CBI_author") from $tableCell.getEntities() + TextEntity(type == "published_information", active()) from $tableCell.getEntities() + $author: TextEntity(type == "CBI_author", active()) from $tableCell.getEntities() then $author.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $author)); end diff --git a/redaction-service-v1/rules-management/src/test/resources/all_redact_manager_rules.drl b/redaction-service-v1/rules-management/src/test/resources/all_redact_manager_rules.drl index 3cfc4031..8bcb710c 100644 --- a/redaction-service-v1/rules-management/src/test/resources/all_redact_manager_rules.drl +++ b/redaction-service-v1/rules-management/src/test/resources/all_redact_manager_rules.drl @@ -332,8 +332,8 @@ rule "CBI.7.1: Do not redact Names and Addresses if published information found $table: Table(hasEntitiesOfType("published_information"), hasEntitiesOfType("CBI_author")) $tableCell: TableCell() from $table.streamTableCells().toList() $sameRowCell: TableCell(row == $tableCell.row) from $table.streamTableCells().toList() - TextEntity(type == "published_information") from $tableCell.getEntities() - $author: TextEntity(type == "CBI_author") from $tableCell.getEntities() + TextEntity(type == "published_information", active()) from $tableCell.getEntities() + $author: TextEntity(type == "CBI_author", active()) from $tableCell.getEntities() then $author.skipWithReferences("CBI.7.1", "Published Information found in row", $table.getEntitiesOfTypeInSameRow("published_information", $author)); end