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
131cdf41
Commit
131cdf41
authored
Mar 09, 2022
by
Sarah Yasonik
Committed by
Mikołaj Wawrzyniak
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer OncallShifts::ReadService to inherit from BaseProjectService
parent
79a3f536
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
ee/app/services/incident_management/oncall_shifts/read_service.rb
...ervices/incident_management/oncall_shifts/read_service.rb
+5
-4
No files found.
ee/app/services/incident_management/oncall_shifts/read_service.rb
View file @
131cdf41
...
...
@@ -2,7 +2,7 @@
module
IncidentManagement
module
OncallShifts
class
ReadService
class
ReadService
<
::
BaseProjectService
MAXIMUM_TIMEFRAME
=
1
.
month
# @param rotation [IncidentManagement::OncallRotation]
...
...
@@ -11,8 +11,9 @@ module IncidentManagement
# @option params - start_time [Time]
# @option params - end_time [Time]
def
initialize
(
rotation
,
current_user
,
start_time
:,
end_time
:)
super
(
project:
rotation
.
project
,
current_user:
current_user
)
@rotation
=
rotation
@current_user
=
current_user
@start_time
=
start_time
@end_time
=
end_time
@current_time
=
Time
.
current
...
...
@@ -33,7 +34,7 @@ module IncidentManagement
private
attr_reader
:rotation
,
:
current_user
,
:
start_time
,
:end_time
,
:current_time
attr_reader
:rotation
,
:start_time
,
:end_time
,
:current_time
def
find_shifts
rotation
...
...
@@ -62,7 +63,7 @@ module IncidentManagement
end
def
available?
::
Gitlab
::
IncidentManagement
.
oncall_schedules_available?
(
rotation
.
project
)
::
Gitlab
::
IncidentManagement
.
oncall_schedules_available?
(
project
)
end
def
allowed?
...
...
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