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
9fc605a3
Commit
9fc605a3
authored
Mar 24, 2021
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add changelog file
parent
08b98240
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ee/changelogs/322079-allow-overnight-oncall-shifts.yml
ee/changelogs/322079-allow-overnight-oncall-shifts.yml
+5
-0
ee/lib/incident_management/oncall_shift_generator.rb
ee/lib/incident_management/oncall_shift_generator.rb
+3
-8
No files found.
ee/changelogs/322079-allow-overnight-oncall-shifts.yml
0 → 100644
View file @
9fc605a3
---
title
:
Allow overnight shifts for oncall rotations
merge_request
:
57202
author
:
type
:
added
ee/lib/incident_management/oncall_shift_generator.rb
View file @
9fc605a3
...
...
@@ -129,15 +129,10 @@ module IncidentManagement
# expected_shift_count = 14 -> pretend it's a 2-week rotation
# shift_count = 2 -> we're calculating the shift for the 3rd day
# starts_at = Monday 00:00:00 + 8.hours + 2.days => Thursday 08:00:00
start_date
=
shift_cycle_starts_at
+
shift_count
.
days
start_date
=
end_date
=
shift_cycle_starts_at
+
shift_count
.
days
end_date
=
start_date
+
1
.
day
unless
rotation
.
active_period
.
end_after_start?
shift_start_date
,
shift_end_date
=
if
rotation
.
active_period
.
end_after_start?
[
start_date
,
start_date
]
else
[
start_date
,
start_date
+
1
.
day
]
end
starts_at
,
ends_at
=
rotation
.
active_period
.
for_dates
(
shift_start_date
,
shift_end_date
)
starts_at
,
ends_at
=
rotation
.
active_period
.
for_dates
(
start_date
,
end_date
)
shift_for
(
participant
,
[
rotation
.
starts_at
,
starts_at
].
max
,
limit_end_time
(
ends_at
))
end
...
...
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