RED-9140 - Add more information to changes
This commit is contained in:
parent
9a64c0f2d7
commit
05679289a3
@ -484,7 +484,7 @@ public class EntityLogMergeService {
|
||||
List<Change> changes = new ArrayList<>();
|
||||
EntryState oldState = entityLogEntry.getState();
|
||||
EntryState newState = entityLogEntry.getEntryType().equals(EntryType.HINT) ? EntryState.SKIPPED : EntryState.APPLIED;
|
||||
changes.add(ChangeFactory.toChange(ChangeType.RECATEGORIZE,
|
||||
changes.add(ChangeFactory.toChange(ChangeType.FORCE_REDACT,
|
||||
forceRedaction.getRequestDate(),
|
||||
analysisNumber,
|
||||
PropertyChange.builder()
|
||||
|
||||
@ -185,7 +185,7 @@ public class EntityLogMergeTest {
|
||||
assertEquals(resizeEntryLogEntry.getManualChanges()
|
||||
.get(0).getManualRedactionType(), ManualRedactionType.RESIZE);
|
||||
assertEquals(resizeEntryLogEntry.getChanges()
|
||||
.get(0).getType(), ChangeType.CHANGED);
|
||||
.get(0).getType(), ChangeType.RESIZED);
|
||||
assertTrue(resizeEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||
|
||||
var optionalLegalBasisEntryLogEntry = response.getEntityLogEntry()
|
||||
@ -200,7 +200,7 @@ public class EntityLogMergeTest {
|
||||
assertEquals(legalBasisEntryLogEntry.getManualChanges()
|
||||
.get(0).getManualRedactionType(), ManualRedactionType.LEGAL_BASIS_CHANGE);
|
||||
assertEquals(legalBasisEntryLogEntry.getChanges()
|
||||
.get(0).getType(), ChangeType.CHANGED);
|
||||
.get(0).getType(), ChangeType.LEGAL_BASIS_CHANGE);
|
||||
assertTrue(legalBasisEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||
|
||||
var optionalForceRedactionEntryLogEntry = response.getEntityLogEntry()
|
||||
@ -215,7 +215,7 @@ public class EntityLogMergeTest {
|
||||
assertEquals(forceRedactionEntryLogEntry.getManualChanges()
|
||||
.get(0).getManualRedactionType(), ManualRedactionType.FORCE);
|
||||
assertEquals(forceRedactionEntryLogEntry.getChanges()
|
||||
.get(0).getType(), ChangeType.CHANGED);
|
||||
.get(0).getType(), ChangeType.FORCE_REDACT);
|
||||
assertTrue(forceRedactionEntryLogEntry.getEngines().contains(Engine.MANUAL));
|
||||
|
||||
var optionalRectangleEntryLogEntry = response.getEntityLogEntry()
|
||||
|
||||
@ -31,7 +31,7 @@ public class ChangeFactory {
|
||||
|
||||
Arrays.stream(propertyChanges)
|
||||
.forEach(propertyChange -> {
|
||||
if (!propertyChange.getOldValue().equals(propertyChange.getNewValue())) {
|
||||
if (propertyChange.getOldValue() != null && propertyChange.getNewValue() != null && !propertyChange.getOldValue().equals(propertyChange.getNewValue())) {
|
||||
change.addChange(propertyChange.getProperty(), ChangeUtils.buildVisualChange(propertyChange.getOldValue(), propertyChange.getNewValue()));
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user