if(field.getType().equals(Type.t_selection))
{
if(field.getDataType().equals(DataType.dt_single))
{
UUID optionId = task.getSingleSelection(field.getId());
if(optionId != null)
{
Option option = field.getOption(optionId);
if(option != null)
fieldShowValue = option.getName();
}
}
else
{
UUID[] optionIdArray = task.getMultiSelection(field.getId());
if(optionIdArray != null && optionIdArray.length > 0)
{
StringBuffer valueStrb = new StringBuffer();
for(UUID optionId : optionIdArray)
{
Option option = field.getOption(optionId);
if(option != null)
{
if(valueStrb.length() > 0)
valueStrb.append(",");
valueStrb.append("[").append(option.getName()).append("]");
}
}
if(valueStrb.length() > 0)
fieldShowValue = valueStrb.toString();
}
}
}
else if(field.getType().equals(Type.t_reference))
{
if(field.getDataType().equals(DataType.dt_single))
{
UUID dataId = task.getSingleReference(field.getId());
if(dataId != null)
{
String[] titles = new DataAccessSessionMySQL().queryFieldByIds(new UUID[]{dataId} , "title" , null);
if (titles != null && titles.length > 0) {