RelatedChanges: Show "Submitted Together" also for changes with topic

The reason for hiding the Submitted Together tab is that when
SubmitWholeTopic option is enabled, the same changes would appear twice
- in Submitted Together and in Same Topic.

But when some changes have topic, and the Submit Whole Topic option is
disabled, there's no reason to hide the Submitted Together tab. This tab
also shows changes that are submitted together because of project submit
strategy, like Merge or Rebase If Necessary.

Change-Id: Ibbafbdbea921444278efc602801d28b756145f25
This commit is contained in:
Orgad Shaneh
2016-05-11 09:01:21 +03:00
committed by David Pursehouse
parent b5d5489d29
commit 7dbaf5706b

View File

@@ -215,6 +215,11 @@ public class RelatedChanges extends TabPanel {
EnumSet.of(ListChangesOption.CURRENT_REVISION, ListChangesOption.CURRENT_COMMIT),
new TabChangeListCallback(Tab.CHERRY_PICKS, info.project(), revision));
// TODO(sbeller): show only on latest revision
ChangeApi.change(info.legacyId().get()).view("submitted_together")
.get(new TabChangeListCallback(Tab.SUBMITTED_TOGETHER,
info.project(), revision));
if (!Gerrit.info().change().isSubmitWholeTopicEnabled()
&& info.topic() != null && !"".equals(info.topic())) {
StringBuilder topicQuery = new StringBuilder();
@@ -226,11 +231,6 @@ 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));
}
}