firespring_dev_commands 2.1.5.pre.alpha.3 → 2.1.5
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: 3fb1d7a847389490b27a05b29cfa091a8f273edc0002d2e5ce770518562e105a
|
4
|
+
data.tar.gz: a22c86bccfecddae1c3688ab2a0433fbfdb7a9129bb29d3d401932bd9e94c3e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 024f67336c233aeaf3f9d80a85f265c07dabc4e84e82affaba1e21c03217961fec4828271874d7c1378f93b0109d70b055bc9a32ba23faf75f8b2491424abed8
|
7
|
+
data.tar.gz: af5615634eaa912b11d33cc4825deb247586e67ea71567d2efaa310cc0c8db5b0fa425a9eaae89585b4a1574e31408f9c55625d7fff5faf27b165e3df67a3a27
|
@@ -3,9 +3,9 @@ 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
|
-
attr_accessor :data, :project, :id, :title, :points, :assignee, :resolved_date, :histories, :
|
8
|
+
attr_accessor :data, :project, :id, :title, :points, :assignee, :resolved_date, :histories, :last_in_progress_history, :first_in_review_history, :last_closed_history
|
9
9
|
|
10
10
|
def initialize(data)
|
11
11
|
@data = data
|
@@ -16,9 +16,9 @@ module Dev
|
|
16
16
|
@assignee = Jira::User.lookup(data.assignee&.accountId)
|
17
17
|
@resolved_date = data.resolutiondate
|
18
18
|
@histories = Jira::Histories.populate(data)
|
19
|
-
@
|
20
|
-
@
|
21
|
-
@
|
19
|
+
@last_in_progress_history = nil
|
20
|
+
@first_in_review_history = nil
|
21
|
+
@last_closed_history = nil
|
22
22
|
end
|
23
23
|
|
24
24
|
def cycle_time
|
@@ -40,42 +40,42 @@ module Dev
|
|
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
|
+
@last_in_progress_history ||= histories.select do |history|
|
44
44
|
history.items.find do |item|
|
45
45
|
item['fieldId'] == 'status' && item['fromString'] == 'Open' && item['toString'] == 'In Progress'
|
46
46
|
end
|
47
47
|
end.max_by(&:created)
|
48
|
-
raise 'unable to find "In Progress" history entry needed to calculate cycle time' unless @
|
48
|
+
raise 'unable to find "In Progress" history entry needed to calculate cycle time' unless @last_in_progress_history
|
49
49
|
|
50
|
-
@
|
50
|
+
@last_in_progress_history
|
51
51
|
end
|
52
52
|
|
53
53
|
private def first_in_review_history
|
54
54
|
raise 'you must expand the changelog field to calculate cycle time' if histories.nil?
|
55
55
|
|
56
56
|
# Find the first instance in the histoy where the status moved to "In Review"
|
57
|
-
@
|
57
|
+
@first_in_review_history ||= histories.select do |history|
|
58
58
|
history.items.find do |item|
|
59
59
|
item['fieldId'] == 'status' && item['toString'] == 'In Review'
|
60
60
|
end
|
61
61
|
end.min_by(&:created)
|
62
|
-
raise 'unable to find "In Review" history entry needed to calculate cycle time' unless @
|
62
|
+
raise 'unable to find "In Review" history entry needed to calculate cycle time' unless @first_in_review_history
|
63
63
|
|
64
|
-
@
|
64
|
+
@first_in_review_history
|
65
65
|
end
|
66
66
|
|
67
67
|
private def last_closed_history
|
68
68
|
raise 'you must expand the changelog field to calculate cycle time' if histories.nil?
|
69
69
|
|
70
70
|
# Find the last instance in the histoy where the status moved to "Closed"
|
71
|
-
@
|
71
|
+
@last_closed_history ||= histories.select do |history|
|
72
72
|
history.items.find do |item|
|
73
73
|
item['fieldId'] == 'status' && item['toString'] == 'Closed'
|
74
74
|
end
|
75
75
|
end.max_by(&:created)
|
76
|
-
raise 'unable to find "Closed" history entry needed to calculate cycle time' unless @
|
76
|
+
raise 'unable to find "Closed" history entry needed to calculate cycle time' unless @last_closed_history
|
77
77
|
|
78
|
-
@
|
78
|
+
@last_closed_history
|
79
79
|
end
|
80
80
|
|
81
81
|
# Returns the value of the jira points field or 0 if the field is not found
|
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
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -333,9 +333,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
333
333
|
version: '3.1'
|
334
334
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
335
335
|
requirements:
|
336
|
-
- - "
|
336
|
+
- - ">="
|
337
337
|
- !ruby/object:Gem::Version
|
338
|
-
version:
|
338
|
+
version: '0'
|
339
339
|
requirements: []
|
340
340
|
rubygems_version: 3.4.10
|
341
341
|
signing_key:
|