ehpt 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehpt.rb +11 -9
- data/lib/ehpt/create_story_attributes.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a05f0260e924814bb99acea9bc0f8a02413af0d9fb600c6fd2d42b2e938901
|
4
|
+
data.tar.gz: be414b5a3ed868964190c826207c80b6e0f42cc4d1d497f0db087e3403af53e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20274ef9b1708bfd3b232830ed21dade73583d09d087520ff86ecc8056abce02e6b5378df51aee837f38f1b403ccae2b2cbdda810657ab092c0dcccd7dbc01f9
|
7
|
+
data.tar.gz: 52ce2e028384d218e683c6fdaf66668a53646a577b01656ba1a6f8227714cc79392c2eeb48d1453027e57de2ca01ecbd2efb9827cd2327f7f857e35e87cdbd2a
|
data/lib/ehpt.rb
CHANGED
@@ -9,14 +9,6 @@ require 'ehpt/get_project'
|
|
9
9
|
require 'ehpt/get_user_id_from_initial'
|
10
10
|
|
11
11
|
module Ehpt
|
12
|
-
def self.project=(project)
|
13
|
-
@@project = project
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.project
|
17
|
-
@@project
|
18
|
-
end
|
19
|
-
|
20
12
|
def self.call(csv_file, token, project_id)
|
21
13
|
project_getter = Ehpt::GetProject.new(token, project_id)
|
22
14
|
project_getter.call
|
@@ -27,7 +19,7 @@ module Ehpt
|
|
27
19
|
return
|
28
20
|
end
|
29
21
|
|
30
|
-
|
22
|
+
set_project(project_getter.data)
|
31
23
|
puts "Found project: #{project_getter.data.name}"
|
32
24
|
|
33
25
|
stories_creator = Ehpt::CreateStories.new(csv_file)
|
@@ -45,4 +37,14 @@ module Ehpt
|
|
45
37
|
pp stories_creator.warnings
|
46
38
|
end
|
47
39
|
end
|
40
|
+
|
41
|
+
def self.project
|
42
|
+
@@project
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def self.set_project(project)
|
48
|
+
@@project = project
|
49
|
+
end
|
48
50
|
end
|
@@ -24,6 +24,10 @@ module Ehpt
|
|
24
24
|
story_attrs[key] = value.split(',').map(&:to_i) if INT_ARRAY_TYPE_ATTRIBUTES.include?(key)
|
25
25
|
end
|
26
26
|
|
27
|
+
if story_attrs['story_type'] != 'feature' && !Ehpt.project.bugs_and_chores_are_estimatable
|
28
|
+
story_attrs['estimate'] = nil
|
29
|
+
end
|
30
|
+
|
27
31
|
if story_attrs.has_key?('requested_by')
|
28
32
|
user_id = get_user_id_from(story_attrs.delete('requested_by'))
|
29
33
|
story_attrs['requested_by_id'] = user_id unless user_id.nil?
|