diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java index 9f7e51534e..dbc0620269 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java @@ -215,12 +215,8 @@ public class RelatedChanges extends TabPanel { EnumSet.of(ListChangesOption.CURRENT_REVISION, ListChangesOption.CURRENT_COMMIT), new TabChangeListCallback(Tab.CHERRY_PICKS, info.project(), revision)); - if (Gerrit.info().change().isSubmitWholeTopicEnabled()) { - // TODO(sbeller): show only on latest revision - ChangeApi.change(info.legacyId().get()).view("submitted_together") - .get(new TabChangeListCallback(Tab.SUBMITTED_TOGETHER, - info.project(), revision)); - } else if (info.topic() != null && !"".equals(info.topic())) { + if (!Gerrit.info().change().isSubmitWholeTopicEnabled() + && info.topic() != null && !"".equals(info.topic())) { StringBuilder topicQuery = new StringBuilder(); topicQuery.append("status:open"); topicQuery.append(" ").append(op("topic", info.topic())); @@ -230,6 +226,11 @@ public class RelatedChanges extends TabPanel { ListChangesOption.DETAILED_LABELS, ListChangesOption.LABELS), new TabChangeListCallback(Tab.SAME_TOPIC, info.project(), revision)); + } else { + // TODO(sbeller): show only on latest revision + ChangeApi.change(info.legacyId().get()).view("submitted_together") + .get(new TabChangeListCallback(Tab.SUBMITTED_TOGETHER, + info.project(), revision)); } }