where('? > builds.created_at AND builds.created_at > ?',to,from).
where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?",to,from).
count(:all)
count(:all)
@success<<project.builds.
@success<<project.builds.
where('? > builds.created_at AND builds.created_at > ?',to,from).
where("? > #{Ci::Build.table_name}.created_at AND #{Ci::Build.table_name}.created_at > ?",to,from).
success.count(:all)
success.count(:all)
end
end
end
end
...
@@ -60,7 +60,7 @@ module Ci
...
@@ -60,7 +60,7 @@ module Ci
classBuildTime<Chart
classBuildTime<Chart
defcollect
defcollect
commits=project.commits.joins(:builds).where('builds.finished_at is NOT NULL AND builds.started_at is NOT NULL').last(30)
commits=project.commits.joins(:builds).where("#{Ci::Build.table_name}.finished_at is NOT NULL AND #{Ci::Build.table_name}.started_at is NOT NULL").last(30)