Permalink
Browse files

Lower case on columns alias to keep compatibility with databases. Issue

#15. Thanks to @douglas.
  • Loading branch information...
1 parent 41a8477 commit 6ce12602edb513cf63e0a75ec1527fed11c4ada9 @alexmonteiro committed May 14, 2012
@@ -34,7 +34,7 @@ def index
=begin
@statusesByAssigneds = Issue.find_by_sql("select assigned_to_id, (select firstname from users where id = assigned_to_id) as assigned_name,
status_id, name as status,
- count(1) as totalAssignedByStatuses
+ count(1) as totalassignedbystatuses
from issues, issue_statuses
where project_id in (#{stringSqlProjectsSubPorjects})
and issue_statuses.id = status_id
@@ -47,7 +47,7 @@ def index
(select COUNT(1)
from issues i
where i.project_id in (#{stringSqlProjectsSubPorjects})
- and ((i.assigned_to_id = issues.assigned_to_id and i.assigned_to_id is not null)or(i.assigned_to_id is null and issues.assigned_to_id is null)) and i.status_id = issue_statuses.id) as totalAssignedByStatuses
+ and ((i.assigned_to_id = issues.assigned_to_id and i.assigned_to_id is not null)or(i.assigned_to_id is null and issues.assigned_to_id is null)) and i.status_id = issue_statuses.id) as totalassignedbystatuses
from issues, issue_statuses
where project_id in (#{stringSqlProjectsSubPorjects})
group by assigned_to_id, assigned_name, issue_statuses.id, issue_statuses.name
@@ -37,8 +37,8 @@ def index
from issues i
where i.project_id in (#{stringSqlProjectsSubPorjects})
and i.due_date is not null
- and i.due_date <= issues.due_date) as sumEstimatedHours,
- (select sum(hours) from time_entries where project_id in (#{stringSqlProjectsSubPorjects}) and created_on <= issues.due_date ) as sumSpentHours
+ and i.due_date <= issues.due_date) as sumestimatedhours,
+ (select sum(hours) from time_entries where project_id in (#{stringSqlProjectsSubPorjects}) and created_on <= issues.due_date ) as sumspenthours
from issues
where issues.project_id in (#{stringSqlProjectsSubPorjects})
and due_date is not null
@@ -1 +0,0 @@
-<h1>Teste</h1>
@@ -47,7 +47,7 @@ $(document).ready(function() {
},
series: [{
data: [<% @statusesByAssigneds.group_by(&:assigned_name).each do |s, t| %>
- <%= t.map{|a| a.totalAssignedByStatuses.to_i}.sum.inspect.html_safe%>,
+ <%= t.map{|a| a.totalassignedbystatuses.to_i}.sum.inspect.html_safe%>,
<%end%>
],
dataLabels: {
@@ -118,7 +118,7 @@ $(document).ready(function() {
<% @statusesByAssigneds.group_by(&:name).each do |s, t| %>
{
name: '<%= s.to_s%>',
- data: <%= t.map{|a| a.totalAssignedByStatuses.to_i}.inspect.html_safe%>
+ data: <%= t.map{|a| a.totalassignedbystatuses.to_i}.inspect.html_safe%>
},
<%end%>
]
@@ -53,7 +53,7 @@ $(document).ready(function() {
data:
[
<% @issuesSpentHours.each do | issue | %>
- <%=issue.sumEstimatedHours.to_f%>,
+ <%=issue.sumestimatedhours.to_f%>,
<%end%>
]
},
@@ -62,7 +62,7 @@ $(document).ready(function() {
data:
[
<% @issuesSpentHours.each do | issue | %>
- <%=issue.sumSpentHours.to_f%>,
+ <%=issue.sumspenthours.to_f%>,
<%end%>
]
}
@@ -106,7 +106,7 @@ $(document).ready(function() {
},
series: [
{name: '<%=t :time_mgmt_estimated_label%>',
- data: [<%= @issuesSpentHours.last.sumEstimatedHours %>],
+ data: [<%= @issuesSpentHours.last.sumestimatedhours %>],
dataLabels: {
enabled: true,
rotation: 0,
@@ -123,7 +123,7 @@ $(document).ready(function() {
}
},
{name: '<%=t :time_mgmt_spent_label %>',
- data: [<%= @issuesSpentHours.last.sumSpentHours %>],
+ data: [<%= @issuesSpentHours.last.sumspenthours %>],
dataLabels: {
enabled: true,
rotation: 0,

0 comments on commit 6ce1260

Please sign in to comment.