OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/views/cost_reports/index.rhtml

40 lines
1.0 KiB

<% if @custom_error %>
<div class="flash error"><%= @custom_error %></div>
<% end %>
<div style="border-width: 1; background-color: #BBB; padding: 5px">
<% @query = CostQuery.new
@query.group_by :issue_id
@query.column :tweek
@query.row :project_id
@query.row :user_id
@walker = @query.walker
@row = @walker.row_first
@column = @walker.column_first %>
query chain: <br />
<ul>
<% chain = @query.chain
while chain %>
<li><%= chain.class.to_s %></li>
<% chain = chain.child
end %>
</ul>
<% max = 20 %>
Result (row):
<pre><% @row.recursive_each_with_level do |l, r| %>
<%= "#{'| '*l}#{r.class} (#{r.fields}) # size:#{r.size}" %><% max -=1; break if max <= 0; end %>
...
</pre>
<% max = 20 %>
Result (column):
<pre><% @column.recursive_each_with_level do |l, r| %>
<%= "#{'| '*l}#{r.class} (#{r.fields}) # size:#{r.size}" %><% max -=1; break if max <= 0; end %>
...
</pre>
SQL statement: <br />
<pre><%= @query.sql_statement.to_s %></pre>
</div>