firespring_dev_commands 2.1.14.pre.alpha.1 → 2.1.14.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 +4 -4
- data/lib/firespring_dev_commands/target_process/project.rb +2 -1
- data/lib/firespring_dev_commands/target_process/query.rb +5 -0
- data/lib/firespring_dev_commands/target_process/release.rb +2 -1
- data/lib/firespring_dev_commands/target_process/team.rb +2 -1
- data/lib/firespring_dev_commands/target_process/team_assignment.rb +2 -1
- data/lib/firespring_dev_commands/target_process/user.rb +2 -1
- data/lib/firespring_dev_commands/target_process/user_story.rb +14 -3
- data/lib/firespring_dev_commands/target_process/user_story_history.rb +3 -3
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c538ccb5986e06a222a6f68c6800ec3fa3abd5c183a12a103ef3ce2d0016292e
|
4
|
+
data.tar.gz: eb79878157371a911c7173cd65cc8429aaa1a23652a337a3ba6951f4afc1bda2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbf6c55887a571ac13037720efcf4ff1776a5323cd7b62780d11194045923066df3606066c39da439b08b9f8b039e86a5518783e6d82399f452498a271333cd8
|
7
|
+
data.tar.gz: e6b87d597be01d292bd241ee4a7e0fb08d1792d2f56813c927077f795b619fae50967964c8e4b85bee089a907e9794da346f54ea0c794da8f8a4fe9aed8882b3
|
@@ -2,9 +2,10 @@ module Dev
|
|
2
2
|
class TargetProcess
|
3
3
|
# Class containing project information
|
4
4
|
class Project
|
5
|
-
attr_accessor :id, :type, :name
|
5
|
+
attr_accessor :date, :id, :type, :name
|
6
6
|
|
7
7
|
def initialize(data)
|
8
|
+
@data = data
|
8
9
|
@id = data['Id']
|
9
10
|
@type = data['ResourceType']
|
10
11
|
@name = data['Name']
|
@@ -107,6 +107,11 @@ module Dev
|
|
107
107
|
self << "(Assignable.EntityType.Name eq '#{entity_type}')" unless entity_type.nil?
|
108
108
|
end
|
109
109
|
|
110
|
+
# Add a filter that looks for assignable id that match the given id
|
111
|
+
def filter_by_entity_id(entity_id)
|
112
|
+
self << "(Assignable.Id eq '#{entity_id}')" unless entity_id.nil?
|
113
|
+
end
|
114
|
+
|
110
115
|
# Add a filter that looks for assignable ids which are included in the given array
|
111
116
|
def filter_by_entity_ids(entity_ids)
|
112
117
|
self << "(Assignable.Id in ('#{entity_ids.join("', '")}'))" unless entity_ids.nil? || entity_ids.empty?
|
@@ -8,9 +8,10 @@ module Dev
|
|
8
8
|
# The api path for release requests
|
9
9
|
PATH = '/Releases'.freeze
|
10
10
|
|
11
|
-
attr_accessor :id, :type, :name, :start_date, :end_date, :custom_fields
|
11
|
+
attr_accessor :data, :id, :type, :name, :start_date, :end_date, :custom_fields
|
12
12
|
|
13
13
|
def initialize(data)
|
14
|
+
@data = data
|
14
15
|
@id = data['Id']
|
15
16
|
@type = data['ResourceType']
|
16
17
|
@name = data['Name']
|
@@ -2,9 +2,10 @@ module Dev
|
|
2
2
|
class TargetProcess
|
3
3
|
# Class containing team information
|
4
4
|
class Team
|
5
|
-
attr_accessor :id, :type, :name
|
5
|
+
attr_accessor :data, :id, :type, :name
|
6
6
|
|
7
7
|
def initialize(data)
|
8
|
+
@data = data
|
8
9
|
@id = data['Id']
|
9
10
|
@type = data['ResourceType']
|
10
11
|
@name = data['Name']
|
@@ -8,9 +8,10 @@ module Dev
|
|
8
8
|
# The api path for team assignment requests
|
9
9
|
PATH = '/TeamAssignments'.freeze
|
10
10
|
|
11
|
-
attr_accessor :id, :type, :start_date, :end_date, :team, :story
|
11
|
+
attr_accessor :data, :id, :type, :start_date, :end_date, :team, :story
|
12
12
|
|
13
13
|
def initialize(data)
|
14
|
+
@data = data
|
14
15
|
@id = data['Id']
|
15
16
|
@type = data['ResourceType']
|
16
17
|
@start_date = parse_time(data['StartDate'])
|
@@ -2,9 +2,10 @@ module Dev
|
|
2
2
|
class TargetProcess
|
3
3
|
# Class containing user information
|
4
4
|
class User
|
5
|
-
attr_accessor :id, :type, :name, :login
|
5
|
+
attr_accessor :data, :id, :type, :name, :login
|
6
6
|
|
7
7
|
def initialize(data)
|
8
|
+
@data = data
|
8
9
|
@id = data['Id']
|
9
10
|
@type = data['ResourceType']
|
10
11
|
@name = data['FullName']
|
@@ -8,10 +8,11 @@ module Dev
|
|
8
8
|
# The api path for user story requests
|
9
9
|
PATH = '/UserStories'.freeze
|
10
10
|
|
11
|
-
attr_accessor :type, :id, :name, :description, :start_date, :end_date, :create_date, :modify_date, :tags, :effort, :time_spent, :last_state_change_date,
|
12
|
-
:owner, :creator, :release, :team, :priority, :state
|
11
|
+
attr_accessor :data, :type, :id, :name, :description, :start_date, :end_date, :create_date, :modify_date, :tags, :effort, :time_spent, :last_state_change_date,
|
12
|
+
:project, :owner, :creator, :release, :team, :priority, :state
|
13
13
|
|
14
14
|
def initialize(data)
|
15
|
+
@data = data
|
15
16
|
@id = data['Id']
|
16
17
|
@type = data['ResourceType']
|
17
18
|
@name = data['Name']
|
@@ -30,7 +31,6 @@ module Dev
|
|
30
31
|
@effort = data['Effort']
|
31
32
|
@time_spent = data['TimeSpent']
|
32
33
|
@last_state_change_date = parse_time(data['LastStateChangeDate'])
|
33
|
-
@original_data = original_data
|
34
34
|
end
|
35
35
|
|
36
36
|
# Parse the dot net time representation into something that ruby can use
|
@@ -46,6 +46,17 @@ module Dev
|
|
46
46
|
|
47
47
|
(end_date - start_date).to_f / (60 * 60 * 24)
|
48
48
|
end
|
49
|
+
|
50
|
+
# Returns the time the team was responsible for the issue was
|
51
|
+
def team_cycle_time(team_ids)
|
52
|
+
# Calculate the difference and convert to days
|
53
|
+
finished_dev_query = Dev::TargetProcess::Query.new
|
54
|
+
finished_dev_query.filter_by_team_ids(team_ids)
|
55
|
+
finished_dev_query.filter_by_entity_type(Dev::TargetProcess::UserStory::RESOURCE_TYPE)
|
56
|
+
finished_dev_query.filter_by_entity_id(id)
|
57
|
+
team_assignments = Dev::TargetProcess.new.team_assignments(finished_dev_query)
|
58
|
+
team_assignments.sum(&:cycle_time)
|
59
|
+
end
|
49
60
|
end
|
50
61
|
end
|
51
62
|
end
|
@@ -8,10 +8,11 @@ module Dev
|
|
8
8
|
# The api path for user story requests
|
9
9
|
PATH = '/UserStoryHistories'.freeze
|
10
10
|
|
11
|
-
attr_accessor :type, :id, :source_entity_id, :name, :description, :start_date, :end_date, :create_date, :modify_date, :tags, :effort,
|
12
|
-
:last_state_change_date, :project, :owner, :creator, :release, :team, :priority, :state
|
11
|
+
attr_accessor :data, :type, :id, :source_entity_id, :name, :description, :start_date, :end_date, :create_date, :modify_date, :tags, :effort,
|
12
|
+
:time_spent, :last_state_change_date, :project, :owner, :creator, :release, :team, :priority, :state
|
13
13
|
|
14
14
|
def initialize(data)
|
15
|
+
@data = data
|
15
16
|
@id = data['Id']
|
16
17
|
@source_entity_id = data['SourceEntityId']
|
17
18
|
@type = data['ResourceType']
|
@@ -31,7 +32,6 @@ module Dev
|
|
31
32
|
@effort = data['Effort']
|
32
33
|
@time_spent = data['TimeSpent']
|
33
34
|
@last_state_change_date = parse_time(data['LastStateChangeDate'])
|
34
|
-
@original_data = original_data
|
35
35
|
end
|
36
36
|
|
37
37
|
# Parse the dot net time representation into something that ruby can use
|
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.14.pre.alpha.
|
4
|
+
version: 2.1.14.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-11-
|
11
|
+
date: 2023-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|