String (@NotNull String fieldName) { YouTrackIssue.CustomField stateField = ContainerUtil.find(myIssue.getCustomFields(), cf -> cf.getName().equals(fieldName)); if (stateField != null) { JsonElement fieldValueElem = stateField.getValue(); if (fieldValueElem != null && fieldValueElem.isJsonObject()) { JsonElement stateNameElem = fieldValueElem.getAsJsonObject().get("name"); if (stateNameElem != null && stateNameElem.isJsonPrimitive() && stateNameElem.getAsJsonPrimitive().isString()) { return stateNameElem.getAsString(); } } } return null; }