shiftzilla 0.2.30 → 0.2.31

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: 984ab4e2d18746aec6f05682be91d9ea27351d55387225f1556b4144644ce82f
4
- data.tar.gz: 2c80a8591161baa4c25ed9c5a6b7e433e9063bb89243dc6fd0513ea3e1421c08
3
+ metadata.gz: 31c2e44b571b53ef99faa54d3c5e6b54e4557143fe9f40f70bc45b4124872892
4
+ data.tar.gz: 9354388b6fc4a651aa283db031af0c29073b2e78094982c0e08a9f2f7ce6f672
5
5
  SHA512:
6
- metadata.gz: 4670f0e251af5beefa9ff3407d0c011665d776cfe3e70c3d4bf29bd9ad2281345a7968a5b482bebe7b704fd1530171fbe26c9ae91d56c14806a5be774d0cefb1
7
- data.tar.gz: 714aabd8a0cc15c49191323cd75a78ff70d8c9d309bd593785b9c5e067379353de2d86292581ca8925dd8f792cd506524ab09234637d01de7150b79ca5b550d6
6
+ metadata.gz: 213b09d6780afa354c2d7e020ac369432c01a20fdeab2229c87f542084df504204a7410732edd1b49325e82b997fa54852991fabff391adac5eb39eca69997b3
7
+ data.tar.gz: b4fdff84e4f84291a1c832777ba872a52a88479bbdc427c8c7122490f8b6d5f8bfe837e053fe5dd44ffa981e4ce3b00d5cd69082d861c8d3a91f9d1e3ae05daf
@@ -1,37 +1,37 @@
1
1
  module Shiftzilla
2
2
  class Bug
3
- attr_reader :id, :first_seen, :last_seen, :beta_blocker, :test_blocker, :ops_blocker, :online_blocker, :owner, :component, :pm_score, :cust_cases, :tgt_release, :summary, :status
3
+ attr_reader :id, :first_seen, :last_seen, :blocker_plus, :blocker_unknown, :test_blocker, :ops_blocker, :owner, :component, :pm_score, :cust_cases, :tgt_release, :summary, :status
4
4
 
5
5
  def initialize(bzid,binfo)
6
- @id = bzid
7
- @first_seen = binfo[:snapdate]
8
- @last_seen = binfo[:snapdate]
9
- @beta_blocker = binfo[:beta_blocker]
10
- @test_blocker = binfo[:test_blocker]
11
- @ops_blocker = binfo[:ops_blocker]
12
- @online_blocker = binfo[:online_blocker]
13
- @owner = binfo[:owner]
14
- @summary = binfo[:summary]
15
- @status = binfo[:status]
16
- @component = binfo[:component]
17
- @pm_score = binfo[:pm_score]
18
- @cust_cases = binfo[:cust_cases]
19
- @tgt_release = binfo[:tgt_release]
6
+ @id = bzid
7
+ @first_seen = binfo[:snapdate]
8
+ @last_seen = binfo[:snapdate]
9
+ @blocker_plus = binfo[:blocker_plus]
10
+ @blocker_unknown = binfo[:blocker_unknown]
11
+ @test_blocker = binfo[:test_blocker]
12
+ @ops_blocker = binfo[:ops_blocker]
13
+ @owner = binfo[:owner]
14
+ @summary = binfo[:summary]
15
+ @status = binfo[:status]
16
+ @component = binfo[:component]
17
+ @pm_score = binfo[:pm_score]
18
+ @cust_cases = binfo[:cust_cases]
19
+ @tgt_release = binfo[:tgt_release]
20
20
  end
21
21
 
22
22
  def update(binfo)
