lst.add(buildCustomField(10, "Date of xx", Type.TimeEntryCustomField, Format.DATE, 0, 0, null, null, false, true, false));
//TODO
}
public static CustomField buildCustomField(int id, String name, Type type, Format format, int min, int max, String regex, String defValue, boolean isRequired, boolean isFilter, boolean isForAll, String... options) throws Exception {
CustomField cf = new CustomField();
setId(cf, id);
cf.setName(name);
cf.setType(type);
cf.setFieldFormat(format);
cf.setMinLength(min);
cf.setMaxLength(max);
cf.setRegexp(regex);
cf.setPossibleValues(Arrays.asList(options));
cf.setDefaultValue(defValue);
cf.setRequired(isRequired);
cf.setFilter(isFilter);
cf.setForAll(isForAll);
return cf;
}