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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bee523dd1511046a8f0aeb28f6587c5489c4d7b674b0fdd71eb178cc1576da86
4
- data.tar.gz: dc47c8db8fe50b4d672261be2106a6c0b5f64e71321528b14d0116bafd5b2af4
3
+ metadata.gz: 69a05f0260e924814bb99acea9bc0f8a02413af0d9fb600c6fd2d42b2e938901
4
+ data.tar.gz: be414b5a3ed868964190c826207c80b6e0f42cc4d1d497f0db087e3403af53e5
5
5
  SHA512:
6
- metadata.gz: b404e4aa579b442dabda86c2f4654796f24e92715043d6643f39bc16ea045d379c7941520fad7b06263be4aedd245ede884b6b172eba8868125dd61da72948b1
7
- data.tar.gz: 8c73fd0d71dc064f8673526998d23d8b4bed5828f9d6cd263a94cffe27b18a07d029ebec2f4c8eca4df1c52554ef339e4358763e8b6607401ca77b03ddf70a65
6
+ metadata.gz: 20274ef9b1708bfd3b232830ed21dade73583d09d087520ff86ecc8056abce02e6b5378df51aee837f38f1b403ccae2b2cbdda810657ab092c0dcccd7dbc01f9
7
+ data.tar.gz: 52ce2e028384d218e683c6fdaf66668a53646a577b01656ba1a6f8227714cc79392c2eeb48d1453027e57de2ca01ecbd2efb9827cd2327f7f857e35e87cdbd2a
@@ -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
- self.project = project_getter.data
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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ehpt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - phamhoaivu911