RM-5012 - added extra check to not add identifier twice

This commit is contained in:
Ana Bozianu
2017-05-03 17:17:18 +03:00
parent c243317cc7
commit c8a571a41c

View File

@@ -65,6 +65,12 @@ public class RecordUtils
// get the record name
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
// skip this step if the record name already contains the identifier
if(name.contains(" (" + recordId + ")"))
{
return;
}
// rename the record
int dotIndex = name.lastIndexOf('.');
String prefix = name;