Commit 779cfd20 authored by David O'Regan's avatar David O'Regan

Merge branch '333212-sort-epics-alphabetically-in-issue-sidebar' into 'master'

Order Epics in issue sidebar dropdown by Epic Title

See merge request gitlab-org/gitlab!63730
parents 2238c62b 3dc5b05e
......@@ -20,6 +20,7 @@ import {
IssuableAttributeType,
issuableAttributesQueries,
noAttributeId,
defaultEpicSort,
} from '../constants';
export default {
......@@ -118,6 +119,7 @@ export default {
fullPath: this.attrWorkspacePath,
title: this.searchTerm,
state: this.$options.IssuableAttributeState[this.issuableAttribute],
sort: this.issuableAttribute === IssuableType.Epic ? defaultEpicSort : null,
};
},
update(data) {
......
......@@ -37,6 +37,8 @@ import projectMilestonesQuery from './queries/project_milestones.query.graphql';
export const ASSIGNEES_DEBOUNCE_DELAY = 250;
export const defaultEpicSort = 'TITLE_ASC';
export const assigneesQueries = {
[IssuableType.Issue]: {
query: getIssueAssignees,
......
......@@ -450,8 +450,9 @@ describe('SidebarDropdownWidget', () => {
expect(groupEpicsSpy).toHaveBeenNthCalledWith(1, {
fullPath: mockIssue.groupPath,
title: '',
sort: 'TITLE_ASC',
state: 'opened',
title: '',
});
});
......@@ -474,8 +475,9 @@ describe('SidebarDropdownWidget', () => {
expect(groupEpicsSpy).toHaveBeenNthCalledWith(2, {
fullPath: mockIssue.groupPath,
title: mockSearchTerm,
sort: 'TITLE_ASC',
state: 'opened',
title: mockSearchTerm,
});
});
});
......
......@@ -451,8 +451,9 @@ describe('SidebarDropdownWidget', () => {
expect(projectMilestonesSpy).toHaveBeenNthCalledWith(1, {
fullPath: mockIssue.projectPath,
title: '',
sort: null,
state: 'active',
title: '',
});
});
......@@ -477,8 +478,9 @@ describe('SidebarDropdownWidget', () => {
expect(projectMilestonesSpy).toHaveBeenNthCalledWith(2, {
fullPath: mockIssue.projectPath,
title: mockSearchTerm,
sort: null,
state: 'active',
title: mockSearchTerm,
});
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment