mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged V4.1-BUG-FIX to HEAD
47423: Merged V4.1-BUG-FIX-2013_02_26 to V4.1-BUG-FIX 47381: ALF-15903 : form.getFieldLabel(field.id) sometimes returns the wrong label Added a check for the overridden id with the ending "-cntrl" 47424: Fixes: ALF-17950: Content I'm Editing dashlet runs relativeDate parsing twice. Removes duplicate code and also prevents relativeTime parsing from breaking if called multiple times. 47425: Merged V4.1-BUG-FIX-2013_02_26 to V4.1-BUG-FIX 47386: ALF-15873: Form field validators not executed for NON mandatory date fields Add to context all form constraints defined in custom config. 47426: Merged V4.1-BUG-FIX-2013_02_26 to V4.1-BUG-FIX 47418: ALF-16385 : When the 'My activites' dashlet is narrow enough, vertical sizing of the content box is wrong. Recalculate a height of dashlet, when it was resized 47427: ALF-18092: fixed issue with hidden-transitions field JSON 47428: Merge DEV to V4.1-BUG-FIX 46336 : ALF-16747 changing type of the root node of replicated set of nodes is not propagated to target. 47437: Fixes ALF-17145: Pagination did not play nicely with back button. 47439: Implements suggested fix for: ALF-16603 47443: Fixed ALF-17255: AUDIT_PATH_REGEX regex pattern recompiled at runtime - Switch to pre-compiled Pattern 47473: Merged BRANCHES/DEV/BELARUS/V4.1-BUG-FIX-2013_02_26 to BRANCHES/DEV/V4.1-BUG-FIX: 47313: ALF-18006 : Sending a PUT request without a Content-Type header resets the contents mimetype to application/octet-stream fix unit test 47475: ALF-18092: Fixed unit test fallout from hidden transitions property serialization changes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -195,7 +195,7 @@ public abstract class AbstractCalendarListingWebScript extends AbstractCalendarW
|
||||
Date newEnd = new Date(newStart.getTime() + duration);
|
||||
result.put(RESULT_START, ISO8601DateFormat.format(newStart));
|
||||
result.put(RESULT_END, ISO8601DateFormat.format(newEnd));
|
||||
String legacyDateFormat = "M/d/yyyy";
|
||||
String legacyDateFormat = "yyyy-MM-dd";
|
||||
SimpleDateFormat ldf = new SimpleDateFormat(legacyDateFormat);
|
||||
String legacyTimeFormat ="HH:mm";
|
||||
SimpleDateFormat ltf = new SimpleDateFormat(legacyTimeFormat);
|
||||
|
@@ -130,8 +130,20 @@ public class TaskInstancePut extends AbstractWorkflowWebscript
|
||||
|
||||
if (prop != null)
|
||||
{
|
||||
// convert property using its data type specified in model
|
||||
value = (Serializable) DefaultTypeConverter.INSTANCE.convert(prop.getDataType(), jsonValue);
|
||||
if (prop.isMultiValued() && jsonValue instanceof JSONArray)
|
||||
{
|
||||
value = new ArrayList<Serializable>();
|
||||
|
||||
for (int i = 0; i < ((JSONArray)jsonValue).length(); i++)
|
||||
{
|
||||
((List<Serializable>)value).add((Serializable) DefaultTypeConverter.INSTANCE.convert(prop.getDataType(),((JSONArray)jsonValue).get(i)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// convert property using its data type specified in model
|
||||
value = (Serializable) DefaultTypeConverter.INSTANCE.convert(prop.getDataType(), jsonValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -22,6 +22,7 @@ import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -414,12 +415,24 @@ public class WorkflowModelBuilder
|
||||
keys.addAll(propDefs.keySet());
|
||||
keys.addAll(assocDefs.keySet());
|
||||
keys.addAll(propKeys);
|
||||
keys.add(WorkflowModel.PROP_HIDDEN_TRANSITIONS);
|
||||
}
|
||||
else
|
||||
{
|
||||
keys = buildQNameKeys(propertyFilters);
|
||||
}
|
||||
return buildQNameProperties(properties, keys);
|
||||
|
||||
Map<String, Object> result = buildQNameProperties(properties, keys);
|
||||
// ALF-18092: Special handling for the "hiddenTransitions" property, as it can be an empty string
|
||||
if (keys.contains(WorkflowModel.PROP_HIDDEN_TRANSITIONS))
|
||||
{
|
||||
List<?> hiddenTransitions = getHiddenTransitions(properties);
|
||||
if (hiddenTransitions != null)
|
||||
{
|
||||
result.put(qNameConverter.mapQNameToName(WorkflowModel.PROP_HIDDEN_TRANSITIONS), hiddenTransitions);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Map<String, String> buildPropertyLabels(WorkflowTask task, Map<String, Object> properties)
|
||||
@@ -595,8 +608,15 @@ public class WorkflowModelBuilder
|
||||
}
|
||||
else if (hiddenSer instanceof String)
|
||||
{
|
||||
String hiddenStr = (String) hiddenSer;
|
||||
return Arrays.asList(hiddenStr.split(","));
|
||||
if(((String) hiddenSer).isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
else
|
||||
{
|
||||
String hiddenStr = (String) hiddenSer;
|
||||
return Arrays.asList(hiddenStr.split(","));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user