Skip to content

[Bug][Engineering Overview Dashboard] Query to classify type of work done appears to be incorrect #6720

@unarmedcivilian

Description

@unarmedcivilian

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

The query to classify issue type to strategic / non strategic / bug appears to be incorrect.
https://github.com/apache/incubator-devlake/blob/44fa3f23e352bacd5d7482ac807996e2e03636eb/grafana/dashboards/EngineeringOverview.json#L1822
select sum(case when i.type = 'BUG' then 1 else 0 end) as 'Bug', sum(case when i.type = 'BUG' and epic_key != '' then 1 else 0 end) as 'Strategic', sum(case when i.type != 'BUG' and epic_key = '' then 1 else 0 end) as 'Non-Strategic' from issues i join board_issues bi on i.id = bi.issue_id join boards b on bi.board_id = b.id join project_mapping pm on b.id = pm.row_id where pm.project_name in ($project) and i.resolution_date is not null and date(resolution_date) between STR_TO_DATE('$month','%Y-%m-%d') and STR_TO_DATE('$month','%Y-%m-%d') + INTERVAL 1 MONTH - INTERVAL 1 DAY

What do you expect to happen

I would expect strategic to actually be i.type != 'BUG' instead of i.type = 'BUG' like above.

How to reproduce

Check attached link to code

Anything else

No response

Version

v0.20.0-beta5

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

type/bugThis issue is a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions