Commit 42c6f634 authored by Adam Hegyi's avatar Adam Hegyi Committed by Kushal Pandya

Revert "Rename author_username to author_id"

This reverts commit 98ab3a2a.
parent 553cf378
...@@ -8,7 +8,7 @@ import { urlParamsToObject } from '~/lib/utils/common_utils'; ...@@ -8,7 +8,7 @@ import { urlParamsToObject } from '~/lib/utils/common_utils';
* { * {
* group_id: 'gitlab-org', * group_id: 'gitlab-org',
* project_id: 'gitlab-org/gitlab-test', * project_id: 'gitlab-org/gitlab-test',
* author_id: 'author', * author_username: 'author',
* milestone_title: 'my milestone', * milestone_title: 'my milestone',
* label_name: ['my label', 'yet another label'], * label_name: ['my label', 'yet another label'],
* merged_at_after: '2019-05-09T16:20:18.393Z' * merged_at_after: '2019-05-09T16:20:18.393Z'
...@@ -22,9 +22,7 @@ export const getCommonFilterParams = (state, getters) => { ...@@ -22,9 +22,7 @@ export const getCommonFilterParams = (state, getters) => {
return { return {
group_id: groupNamespace, group_id: groupNamespace,
project_id: projectPath, project_id: projectPath,
// The productivity analytics endpoint accepts an "author_id", however we get "author_username" from the filtered search author_username,
// As a result, we need to map the two values here.
author_id: author_username,
milestone_title, milestone_title,
label_name, label_name,
merged_at_after: getters.mergedOnAfterDate, merged_at_after: getters.mergedOnAfterDate,
......
...@@ -18,7 +18,7 @@ describe('Productivity analytics filter getters', () => { ...@@ -18,7 +18,7 @@ describe('Productivity analytics filter getters', () => {
const mockGetters = { mergedOnAfterDate: '2019-07-16T00:00:00.00Z' }; const mockGetters = { mergedOnAfterDate: '2019-07-16T00:00:00.00Z' };
const expected = { const expected = {
author_id: 'root', author_username: 'root',
group_id: 'gitlab-org', group_id: 'gitlab-org',
label_name: ['labelxyz'], label_name: ['labelxyz'],
merged_at_after: '2019-07-16T00:00:00.00Z', merged_at_after: '2019-07-16T00:00:00.00Z',
......
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