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
82f3ca03
Commit
82f3ca03
authored
Apr 09, 2021
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to style
parent
29675502
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
ee/app/services/incident_management/oncall_schedules/update_service.rb
...es/incident_management/oncall_schedules/update_service.rb
+7
-3
No files found.
ee/app/services/incident_management/oncall_schedules/update_service.rb
View file @
82f3ca03
...
...
@@ -35,14 +35,18 @@ module IncidentManagement
attr_reader
:oncall_schedule
,
:original_schedule_timezone
,
:user
,
:params
,
:project
def
update_rotations!
return
unless
original_schedule_timezone
!=
oncall_schedule
.
timezone
return
if
same_schedule_timezone?
update_rotation_active_periods
update_rotation_active_periods!
end
def
same_schedule_timezone?
original_schedule_timezone
==
oncall_schedule
.
timezone
end
# Converts & updates the active period to the new timezone
# Ex: 8:00 - 17:00 Europe/Berlin becomes 6:00 - 15:00 UTC
def
update_rotation_active_periods
def
update_rotation_active_periods
!
original_schedule_current_time
=
Time
.
current
.
in_time_zone
(
original_schedule_timezone
)
oncall_schedule
.
rotations
.
with_active_period
.
each
do
|
rotation
|
...
...
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