From 5f6f1aa13618cf8f1198059248b736a797b568e4 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 17 Jul 2015 11:26:19 -0700 Subject: [PATCH] Always show "submitted together" for topicless changes Currently we hide the "submitted together" tab to make room for "same topic" on hosts with submitWholeTopic disabled. On a change that does not have a topic, though, there is no need to hide the submitted-together tab to make room and the tab contains useful information. Display it. This should make it easier for people on !submitWholeTopic hosts to get used to the change in c5993446ebe1 (MergeOp: Operate on ChangeSets instead of branches, 2015-06-18), which made submitting a change automatically submit its ancestors at the same time. Change-Id: I7c7a6759ed8285f56ccbe71b48c29e718de4a017 --- .../google/gerrit/client/change/RelatedChanges.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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)); } }