opsask 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/opsask/app.rb +12 -12
- data/lib/opsask/helpers.rb +8 -6
- data/public/css/style.css +11 -6
- data/views/stats.erb +60 -54
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ce138895960f65fce46e09577b18f380e61dd6e
|
4
|
+
data.tar.gz: 64570d094d77d62fb6c673e91e57cb58c855f034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67191a0f13c028c44a2868359265a57d33ce8169a308b6c6fcc5ab9edae858e3cb3ec5b1aa71b792857ed5c53e45f3ce930b38b83b93dbe2222a1f60a5f60c89
|
7
|
+
data.tar.gz: 1d4940331aa5a544d41e91009a018d5bee4dbef173d4a7dfcdb7101dd4039ff5f31c7d5edee77ab34829cd2b36e21c46f292e5effc3b540934fb91b3f511918c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.4
|
data/lib/opsask/app.rb
CHANGED
@@ -65,15 +65,15 @@ module OpsAsk
|
|
65
65
|
sprint: sprint,
|
66
66
|
ask_stats: stats_for(
|
67
67
|
asks_in_sprint(num),
|
68
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is not empty", nil)}",
|
69
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is empty",
|
70
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and \"Story Points\" is empty",
|
68
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is not empty", project: nil)}",
|
69
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is empty", project: nil)}",
|
70
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and \"Story Points\" is empty", project: nil)}"
|
71
71
|
),
|
72
72
|
sprint_stats: stats_for(
|
73
73
|
items_in_sprint(num),
|
74
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is not empty", nil)}",
|
75
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is empty", nil)}",
|
76
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and \"Story Points\" is empty",
|
74
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is not empty", project: nil)}",
|
75
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is empty", project: nil)}",
|
76
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and \"Story Points\" is empty", project: nil)}"
|
77
77
|
),
|
78
78
|
untracked_jiras: untracked_issues,
|
79
79
|
stragglers: straggling_issues,
|
@@ -92,15 +92,15 @@ module OpsAsk
|
|
92
92
|
sprint: sprint,
|
93
93
|
ask_stats: stats_for(
|
94
94
|
asks_in_current_sprint,
|
95
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is not empty", nil)}",
|
96
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is empty", nil)}",
|
97
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and \"Story Points\" is empty", nil)}"
|
95
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is not empty", project: nil)}",
|
96
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and resolution is empty", project: nil)}",
|
97
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("labels in (#{sprint_label_prefix}#{num}) and \"Story Points\" is empty", project: nil)}"
|
98
98
|
),
|
99
99
|
sprint_stats: stats_for(
|
100
100
|
items_in_current_sprint,
|
101
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is not empty", nil)}",
|
102
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is empty", nil)}",
|
103
|
-
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and \"Story Points\" is empty", nil)}"
|
101
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is not empty", project: nil)}",
|
102
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and resolution is empty", project: nil)}",
|
103
|
+
"#{settings.config[:jira_url]}/issues/?jql=#{URI::escape normalized_jql("sprint = #{id} and \"Story Points\" is empty", project: nil)}"
|
104
104
|
),
|
105
105
|
untracked_jiras: untracked_issues,
|
106
106
|
stragglers: straggling_issues,
|
data/lib/opsask/helpers.rb
CHANGED
@@ -48,7 +48,9 @@ module OpsAsk
|
|
48
48
|
|
49
49
|
if i['fields']['customfield_10002'].nil?
|
50
50
|
unsized_issues << issue
|
51
|
-
|
51
|
+
end
|
52
|
+
|
53
|
+
if resolution.nil?
|
52
54
|
unresolved_issues << issue
|
53
55
|
else
|
54
56
|
resolved_issues << issue
|
@@ -100,7 +102,7 @@ module OpsAsk
|
|
100
102
|
return [] unless logged_in?
|
101
103
|
issues = []
|
102
104
|
id = get_sprint(num)['id']
|
103
|
-
query = normalized_jql("sprint = #{id}", nil)
|
105
|
+
query = normalized_jql("sprint = #{id}", project: nil)
|
104
106
|
@jira_client.Issue.jql(query, max_results: 500).each do |i|
|
105
107
|
issues << i.attrs
|
106
108
|
end
|
@@ -114,7 +116,7 @@ module OpsAsk
|
|
114
116
|
def asks_in_sprint num
|
115
117
|
return [] unless logged_in?
|
116
118
|
issues = []
|
117
|
-
query = normalized_jql("labels in (#{sprint_label_prefix}#{num})", nil)
|
119
|
+
query = normalized_jql("labels in (#{sprint_label_prefix}#{num})", project: nil)
|
118
120
|
@jira_client.Issue.jql(query, max_results: 500).each do |i|
|
119
121
|
issues << i.attrs
|
120
122
|
end
|
@@ -461,9 +463,9 @@ module OpsAsk
|
|
461
463
|
end
|
462
464
|
|
463
465
|
def normalized_jql query, \
|
464
|
-
project
|
465
|
-
require_label
|
466
|
-
ignore_label
|
466
|
+
project: settings.config[:project_name], \
|
467
|
+
require_label: settings.config[:require_label],
|
468
|
+
ignore_label: settings.config[:ignore_label]
|
467
469
|
# ...
|
468
470
|
query += %Q| and project = #{project}| if project
|
469
471
|
query += %Q| and labels = #{require_label}| if require_label
|
data/public/css/style.css
CHANGED
@@ -152,29 +152,29 @@ input[type="checkbox"] + label {
|
|
152
152
|
|
153
153
|
.stats .stat {
|
154
154
|
color: #ebebeb;
|
155
|
-
padding-top:
|
156
|
-
padding-bottom:
|
155
|
+
padding-top: 4em;
|
156
|
+
padding-bottom: 4em;
|
157
157
|
background-color: #333;
|
158
158
|
text-align: center;
|
159
159
|
font-size: 1.25em;
|
160
160
|
}
|
161
161
|
|
162
162
|
.stat.resolved {
|
163
|
-
background-color: rgb(
|
163
|
+
background-color: rgb(68, 157, 68);
|
164
164
|
margin-top: 0.75em;
|
165
165
|
}
|
166
166
|
|
167
167
|
.stat.resolved:hover {
|
168
|
-
background-color: rgb(
|
168
|
+
background-color: rgb(92, 184, 92);
|
169
169
|
}
|
170
170
|
|
171
171
|
.stat.unresolved {
|
172
|
-
background-color: rgb(
|
172
|
+
background-color: rgb(201, 48, 44);
|
173
173
|
margin-top: 2em;
|
174
174
|
}
|
175
175
|
|
176
176
|
.stat.unresolved:hover {
|
177
|
-
background-color: rgb(
|
177
|
+
background-color: rgb(217, 83, 79);
|
178
178
|
}
|
179
179
|
|
180
180
|
.stat .number {
|
@@ -198,6 +198,11 @@ input[type="checkbox"] + label {
|
|
198
198
|
text-align : center;
|
199
199
|
}
|
200
200
|
|
201
|
+
.unsized.empty {
|
202
|
+
color: #666;
|
203
|
+
}
|
204
|
+
|
201
205
|
#more-stats {
|
206
|
+
margin-top: 1em;
|
202
207
|
text-align: center;
|
203
208
|
}
|
data/views/stats.erb
CHANGED
@@ -1,63 +1,69 @@
|
|
1
|
-
|
2
|
-
<div class="
|
3
|
-
<div class="small-
|
4
|
-
<
|
5
|
-
|
6
|
-
<
|
7
|
-
<
|
8
|
-
<div class="
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<
|
15
|
-
<div class="
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
<% if ask_stats[:unsized] && ask_stats[:unsized][:number] > 0 %>
|
21
|
-
<a href="<%= ask_stats[:unsized][:link] rescue '#' %>" target="_blank">
|
22
|
-
<div class="unsized"><%= pluralize ask_stats[:unsized][:number], 'unsized issue' %></div>
|
1
|
+
<% if logged_in? %>
|
2
|
+
<div class="row" id="stats">
|
3
|
+
<div class="small-10 columns">
|
4
|
+
<div class="small-5 small-offset-2 columns">
|
5
|
+
<h2>OpsAsk</h2>
|
6
|
+
<div class="stats">
|
7
|
+
<a href="<%= ask_stats[:resolved][:link] rescue '#' %>" target="_blank">
|
8
|
+
<div class="stat resolved">
|
9
|
+
<div class="issues"><span class="number"><%= ask_stats[:resolved][:number] rescue 0 %></span> issues</div>
|
10
|
+
<div class="points"><span class="number"><%= ask_stats[:resolved][:points] rescue 0 %></span> points</div>
|
11
|
+
<div class="about">Resolved</div>
|
12
|
+
</div>
|
13
|
+
</a>
|
14
|
+
<a href="<%= ask_stats[:unresolved][:link] rescue '#' %>" target="_blank">
|
15
|
+
<div class="stat unresolved">
|
16
|
+
<div class="issues"><span class="number"><%= ask_stats[:unresolved][:number] rescue 0 %></span> issues</div>
|
17
|
+
<div class="points"><span class="number"><%= ask_stats[:unresolved][:points] rescue 0 %></span> points</div>
|
18
|
+
<div class="about">Unresolved</div>
|
19
|
+
</div>
|
23
20
|
</a>
|
24
|
-
|
21
|
+
<% if ask_stats[:unsized] && ask_stats[:unsized][:number] > 0 %>
|
22
|
+
<a href="<%= ask_stats[:unsized][:link] rescue '#' %>" target="_blank">
|
23
|
+
<div class="unsized"><%= pluralize ask_stats[:unsized][:number], 'unsized issue' %></div>
|
24
|
+
</a>
|
25
|
+
<% else %>
|
26
|
+
<div class="unsized empty">No unsized issues!</div>
|
27
|
+
<% end %>
|
28
|
+
</div>
|
25
29
|
</div>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</div>
|
36
|
-
</a>
|
37
|
-
<a href="<%= sprint_stats[:unresolved][:link] rescue '#' %>" target="_blank">
|
38
|
-
<div class="stat unresolved">
|
39
|
-
<div class="issues"><span class="number"><%= sprint_stats[:unresolved][:number] rescue 0 %></span> issues</div>
|
40
|
-
<div class="points"><span class="number"><%= sprint_stats[:unresolved][:points] rescue 0 %></span> points</div>
|
41
|
-
<div class="about">Unresolved</div>
|
42
|
-
</div>
|
43
|
-
</a>
|
44
|
-
<% if sprint_stats[:unsized] && sprint_stats[:unsized][:number] > 0 %>
|
45
|
-
<a href="<%= sprint_stats[:unsized][:link] rescue '#' %>" target="_blank">
|
46
|
-
<div class="unsized"><%= pluralize sprint_stats[:unsized][:number], 'unsized issue' %></div>
|
30
|
+
<div class="small-5 columns">
|
31
|
+
<h2><%= sprint['name'] %></h2>
|
32
|
+
<div class="stats">
|
33
|
+
<a href="<%= sprint_stats[:resolved][:link] rescue '#' %>" target="_blank">
|
34
|
+
<div class="stat resolved">
|
35
|
+
<div class="issues"><span class="number"><%= sprint_stats[:resolved][:number] rescue 0 %></span> issues</div>
|
36
|
+
<div class="points"><span class="number"><%= sprint_stats[:resolved][:points] rescue 0 %></span> points</div>
|
37
|
+
<div class="about">Resolved</div>
|
38
|
+
</div>
|
47
39
|
</a>
|
48
|
-
|
40
|
+
<a href="<%= sprint_stats[:unresolved][:link] rescue '#' %>" target="_blank">
|
41
|
+
<div class="stat unresolved">
|
42
|
+
<div class="issues"><span class="number"><%= sprint_stats[:unresolved][:number] rescue 0 %></span> issues</div>
|
43
|
+
<div class="points"><span class="number"><%= sprint_stats[:unresolved][:points] rescue 0 %></span> points</div>
|
44
|
+
<div class="about">Unresolved</div>
|
45
|
+
</div>
|
46
|
+
</a>
|
47
|
+
<% if sprint_stats[:unsized] && sprint_stats[:unsized][:number] > 0 %>
|
48
|
+
<a href="<%= sprint_stats[:unsized][:link] rescue '#' %>" target="_blank">
|
49
|
+
<div class="unsized"><%= pluralize sprint_stats[:unsized][:number], 'unsized issue' %></div>
|
50
|
+
</a>
|
51
|
+
<% else %>
|
52
|
+
<div class="unsized empty">No unsized issues!</div>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
49
55
|
</div>
|
50
56
|
</div>
|
51
57
|
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
<!-- <%= outlier_stats[:outlier_link] %> -->
|
59
|
+
<% unless outlier_stats[:outlier_issues].empty? %>
|
60
|
+
<div class="row" id="more-stats">
|
61
|
+
<div class="small-10 columns">
|
62
|
+
<div class="small-10 small-offset-2 columns">
|
63
|
+
<a href="<%= outlier_stats[:outlier_link] %>">There <%= outlier_stats[:outlier_issues].length > 0 ? 'were' : 'was' %>
|
64
|
+
<%= pluralize outlier_stats[:outlier_issues].length, 'issues' %> unaccounted for during this sprint</a>
|
65
|
+
</div>
|
60
66
|
</div>
|
61
67
|
</div>
|
62
|
-
|
68
|
+
<% end %>
|
63
69
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opsask
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|