Skip to content

Commit

Permalink
Merge pull request #54 from Snowflake-Labs/make-separate-code-block
Browse files Browse the repository at this point in the history
JIRA handler issue description separate code block for event data.
  • Loading branch information
sfc-gh-pkommini authored Dec 15, 2022
2 parents d3b6043 + 51b3cef commit 25949e2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions handler_functions_sql/jira_handler_v2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ${jira_api_function}(
'name', COALESCE(payload['issue_type'], '${default_jira_issue_type}')
),
'summary', alert['TITLE']::STRING,
'description', '{code}' || ${json_beautify_function}(
'description', '*ALERT DATA*:\r\n{code}' || ${json_beautify_function}(
TO_JSON(
OBJECT_CONSTRUCT(
'Alert ID', alert['ID']::STRING,
Expand All @@ -32,12 +32,11 @@ ${jira_api_function}(
'Alert Time', alert['ALERT_TIME']::STRING,
'Detector', alert['DETECTOR']::STRING,
'Severity', alert['SEVERITY']::STRING,
'Description', alert['DESCRIPTION']::STRING,
'Event Data', alert['EVENT_DATA']::STRING
'Description', alert['DESCRIPTION']::STRING
)
),
4
) || '{code}'
) || '{code}\r\n\r\n' || '*EVENT DATA*:\r\n{code}' || alert['EVENT_DATA']::STRING || '{code}'
)
)
),
Expand Down

0 comments on commit 25949e2

Please sign in to comment.