Modify assigned changes section

Filter out ignored and closed changes from the "assigned reviews"
section.

Change-Id: Icc97cbc312b6ea7b565d3eb6a66cc13db4ec56b0
This commit is contained in:
Kasper Nilsson
2018-09-24 16:06:04 -07:00
committed by Logan Hanks
parent cf5decd884
commit 4977928e2f
2 changed files with 11 additions and 2 deletions

View File

@@ -201,7 +201,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
protected static final String DASHBOARD_HAS_UNPUBLISHED_DRAFTS_QUERY = "has:draft";
protected static final String DASHBOARD_ASSIGNED_QUERY =
"assignee:${user} (-is:wip OR " + "owner:self OR assignee:self)";
"assignee:${user} (-is:wip OR " + "owner:self OR assignee:self) is:open -is:ignored";
protected static final String DASHBOARD_WORK_IN_PROGRESS_QUERY = "is:open owner:${user} is:wip";
protected static final String DASHBOARD_OUTGOING_QUERY =
"is:open owner:${user} -is:wip -is:ignored";
@@ -2746,6 +2746,14 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
.create(repo);
// Create changes that should not be returned by query.
new DashboardChangeState(user.getAccountId()).assignTo(user.getAccountId()).abandon();
new DashboardChangeState(user.getAccountId())
.assignTo(user.getAccountId())
.ignoreBy(user.getAccountId());
new DashboardChangeState(user.getAccountId())
.assignTo(user.getAccountId())
.mergeBy(user.getAccountId());
assertDashboardQuery("self", DASHBOARD_ASSIGNED_QUERY, selfOpenWip, otherOpenWip);
// Viewing another user's dashboard.

View File

@@ -110,7 +110,8 @@ limitations under the License.
{
// Changes that are assigned to the viewed user.
name: 'Assigned reviews',
query: 'assignee:${user} (-is:wip OR owner:self OR assignee:self)',
query: 'assignee:${user} (-is:wip OR owner:self OR assignee:self) ' +
'is:open -is:ignored',
hideIfEmpty: true,
},
{