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
58f0af10
Commit
58f0af10
authored
Sep 16, 2019
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-wrong-constant-name' into 'master'
Fix naming of constant See merge request gitlab-org/gitlab!16769
parents
defc3518
0b3e12fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/time_tracking_formatter.rb
lib/gitlab/time_tracking_formatter.rb
+3
-3
No files found.
lib/gitlab/time_tracking_formatter.rb
View file @
58f0af10
...
@@ -5,7 +5,7 @@ module Gitlab
...
@@ -5,7 +5,7 @@ module Gitlab
extend
self
extend
self
# We may want to configure it through project settings in a future version.
# We may want to configure it through project settings in a future version.
CUSTOM_DAY_AND_
WEEK
_LENGTH
=
{
hours_per_day:
8
,
days_per_month:
20
}.
freeze
CUSTOM_DAY_AND_
MONTH
_LENGTH
=
{
hours_per_day:
8
,
days_per_month:
20
}.
freeze
def
parse
(
string
)
def
parse
(
string
)
string
=
string
.
sub
(
/\A-/
,
''
)
string
=
string
.
sub
(
/\A-/
,
''
)
...
@@ -14,7 +14,7 @@ module Gitlab
...
@@ -14,7 +14,7 @@ module Gitlab
begin
begin
ChronicDuration
.
parse
(
ChronicDuration
.
parse
(
string
,
string
,
CUSTOM_DAY_AND_
WEEK
_LENGTH
.
merge
(
default_unit:
'hours'
))
CUSTOM_DAY_AND_
MONTH
_LENGTH
.
merge
(
default_unit:
'hours'
))
rescue
rescue
nil
nil
end
end
...
@@ -26,7 +26,7 @@ module Gitlab
...
@@ -26,7 +26,7 @@ module Gitlab
def
output
(
seconds
)
def
output
(
seconds
)
ChronicDuration
.
output
(
ChronicDuration
.
output
(
seconds
,
seconds
,
CUSTOM_DAY_AND_
WEEK
_LENGTH
.
merge
(
CUSTOM_DAY_AND_
MONTH
_LENGTH
.
merge
(
format: :short
,
format: :short
,
limit_to_hours:
limit_to_hours_setting
,
limit_to_hours:
limit_to_hours_setting
,
weeks:
true
))
weeks:
true
))
...
...
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