From da9d1723f6f35b50b4af5f16fc92442b0724c593 Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Fri, 4 Feb 2022 10:04:49 -0500 Subject: [PATCH] invalid annotation logic better reflects component logic The EntitySplunkOnCallCard gives precedence to a `splunk.com/on-call-team` annotation. Therefore, the InvalidAnnotation component messaging should reflect that precedence, even in instances where _both_ supported annotations are provided and both are deemed invalid. Signed-off-by: Mike Ball --- .../src/components/EntitySplunkOnCallCard.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx index db479f9459..109484ac04 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx @@ -68,14 +68,14 @@ export const InvalidAnnotation = ({ }) => { let titleSuffix = 'provided annotation'; - if (teamName) { - titleSuffix = `"${teamName}" team name`; - } - if (routingKey) { titleSuffix = `"${routingKey}" routing key`; } + if (teamName) { + titleSuffix = `"${teamName}" team name`; + } + return (