firespring_dev_commands 2.1.5.pre.alpha.2 → 2.1.5.pre.alpha.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b0ed9fd9f98ba8519047e26cdd8a2c9f9d17a36ab4fc7a5892a314443205e6d
|
4
|
+
data.tar.gz: 8522ba7b6923d0098453ac9f38b37d42d13685a046ae1e4ccf81928af87ce8cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86272afe09c769bf177cdd2707d0fdd6f550386aa2884f6f5705c9a5055b42f3298cc0fba75a0c05e9f15f76bf9ecda26e839034364e99f6432bea76c43455e
|
7
|
+
data.tar.gz: 39a5fe0b5822deedde861270278346376bbf1c855e1945fa48dcc0d9ad0f5585bc9e609dac6c7d649519a2dc438bfb4597e399b6a81296c43f1019c74b000217
|
@@ -3,7 +3,7 @@ module Dev
|
|
3
3
|
# Contains information and methods representing a Jira issue
|
4
4
|
class Issue
|
5
5
|
# Issue subtypes which do not map to a story type
|
6
|
-
NON_STORY_TYPES = ['review', 'sub-task', 'code review sub-task', 'pre-deploy sub-task', 'deploy sub-task', 'devops sub-task'].freeze
|
6
|
+
NON_STORY_TYPES = ['epic', 'review', 'sub-task', 'code review sub-task', 'pre-deploy sub-task', 'deploy sub-task', 'devops sub-task'].freeze
|
7
7
|
|
8
8
|
attr_accessor :data, :project, :id, :title, :points, :assignee, :resolved_date, :histories, :in_progress_history, :in_review_history, :closed_history
|
9
9
|
|
@@ -23,12 +23,12 @@ module Dev
|
|
23
23
|
|
24
24
|
def cycle_time
|
25
25
|
# Calculate the difference and convert to days
|
26
|
-
((last_closed_history.created -
|
26
|
+
((last_closed_history.created - last_in_progress_history.created) / 60 / 60 / 24).round(2)
|
27
27
|
end
|
28
28
|
|
29
29
|
def in_progress_cycle_time
|
30
30
|
# Calculate the difference and convert to days
|
31
|
-
((first_in_review_history.created -
|
31
|
+
((first_in_review_history.created - last_in_progress_history.created) / 60 / 60 / 24).round(2)
|
32
32
|
end
|
33
33
|
|
34
34
|
def in_review_cycle_time
|
@@ -36,15 +36,15 @@ module Dev
|
|
36
36
|
((last_closed_history.created - first_in_review_history.created) / 60 / 60 / 24).round(2)
|
37
37
|
end
|
38
38
|
|
39
|
-
private def
|
39
|
+
private def last_in_progress_history
|
40
40
|
raise 'you must expand the changelog field to calculate cycle time' if histories.nil?
|
41
41
|
|
42
42
|
# Find the first instance in the histoy where the status moved to "In Progress"
|
43
43
|
@in_progress_history ||= histories.select do |history|
|
44
44
|
history.items.find do |item|
|
45
|
-
item['fieldId'] == 'status' && item['toString'] == 'In Progress'
|
45
|
+
item['fieldId'] == 'status' && item['fromString'] == 'Open' && item['toString'] == 'In Progress'
|
46
46
|
end
|
47
|
-
end.
|
47
|
+
end.max_by(&:created)
|
48
48
|
raise 'unable to find "In Progress" history entry needed to calculate cycle time' unless @in_progress_history
|
49
49
|
|
50
50
|
@in_progress_history
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.5.pre.alpha.
|
4
|
+
version: 2.1.5.pre.alpha.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|