130,7 → 130,8 |
TaskData data = new TaskData(new SBMTicketAttributeMapper(repository), |
SBMConnectorPlugin.CONNECTOR_KIND, |
repository.getRepositoryUrl(), |
ttitem.getGenericItem().getValue().getItemID().getValue()); |
ttitem.getGenericItem().getValue().getItemName().getValue()+" ["+ |
ttitem.getGenericItem().getValue().getItemID().getValue()+"]"); |
initializeTaskData(repository, data, null, monitor); |
// Create Fields for all the generic SBM (system) fields |
for (SBMTicketAttribute f : SBMTicketAttribute.values()) { |
153,7 → 154,17 |
} else { |
attr.getMetaData().setKind(null); |
} |
/* |
if(f.getTaskType()==TaskAttribute.TYPE_SINGLE_SELECT) { |
List<SBMFieldValue> options = |
client.getValidSet(client.getTableName(ttitem), f.getSBMName()); |
for( SBMFieldValue optionvalue: options) { |
attr.putOption(optionvalue.getValue(), optionvalue.getValue()); |
} |
} |
*/ |
attr.setValue(client.getStaticFieldValue(ttitem, f.getSBMName())); |
|
} |
|
//Custom fields |
167,11 → 178,15 |
new SBMTicketAttributeMapper(repository).mapToTaskKey(f.getType())); |
custom.getMetaData().setLabel(f.getLabel()); |
custom.getMetaData().setKind(TaskAttribute.KIND_DEFAULT); |
custom.getMetaData().setReadOnly(true); |
custom.getMetaData().setReadOnly(false); |
if(f.getType()==SBMFieldTypes.SELECTION && |
client.getFieldValue(ttitem, f.getName())!=null) { |
List<SBMFieldValue> options = |
client.getValidSet(client.getTableName(ttitem), f.getName()); |
for( SBMFieldValue optionvalue: options) { |
custom.putOption(optionvalue.getInternalValue(), optionvalue.getValue()); |
} |
String val = client.getFieldValue(ttitem, f.getName()).getValue(); |
custom.putOption(val, val); |
custom.setValue(val); |
} else if(f.getType()==SBMFieldTypes.MULTIPLE_SELECTION |
|| f.getType()==SBMFieldTypes.MULTIPLE_RELATIONAL |