Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c684b6b0
Commit
c684b6b0
authored
Oct 07, 2019
by
Martin Wortschack
Committed by
Kushal Pandya
Oct 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use datetime instead of date
- Change merged_at_after and merged_at_before to datetime
parent
7c6e27fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
app/assets/javascripts/lib/utils/datetime_utility.js
app/assets/javascripts/lib/utils/datetime_utility.js
+3
-0
ee/app/assets/javascripts/analytics/productivity_analytics/store/modules/filters/getters.js
...s/productivity_analytics/store/modules/filters/getters.js
+5
-5
ee/spec/frontend/analytics/productivity_analytics/store/modules/filters/getters_spec.js
...ductivity_analytics/store/modules/filters/getters_spec.js
+4
-4
No files found.
app/assets/javascripts/lib/utils/datetime_utility.js
View file @
c684b6b0
...
...
@@ -561,3 +561,6 @@ export const getDateInPast = (date, daysInPast) => {
dateClone
.
setTime
(
dateClone
.
getTime
()
-
daysInPast
*
24
*
60
*
60
*
1000
),
).
toISOString
();
};
export
const
beginOfDayTime
=
'
T00:00:00Z
'
;
export
const
endOfDayTime
=
'
T23:59:59Z
'
;
ee/app/assets/javascripts/analytics/productivity_analytics/store/modules/filters/getters.js
View file @
c684b6b0
import
dateFormat
from
'
dateformat
'
;
import
{
urlParamsToObject
}
from
'
~/lib/utils/common_utils
'
;
import
{
getDateInPast
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
getDateInPast
,
beginOfDayTime
,
endOfDayTime
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
chartKeys
,
scatterPlotAddonQueryDays
}
from
'
../../../constants
'
;
import
{
dateFormats
}
from
'
../../../../shared/constants
'
;
...
...
@@ -15,8 +15,8 @@ import { dateFormats } from '../../../../shared/constants';
* author_username: 'author',
* milestone_title: 'my milestone',
* label_name: ['my label', 'yet another label'],
* merged_at_after: '2019-06-11'
* merged_at_before: '2019-09-09'
* merged_at_after: '2019-06-11
T00:00:00Z
'
* merged_at_before: '2019-09-09
T23:59:59Z
'
* }
*
*/
...
...
@@ -39,8 +39,8 @@ export const getCommonFilterParams = state => chartKey => {
author_username
,
milestone_title
,
label_name
,
merged_at_after
:
mergedAtAfterDate
,
merged_at_before
:
dateFormat
(
endDate
,
dateFormats
.
isoDate
)
,
merged_at_after
:
`
${
mergedAtAfterDate
}${
beginOfDayTime
}
`
,
merged_at_before
:
`
${
dateFormat
(
endDate
,
dateFormats
.
isoDate
)}${
endOfDayTime
}
`
,
};
};
...
...
ee/spec/frontend/analytics/productivity_analytics/store/modules/filters/getters_spec.js
View file @
c684b6b0
...
...
@@ -29,8 +29,8 @@ describe('Productivity analytics filter getters', () => {
author_username
:
'
root
'
,
group_id
:
'
gitlab-org
'
,
label_name
:
[
'
labelxyz
'
],
merged_at_after
:
'
2019-09-01
'
,
merged_at_before
:
'
2019-09-07
'
,
merged_at_after
:
'
2019-09-01
T00:00:00Z
'
,
merged_at_before
:
'
2019-09-07
T23:59:59Z
'
,
milestone_title
:
'
foo
'
,
project_id
:
'
gitlab-org/gitlab-test
'
,
};
...
...
@@ -47,8 +47,8 @@ describe('Productivity analytics filter getters', () => {
author_username
:
'
root
'
,
group_id
:
'
gitlab-org
'
,
label_name
:
[
'
labelxyz
'
],
merged_at_after
:
'
2019-08-02
'
,
merged_at_before
:
'
2019-09-07
'
,
merged_at_after
:
'
2019-08-02
T00:00:00Z
'
,
merged_at_before
:
'
2019-09-07
T23:59:59Z
'
,
milestone_title
:
'
foo
'
,
project_id
:
'
gitlab-org/gitlab-test
'
,
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment