change sonar reuslts
This commit is contained in:
parent
6dbb2e4e94
commit
8bb2b5e8d9
|
@ -252,7 +252,7 @@ class QualityAnalysisController < ApplicationController
|
||||||
unresolved_issue_count = JSON.parse(unresolved_issues)["total"].to_i
|
unresolved_issue_count = JSON.parse(unresolved_issues)["total"].to_i
|
||||||
all_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}").read
|
all_issues = open(@sonar_address + "/api/issues/search?projectKeys=#{@resource_id}&authors=#{email}").read
|
||||||
all_issue_count = JSON.parse(all_issues)["total"].to_i
|
all_issue_count = JSON.parse(all_issues)["total"].to_i
|
||||||
ratio = (changes == 0 ? 0 : format("%0.4f",unresolved_issue_count.to_f/changes.to_f))
|
ratio = ((changes == 0 || all_issue_count == 0) ? 0 : format("%0.4f",all_issue_count.to_f/changes.to_f))
|
||||||
@user_quality_infos << {:email => email, :changes => changes, :unresolved_issue_count => unresolved_issue_count, :ratio => ratio, :all_issue_count => all_issue_count}
|
@user_quality_infos << {:email => email, :changes => changes, :unresolved_issue_count => unresolved_issue_count, :ratio => ratio, :all_issue_count => all_issue_count}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue