Permalink
Browse files

Do not count build/test failures as matches in the count.

  • Loading branch information...
1 parent 8767bc7 commit c2af00a3482117e4407f2ec4a5192e1a0ab06195 @Flameeyes Flameeyes committed Jul 16, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −1 display.rb
  2. +1 −1 views/index.erb
View
@@ -40,7 +40,9 @@
:public_url => (data.attributes["public_url"][0] rescue ""),
:date => (data.attributes["date"][0] rescue ""),
:pkg => (data.attributes["pkg"][0] rescue ""),
- :matches => (data.attributes["matches"][0] rescue ""),
+ :matches => (data.attributes["matches"][0].to_i rescue 0) -
+ ((data.attributes["pkg_failed"][0] == "true" rescue false) ? 1 : 0) -
+ ((data.attributes["test_failed"][0] == "true" rescue false) ? 1 : 0),
:pkg_failed => (data.attributes["pkg_failed"][0] == "true" rescue false),
:test_failed => (data.attributes["test_failed"][0] == "true" rescue false),
:bug_template => {
View
@@ -24,7 +24,7 @@
</td>
<td><%= item[:date] %></td>
<td>
- <%= item[:matches] %>
+ <%= item[:matches] unless item[:matches] == 0 %>
<% if item[:test_failed] %>
<img src="magnifier.png" width="16px" height="16px" alt="[TF]" />
<% end %>

0 comments on commit c2af00a

Please sign in to comment.