23
- @last_seen = binfo[:snapdate]
24
- @beta_blocker = binfo[:beta_blocker]
25
- @test_blocker = binfo[:test_blocker]
26
- @ops_blocker = binfo[:ops_blocker]
27
- @online_blocker = binfo[:online_blocker]
28
- @owner = binfo[:owner]
29
- @summary = binfo[:summary]
30
- @status = binfo[:status]
31
- @component = binfo[:component]
32
- @pm_score = binfo[:pm_score]
33
- @cust_cases = binfo[:cust_cases]
34
- @tgt_release = binfo[:tgt_release]
23
+ @last_seen = binfo[:snapdate]
24
+ @blocker_plus = binfo[:blocker_plus]
25
+ @blocker_unknown = binfo[:blocker_unknown]
26
+ @test_blocker = binfo[:test_blocker]
27
+ @ops_blocker = binfo[:ops_blocker]
28
+ @owner = binfo[:owner]
29
+ @summary = binfo[:summary]
30
+ @status = binfo[:status]
31
+ @component = binfo[:component]
32
+ @pm_score = binfo[:pm_score]
33
+ @cust_cases = binfo[:cust_cases]
34
+ @tgt_release = binfo[:tgt_release]
35
35
  end
36
36
 
37
37
  def age
@@ -66,4 +66,4 @@ module Shiftzilla
66
66
  val.to_f.to_s == val.to_s || val.to_i.to_s == val.to_s
67
67
  end
68
68
  end
69
- end
69
+ end
@@ -47,18 +47,18 @@ module Shiftzilla
47
47
 
48
48
  # Package up bug data
49
49
  binfo = {
50
- :snapdate => snapdate,
51
- :beta_blocker => keyw.include?('BetaBlocker'),
52
- :test_blocker => keyw.include?('TestBlocker'),
53
- :ops_blocker => keyw.include?('OpsBlocker'),
54
- :online_blocker => keyw.include?('OnlineStarter'),
55
- :owner => owns,
56
- :summary => summ,
57
- :status => stat,
58
- :component => comp,
59
- :pm_score => pmsc,
60
- :cust_cases => (cust == 1),
61
- :tgt_release => tgtr,
50
+ :snapdate => snapdate,
51
+ :blocker_plus => keyw.include?('blocker+'),
52
+ :blocker_unknown => keyw.include?('blocker?'),
53
+ :test_blocker => keyw.include?('TestBlocker'),
54
+ :ops_blocker => keyw.include?('ServiceDeliveryBlocker'),
55
+ :owner => owns,
56
+ :summary => summ,
57
+ :status => stat,
58
+ :component => comp,
59
+ :pm_score => pmsc,
60
+ :cust_cases => (cust == 1),
61
+ :tgt_release => tgtr,
62
62
  }
63
63
 
64
64
  tgt_release = @config.release_by_target(tgtr)
@@ -104,7 +104,8 @@ module Shiftzilla
104
104
 
105
105
  # Add info to the snapshot
106
106
  snapdata.bug_ids << bzid
107
- if bug.beta_blocker or bug.test_blocker or bug.ops_blocker or bug.online_blocker
107
+ # Only the blocker+ flag counts as a blocker for snapshots
108
+ if bug.blocker_plus
108
109
  snapdata.tb_ids << bzid
109
110
  end
110
111
  if bug.cust_cases
@@ -25,7 +25,9 @@ module Shiftzilla
25
25
  output_format = @fields.map{ |fld| "%{#{fld.to_s}}" }.join("\x1F")
26
26
  table_fields = @fields.map{ |fld| "\"#{field_map[fld]}\"" }.join(',')
27
27
  insert_frame = @fields.map{ |fld| '?' }.join(', ')
28
- bz_command = "bugzilla query --savedsearch #{@search} --savedsearch-sharer-id=#{@sharer} --outputformat='#{output_format}||EOR'"
28
+ # Also grabs the flags to check for the blocker flag, this is dropped before inserting into the db
29
+ bz_command = "bugzilla query --savedsearch #{@search} --savedsearch-sharer-id=#{@sharer} --outputformat='#{output_format}\x1F%{flags}flags||EOR'"
30
+
29
31
  bz_csv = `#{bz_command}`
30
32
  retrieved = []
