Commit ecd14b7f authored by Peter Leitzen's avatar Peter Leitzen

Use `supports_severity?` to check feature availability on issuables

Avoid checking issue type.
parent bb9ef246
...@@ -197,7 +197,7 @@ module Issuable ...@@ -197,7 +197,7 @@ module Issuable
end end
def severity def severity
return IssuableSeverity::DEFAULT unless incident? return IssuableSeverity::DEFAULT unless supports_severity?
issuable_severity&.severity || IssuableSeverity::DEFAULT issuable_severity&.severity || IssuableSeverity::DEFAULT
end end
......
...@@ -12,7 +12,7 @@ module IncidentManagement ...@@ -12,7 +12,7 @@ module IncidentManagement
end end
def execute def execute
return unless issuable.incident? return unless issuable.supports_severity?
update_severity! update_severity!
add_system_note add_system_note
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment