Merge branch 'RED-8762' into 'master'

RED-8762: do not update addToDictionaryAction for dossier dictionaries when...

Closes RED-8762

See merge request redactmanager/persistence-service!446
This commit is contained in:
Ali Oezyetimoglu 2024-04-15 11:27:01 +02:00
commit f23f66f0ed

View File

@ -158,7 +158,22 @@ public class DictionaryService {
public void updateDossierType(String type, String dossierTemplateId, UpdateTypeValue typeValue, String dossierId) {
accessControlService.verifyUserIsDossierOwner(dossierId);
updateType(dossierTemplateId, toTypeId(type, dossierTemplateId, dossierId), typeValue);
// we do not set the flag addToDictionaryAction when updating the global type
dictionaryManagementService.updateTypeValue(toTypeId(type, dossierTemplateId, dossierId),
Type.builder()
.dossierTemplateId(dossierTemplateId)
.hexColor(typeValue.getHexColor())
.recommendationHexColor(typeValue.getRecommendationHexColor())
.skippedHexColor(typeValue.getSkippedHexColor())
.rank(typeValue.getRank())
.isHint(typeValue.isHint())
.isCaseInsensitive(typeValue.isCaseInsensitive())
.isRecommendation(typeValue.isRecommendation())
.description(typeValue.getDescription())
.label(typeValue.getLabel())
.hasDictionary(typeValue.isHasDictionary())
.autoHideSkipped(typeValue.isAutoHideSkipped())
.build());
}