31
33
  bz_csv.split("||EOR\n").each do |row|
@@ -47,6 +49,28 @@ module Shiftzilla
47
49
  values[@external_bugs_idx] = 0
48
50
  end
49
51
  end
52
+
53
+ # Check for blocker+ flag and stub it as a keyword
54
+ if not values[-1].nil? and values[-1].include?("blocker+")
55
+ keyword_idx = @fields.index(:keywords)
56
+ if not values[keyword_idx]
57
+ values[keyword_idx] = "blocker+"
58
+ else
59
+ values[keyword_idx] = values[keyword_idx] + ",blocker+"
60
+ end
61
+ end
62
+ # Check for blocker? flag and stub it as a keyword
63
+ if not values[-1].nil? and values[-1].include?("blocker?")
64
+ keyword_idx = @fields.index(:keywords)
65
+ if not values[keyword_idx]
66
+ values[keyword_idx] = "blocker?"
67
+ else
68
+ values[keyword_idx] = values[keyword_idx] + ",blocker?"
69
+ end
70
+ end
71
+
72
+ # Remove flags, which is always the final value
73
+ values = values[0...-2]
50
74
  retrieved << values
51
75
  end
52
76
  puts "Retrieved #{retrieved.length} rows"
@@ -1,3 +1,3 @@
1
1
  module Shiftzilla
2
- VERSION = "0.2.30"
2
+ VERSION = "0.2.31"
3
3
  end
@@ -153,7 +153,7 @@
153
153
  %thead
154
154
  %tr
155
155
  %th
156
- %abbr{ :title => 'Beta Blocker, Test Blocker, Ops Blocker, or Online Blocker?' } Blocker
156
+ %abbr{ :title => 'Blocker flags and keywords' } Blocker
157
157
  %th
158
158
  %abbr{ :title => 'See https://mojo.redhat.com/docs/DOC-1159309' } PM
159
159
  %th
@@ -169,10 +169,10 @@
169
169
  - all_bugs.each do |b|
170
170
  %tr
171
171
  %td
172
- = b.beta_blocker ? "<span class='badge badge-info'>&#946;eta</span>" : ''
173
- = b.test_blocker ? "<span class='badge badge-danger'>Test</span>" : ''
174
- = b.ops_blocker ? "<span class='badge badge-dark'>Ops</span>" : ''
175
- = b.online_blocker ? "<span class='badge badge-warning'>Online</span>" : ''
172
+ = b.blocker_plus ? "<span class='badge badge-danger'>&#914;locker+</span>" : ''
173
+ = b.blocker_unknown ? "<span class='badge badge-info'>blocker?</span>" : ''
174
+ = b.test_blocker ? "<span class='badge badge-warning'>Test</span>" : ''
175
+ = b.ops_blocker ? "<span class='badge badge-dark'>SD</span>" : ''
176
176
  %td= b.pm_score
177
177
  %td= b.cust_cases ? "<span class='badge badge-warning'>CC</span>" : ''
178
178
  %td(data-order="#{b.semver}")= b.tgt_release
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiftzilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.30
4
+ version: 0.2.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - N. Harrison Ripps
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-01-21 00:00:00.000000000 Z
12
+ date: 2020-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -184,7 +184,7 @@ files:
184
184
  - lib/shiftzilla/version.rb
185
185
  - shiftzilla.gemspec
186
186
  - shiftzilla.sql.tmpl
187
- - shiftzilla_cfg.yml.tmpl
187
+ - shiftzilla_cfg.yaml.tmpl
188
188
  - template.haml
189
189
  - vendor/flot/jquery.flot.min.js
190
190
  homepage: http://github.com/nhr/shiftzilla
@@ -206,7 +206,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  requirements: []
209
- rubygems_version: 3.0.3
209
+ rubyforge_project:
210
+ rubygems_version: 2.7.7
210
211
  signing_key:
211
212
  specification_version: 4
212
213
  summary: Shiftzilla is a tool for providing historical reports based on Bugzilla data