@Override public JSONObject generate(Visibility visibility) throws JSONException { return new JSONObject() .put("type", visibility.getType().name().toLowerCase()) .put("value", visibility.getValue()); } }
@Override public JSONObject generate(Visibility visibility) throws JSONException { return new JSONObject() .put("type", visibility.getType().name().toLowerCase()) .put("value", visibility.getValue()); } }
final String commentVisibilityType; if (buildNumber >= ServerVersionConstants.BN_JIRA_5) { commentVisibilityType = commentVisibility.getType() == Visibility.Type.GROUP ? "group" : "role"; } else { commentVisibilityType = commentVisibility.getType() == Visibility.Type.GROUP ? "GROUP" : "ROLE"; res.put(CommentJsonParser.VISIBILITY_KEY, visibilityJson); } else { if (commentVisibility.getType() == Visibility.Type.ROLE) { res.put("role", commentVisibility.getValue()); } else {
final String commentVisibilityType; if (buildNumber >= ServerVersionConstants.BN_JIRA_5) { commentVisibilityType = commentVisibility.getType() == Visibility.Type.GROUP ? "group" : "role"; } else { commentVisibilityType = commentVisibility.getType() == Visibility.Type.GROUP ? "GROUP" : "ROLE"; res.put(CommentJsonParser.VISIBILITY_KEY, visibilityJson); } else { if (commentVisibility.getType() == Visibility.Type.ROLE) { res.put("role", commentVisibility.getValue()); } else {