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
ecd14b7f
Commit
ecd14b7f
authored
Dec 07, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `supports_severity?` to check feature availability on issuables
Avoid checking issue type.
parent
bb9ef246
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+1
-1
app/services/incident_management/incidents/update_severity_service.rb
.../incident_management/incidents/update_severity_service.rb
+1
-1
No files found.
app/models/concerns/issuable.rb
View file @
ecd14b7f
...
...
@@ -197,7 +197,7 @@ module Issuable
end
def
severity
return
IssuableSeverity
::
DEFAULT
unless
incident
?
return
IssuableSeverity
::
DEFAULT
unless
supports_severity
?
issuable_severity
&
.
severity
||
IssuableSeverity
::
DEFAULT
end
...
...
app/services/incident_management/incidents/update_severity_service.rb
View file @
ecd14b7f
...
...
@@ -12,7 +12,7 @@ module IncidentManagement
end
def
execute
return
unless
issuable
.
incident
?
return
unless
issuable
.
supports_severity
?
update_severity!
add_system_note
...
...
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