firespring_dev_commands 2.1.5.pre.alpha.2 → 2.1.5.pre.alpha.3
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 101c47da046645898e5b86cabc26e811b44ab1ac9cdaab315c6d56ae6a8cbfda
|
|
4
|
+
data.tar.gz: 612e956a91c707a636d7340117693ed652fc0f4be57335381ec469d59f249cf9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '058341647a83dbe7dd0aae41993e28344b0c24e3d0f44361405350e8266f14258dad1d802d7be9f60e4339046dcce436cb34d004e5b83f37622392a8b2e994d7'
|
|
7
|
+
data.tar.gz: 1adc7b1393ea8574250af52247adfdb1ed7ef5ccdd8ea2ccf8514253be201215bca35cdd62f59a2149b9354841c58a9e6dac08ffe5bb1590ab8439bd4fa56c59
|
|
@@ -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.3
|
|
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
|