diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java index 01785359e0e..0ddbd6e2b40 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java @@ -517,7 +517,11 @@ public void setDatasetFieldDefaultValues(List datasetF @Override public int compareTo(DatasetFieldType o) { - return Integer.compare(this.getDisplayOrder(), (o.getDisplayOrder())); + int result = Integer.compare(this.getDisplayOrder(), (o.getDisplayOrder())); + if(!this.isHasParent() && o.isChild() && result == 0) { + result = -1; + } + return result; } public String getDisplayName() {