public class MultiUserPickerSanitizer extends Object
Db value stores user keys concatenated by ", " starting with "[" and ending with "]". Human readable values store user full names concatenated by ", ".
Sanitization algorithm for db value (user keys).
Sanitization algorithm for human readable values (full names):
We check if the current full name exists in the history record.
If it does - we just replace this (commas don't pose any problem here).
If it doesn't - we split the full names and compare their count to userkeys count.
If they are equal we can just guess which full name belongs to to the user based on its position.
If not (super-duper-extreme-corner-case) - we do nothing.
This approach allows to still identify the other users but the anonymized user's full name won't ever be erased.
ChangeItem
,
ChangeItemDTO
Constructor and Description |
---|
MultiUserPickerSanitizer(String dbValue,
String humanReadableValue,
String currentFullName,
String originalValue,
String targetValue) |
Modifier and Type | Method and Description |
---|---|
String |
getDbValueSanitized() |
String |
getHumanReadableValueSanitized() |
Copyright © 2002-2022 Atlassian. All Rights Reserved.
View cookie preferences