Commit 18ec84cd authored by Jarka Košanová's avatar Jarka Košanová

Merge branch '225649-add-description-to-alert-issue-body' into 'master'

Add description field in alert presenter

Closes #225649

See merge request gitlab-org/gitlab!35862
parents 964a603a 6ece5c95
......@@ -60,6 +60,7 @@ module AlertManagement
metadata << list_item('Service', service) if service
metadata << list_item('Monitoring tool', monitoring_tool) if monitoring_tool
metadata << list_item('Hosts', host_links) if hosts.any?
metadata << list_item('Description', description) if description.present?
metadata.join(MARKDOWN_LINE_BREAK)
end
......
---
title: Fix rendering alert issue description field.
merge_request: 35862
author:
type: fixed
......@@ -12,7 +12,7 @@ RSpec.describe AlertManagement::AlertPresenter do
}
end
let_it_be(:alert) do
create(:alert_management_alert, :with_host, :with_service, :with_monitoring_tool, project: project, payload: generic_payload)
create(:alert_management_alert, :with_description, :with_host, :with_service, :with_monitoring_tool, project: project, payload: generic_payload)
end
subject(:presenter) { described_class.new(alert) }
......@@ -29,7 +29,8 @@ RSpec.describe AlertManagement::AlertPresenter do
**Severity:** #{presenter.severity}#{markdown_line_break}
**Service:** #{alert.service}#{markdown_line_break}
**Monitoring tool:** #{alert.monitoring_tool}#{markdown_line_break}
**Hosts:** #{alert.hosts.join(' ')}
**Hosts:** #{alert.hosts.join(' ')}#{markdown_line_break}
**Description:** #{alert.description}
#### Alert Details
......
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