in rest-api/src/jetbrains/buildServer/server/rest/model/Fields.java [158:202]
public Boolean isIncludedFull(@NotNull final String fieldName, @Nullable final Supplier<Boolean> isCached, @Nullable final Boolean defaultForShort, @Nullable final Boolean defaultForLong) {
final String fieldSpec = getCustomDimension(fieldName);
if (fieldSpec != null) {
if (DEFAULT_FIELDS_SHORT_PATTERN.equals(fieldSpec)) return true; //performance optimization for a frequently used value
if (NONE_FIELDS_PATTERN.equals(fieldSpec)) {
return false;
}
if (OPTIONAL_FIELDS_PATTERN.equals(fieldSpec) || getNestedField(fieldSpec, OPTIONAL_FIELDS_PATTERN) != null) {
if (isCached == null && TeamCityProperties.getBoolean("rest.beans.fields.optional.errorIfUsedForNotSupportedField")) {
throw new BadRequestException("Special fields pattern \"" + OPTIONAL_FIELDS_PATTERN + "\" is not supported for field \"" + fieldName + "\"");
}
if (isCached == null) {
return false;
}
Boolean result = isCached.get();
return result != null && result;
}
return true;
}
if (isNone()){
return false;
}
final Fields restrictedFields = myRestrictedFields.get(fieldName);
if (restrictedFields != null) {
if (!restrictedFields.isIncluded(fieldName, true, true)) {
return false;
}
}
if (isAllNested() || isAll()) {
return true;
}
if (isShort()) {
return defaultForShort;
}
if (isLong()) {
return defaultForLong;
}
return false;
}