From 8f39379d6e636d94563120053838cf126ba5b273 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 7 Feb 2018 11:53:04 -0600 Subject: [PATCH] #13395 now when copy the unique fields the unique values are real unique (#13585) --- .../content/elasticsearch/business/ESContentletAPIImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentletAPIImpl.java b/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentletAPIImpl.java index b2749ce9efd4..3dcaf61a8a2e 100644 --- a/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentletAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentletAPIImpl.java @@ -3872,8 +3872,9 @@ public void copyProperties(Contentlet contentlet,Map properties, { if(checkIsUnique && field.isUnique()) { - String dataType = (field.getFieldContentlet() != null) ? field.getFieldContentlet().replaceAll("[0-9]*", "") : ""; - value = value + " (COPY)"; + value = value + + new StringBuilder(" (COPY_") + .append(System.currentTimeMillis()).append(')').toString(); } contentlet.setStringProperty(conVariable, value != null ? (String)value : null); }else if(isFieldTypeBoolean(field)){