You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "hezyin (via GitHub)" <gi...@apache.org> on 2023/05/15 23:06:35 UTC

[GitHub] [incubator-devlake] hezyin opened a new issue, #5197: [Bug][Dashboard] Engineering Throughput and Cycle Time - Issues Story Points Completed

hezyin opened a new issue, #5197:
URL: https://github.com/apache/incubator-devlake/issues/5197

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What happened
   
   This is reported by community member Matt Arnold in Slack. He's on v0.16.0.
   
   ```
   SELECT
     DATE_ADD(date(i.creation_date), INTERVAL -$interval(date(i.creation_date))+1 DAY) as time,
     sum(case when i.status = ‘DONE’ then i.story_point else 0 end) as ‘Story Points Completed’
   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
     $__timeFilter(i.creation_date)
     and pm.project_name in ($project)
   group by 1
   ```
   
   Matt believes here it should use `resolution_date` instead of `creation_date`. And it's missing an order by statement which means that the data is sometimes returned in a random order which Grafana processes poorly (see attached picture)
   
   ![image](https://github.com/apache/incubator-devlake/assets/2908155/ac720523-b45a-49fa-afae-f4d0e4e955db)
   
   Here's his updated SQL:
   
   ```
   SELECT
     DATE_ADD(date(i.resolution_date), INTERVAL -$interval(date(i.resolution_date))+1 DAY) as time,
     sum(case when i.status = ‘DONE’ then i.story_point else 0 end) as ‘Story Points Completed’
   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
     $__timeFilter(i.resolution_date)
     and pm.project_name in ($project)
   group by 1
   order by time
   ```
   
   ### What do you expect to happen
   
   See above
   
   ### How to reproduce
   
   See above
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   v0.16.0
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] hezyin closed issue #5197: [Bug][Dashboard] Engineering Throughput and Cycle Time - Issues Story Points Completed

Posted by "hezyin (via GitHub)" <gi...@apache.org>.
hezyin closed issue #5197: [Bug][Dashboard] Engineering Throughput and Cycle Time - Issues Story Points Completed
URL: https://github.com/apache/incubator-devlake/issues/5197


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] Startrekzky commented on issue #5197: [Bug][Dashboard] Engineering Throughput and Cycle Time - Issues Story Points Completed

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on issue #5197:
URL: https://github.com/apache/incubator-devlake/issues/5197#issuecomment-1549482919

   I think changing `created_date` to `resolution_date` is acceptable if the users' purpose is to measure the issues that have been finished, rather than issues created within a timeframe that are finished.
   
   Also, I found something else to improve in this SQL. Please see below:
   
   ```
   SELECT
     DATE_ADD(date(i.resolution_date), INTERVAL -$interval(date(i.resolution_date))+1 DAY) as time,
     sum(case when i.status = ‘DONE’ then i.story_point else 0 end) as ‘Story Points Completed’
   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 and pm.`table` = 'boards'
   WHERE
     $__timeFilter(i.resolution_date)
     and pm.project_name in ($project)
   group by 1
   order by 1
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org