@beauraines/sprint-tracker 0.6.16 → 0.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.6.18](https://github.com/beauraines/sprint-tracker/compare/v0.6.17...v0.6.18) (2024-06-05)
6
+
7
+
8
+ ### Features
9
+
10
+ * **stats:** handles sprints with no stories/points ([6cc7c1c](https://github.com/beauraines/sprint-tracker/commit/6cc7c1c3d785c26deed92046327f2db0d92bbe9b))
11
+
12
+ ### [0.6.17](https://github.com/beauraines/sprint-tracker/compare/v0.6.16...v0.6.17) (2024-05-20)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **stats:** Uses proper data for combined stats outcomes chart ([#76](https://github.com/beauraines/sprint-tracker/issues/76)) ([401bedf](https://github.com/beauraines/sprint-tracker/commit/401bedf070d5543e8fcfcacbf9c4bc1dc5d70314)), closes [#75](https://github.com/beauraines/sprint-tracker/issues/75)
18
+
5
19
  ### [0.6.16](https://github.com/beauraines/sprint-tracker/compare/v0.6.15...v0.6.16) (2024-05-17)
6
20
 
7
21
 
package/R/combinedStats.R CHANGED
@@ -21,7 +21,7 @@ select
21
21
  s.sprint_name,
22
22
  s.start_date,
23
23
  s.end_date,
24
- so.story_points,
24
+ ifnull(so.story_points, so.issue_count) AS story_points, -- accounts for unpointed bug stories,
25
25
  o.name as outcome,
26
26
  o.id
27
27
  from
@@ -38,7 +38,7 @@ select
38
38
  s.sprint_name,
39
39
  s.start_date,
40
40
  s.end_date,
41
- so.story_points,
41
+ ifnull(so.story_points, so.issue_count) AS story_points, -- accounts for unpointed bug stories,
42
42
  o.name as outcome,
43
43
  o.id
44
44
  from
@@ -95,7 +95,7 @@ sprintData = sprintData %>%
95
95
 
96
96
  sprintData = sprintData %>%
97
97
  group_by(name) %>%
98
- mutate(velocity = cumsum(completed)/sprint_number)
98
+ mutate(velocity = cumsum(replace_na(completed, 0))/sprint_number)
99
99
 
100
100
  ## Add Completion Percentage
101
101
  sprintData = sprintData %>%
@@ -230,12 +230,42 @@ commitmentPercentage <- commitmentPercentage +
230
230
 
231
231
  ### Generate Sprint Outcomes
232
232
 
233
- # TODO - pull in the SQL here
234
- outcomes = read_csv(str_c(Sys.getenv("HOME"),"/","outcomes.csv"))
233
+ con <- dbConnect(RSQLite::SQLite(),"~/projects/sprint-tracker/tracker.db")
234
+
235
+ sql <- str_c("SELECT
236
+ p.name project_name,
237
+ s.id sprint_id,
238
+ s.sprint_name,
239
+ s.end_date,
240
+ case
241
+ when o.name = 'Commitment' then 'A-Commitment'
242
+ when o.name = 'Delivered' then 'B-Delivered'
243
+ else o.name
244
+ end outcome,
245
+ ifnull(so.story_points, so.issue_count) AS story_points -- accounts for unpointed bug stories
246
+
247
+ from projects p
248
+
249
+ LEFT JOIN sprints s on s.project_id = p.id
250
+ JOIN sprint_outcomes so on so.sprint_id = s.id
251
+ JOIN outcomes o on o.id = so.outcome_id
252
+
253
+ WHERE
254
+ p.id =",project_id,";"
255
+ )
256
+
257
+ res <- dbSendQuery(con,sql)
258
+ outcomes <- dbFetch(res)
259
+
260
+ # Clear the result
261
+ dbClearResult(res)
262
+
263
+ # Disconnect from the database
264
+ dbDisconnect(con)
235
265
 
236
266
  outcomes <- outcomes %>%
237
267
  tibble() %>%
238
- filter(story_points != 0) %>%
268
+ # filter(story_points != 0) %>%
239
269
  mutate(
240
270
  end_date = as.Date(end_date)
241
271
  )
@@ -244,12 +274,12 @@ outcomes <- outcomes %>%
244
274
 
245
275
  entire_project_velocity = (outcomes %>%
246
276
  filter(outcome == 'B-Delivered' ) %>%
247
- summarize( average_velocity = mean(story_points)))$average_velocity
277
+ summarize( average_velocity = mean(story_points,na.rm = TRUE)))$average_velocity
248
278
 
249
279
  average_velocity = (outcomes %>%
250
280
  filter(outcome == 'B-Delivered') %>%
251
281
  filter(!sprint_name %in% c('Accessibility Improvement 0','Accessibility Improvements 1')) %>%
252
- summarize( average_velocity = mean(story_points)))$average_velocity
282
+ summarize( average_velocity = mean(story_points,na.rm = TRUE)))$average_velocity
253
283
 
254
284
  # Compute 95% band velocity
255
285
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beauraines/sprint-tracker",
3
- "version": "0.6.16",
3
+ "version": "0.6.18",
4
4
  "description": "Database and R visualizations to track sprint performance",
5
5
  "main": "cli.js",
6
6
  "bin": {