Skip to content

Loading…

Fix postgres database backend problems #7

Merged
merged 4 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
12 app/views/all_time_team_main/index.html.erb
@@ -50,7 +50,7 @@
</div>
</div>
-<div style="width:48%;float:right;padding:5px;">
+<div style="float:left;padding:5px;">
<h3><%= l(:overwork_ranking) %></h3>
<p><%= l(:overwork_ranking_description, @overwork_ranking_vo.average) %>
@@ -83,7 +83,7 @@
</div>
</div>
-<div style="width:100%;margin:20px 20px;clear:both;"></div>
+<div style="clear: both; height: 20px;"></div>
<div style="width:100%;padding:5px;">
<h3><%= l(:passed_hours) %></h3>
@@ -102,11 +102,13 @@
<%= link_to version_vo.version_name,
{:controller => 'versions', :action => 'show', :id => version_vo.version_id} %>
</td>
- <td style="text-align:center">
+ <td>
+ <ul>
<% version_vo.users.each do |user| %>
- <%= link_to user.lastname, {:controller => 'account', :action => 'show', :id => user.id} %>
- (<%= user.count %>)<br />
+ <li><%= link_to user.lastname, {:controller => 'account', :action => 'show', :id => user.id} %>
+ (<%= user.count %>)</li>
<% end %>
+ </ul>
</td>
<% version_vo.hours.each do |hour| %>
<td style="font-size:2em;text-align:center"><%= hour %>h</td>
View
4 lib/all_time_team_common_logic.rb
@@ -8,7 +8,7 @@ def self.get_members(project_id)
members.user_id = users.id and users.type = 'User' and
(members.project_id = :project_id or
members.project_id in (select id from projects where parent_id = :project_id))
- group by user_id",
+ group by members.user_id, users.lastname, users.firstname",
{:project_id => project_id}])
end
@@ -20,7 +20,7 @@ def self.size_round(num, size)
end
def self.get_closed_num(version_id, is_closed)
- statuses = IssueStatus.find(:all, :conditions => ["is_closed = ?", is_closed])
+ statuses = IssueStatus.find(:all, :conditions => ["is_closed = ?", is_closed == 1])
num = 0
unless statuses.nil?
statuses.each do |status|
View
2 lib/overwork_ranking_logic.rb
@@ -55,7 +55,7 @@ def self.get_users(project_id, avg)
time_entries.project_id in (select id from projects where parent_id = :project_id)) and
time_entries.user_id in (select user_id from members where project_id = :project_id) and
time_entries.spent_on between :start_date and :end_date
- group by users.lastname
+ group by users.lastname, users.id
order by hours desc",
{:project_id => project_id, :start_date => get_limit_date.to_s, :end_date => (Date.today - 1).to_s}])
View
4 lib/passed_hours_logic.rb
@@ -36,7 +36,7 @@ def self.get_versions(project_id)
where
project_id = :project_id or
project_id in (select id from projects where parent_id = :project_id)
- group by versions.name
+ group by name, id, effective_date
order by name asc",
{:project_id => project_id}])
if results.nil?
@@ -84,7 +84,7 @@ def self.get_version_users(version_id)
issues.id = time_entries.issue_id and
issues.assigned_to_id = users.id and
issues.fixed_version_id = :version_id
- group by users.id",
+ group by users.id, users.lastname",
{:version_id => version_id}])
if users.nil?
Something went wrong with that request. Please try again.