Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Board does not match Analytics

John Szarek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2025

I am trying to build a board that allows the scrum team to focus on their commitments.  We use Jira Teams and I am trying to get my dashboard to match the in progress section of the jira board. 

This is my SQL query I am getting missing 3 work items and cannot see why.  Is there something that stands out with this query?

 

SELECT `Sprint`.`workspace_id` AS `Workspace ID`,
`Sprint`.`sprint_id` AS `Sprint ID`,
`Issue`.`issue_key` AS `Issue key`,
`Issue`.`summary` AS `Summary`,
`Issue`.`status` AS `Status`,
`Issue`.`story_points` AS `Story points`,
`Issue component mapping`.`component_id` AS `Component ID`,
`Project component`.`name` AS `Component`,
`Issue`.`assignee_account_id` as `Assignee ID`,
`Account`.`name` as `Assignee`,
`Issue custom fields`.`Rank` AS `Rank`,
`Issue custom fields`.`Flagged` AS `Flagged`
FROM `jsw_sprint` AS `Sprint`
INNER JOIN `jsw_issue_sprint_history` AS `Issue sprint history` ON `Issue sprint history`.`sprint_id` = `Sprint`.`sprint_id`
INNER JOIN `jira_issue` AS `Issue` ON `Issue sprint history`.`issue_id` = `Issue`.`issue_id`
RIGHT JOIN `atlassian_team` AS `Team` ON `Issue`.`team_id` = `Team`.`team_id`
INNER JOIN `jira_issue_component_mapping` AS `Issue component mapping` ON `Issue component mapping`.`issue_id` = `Issue`.`issue_id`
FULL JOIN `jira_project_component` AS `Project component` ON `Issue component mapping`.`component_id` = `Project component`.`component_id`
INNER JOIN `account` as `Account` on `Account`.`account_id` = `Issue`.`assignee_account_id`
INNER JOIN
(SELECT `issue_id`,
CASE
WHEN SIZE(`Rank`) > 0 THEN ELEMENT_AT(`Rank`, 1)
ELSE NULL
END AS `Rank`,
CASE
WHEN SIZE(`Flagged`) > 0 THEN `Flagged`
ELSE NULL
END AS `Flagged`
FROM
(SELECT `issue_id`,
`name`,
`value`
FROM `jira_issue_field`) PIVOT (COLLECT_LIST(`value`)
FOR `name` IN ('Flagged',
'Rank'))) AS `Issue custom fields` ON `Issue custom fields`.`issue_id` = `Issue`.`issue_id`
WHERE (`Sprint`.`workspace_id` = {WORKSPACE})
AND (`Issue sprint history`.`sprint_id` = {SPRINT_NAME})
AND (`Team`.`name` = {TEAM_NAME})
AND (`Issue`.`status` = 'Development Complete' or `Issue`.`status` = 'Pre-release' or `Issue`.`status` = 'In Progress')
GROUP BY `Sprint`.`workspace_id`,
`Sprint`.`sprint_id`,
`Issue`.`issue_key`,
`Issue`.`summary`,
`Issue`.`story_points`,
`Issue`.`status`,
`Issue component mapping`.`component_id`,
`Project component`.`name`,
`Issue`.`assignee_account_id`,
`Issue custom fields`.`Rank`,
`Issue custom fields`.`Flagged`,
`Account`.`name`
ORDER BY `Project component`.`name` ASC,
`Issue custom fields`.`Flagged`,
`Issue custom fields`.`Rank`,
`Issue`.`issue_key` ASC,
`Issue`.`summary` ASC,
`Issue`.`story_points` ASC,
`Issue component mapping`.`component_id` ASC,

`Account`.`name` ASC
LIMIT 100000;

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events