Jira Macro syntax question using SQ: How to query for priority

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2023

In the Jira macro for confluence the priority column is abbreviated to P. I want to call all issues that have a high priority via a SQL, (yes SQL), for another macro and I am not returning any results with any of the examples below. What is the syntax for querying via SQL by priority status? Is there a document on how to query Jira values using SQL? 

 

COUNT (CASE WHEN Priority= "Critical" then 1 ELSE NULL END) AS 'Critical',

COUNT (CASE WHEN Priority= 1 then 1 ELSE NULL END) AS 'Critical',

COUNT (CASE WHEN P= "Critical"  then 1 ELSE NULL END) AS 'Critical',

2023-03-13_15-34-36.png

1 answer

1 accepted

1 vote
Answer accepted
Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2023

Note to self, priority in the jira macro in confluence is abbreviated as P and must be written as such in a query. Column name had to go in '', status had to go in "". 

 

This solved the issue: 

 

SELECT

COUNT (CASE WHEN 'P'="Critical" or 'P'="Major"then 1 ELSE NULL END) AS 'Critical',
COUNT (CASE WHEN 'P'="Highest" or 'P'="High"then 1 ELSE NULL END) AS 'High',
COUNT (CASE WHEN 'P'="Medium" or 'P'="Low" or 'P'="Lowest" then 1 ELSE NULL END) AS 'Medium/Low'
COUNT (CASE WHEN 'P'="Blocked" then 1 ELSE NULL END) AS 'Blocked'

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events