Project

General

Profile

Patch #14483 ยป total_spent_time_query.patch

Jost Baron, 2013-07-18 02:01

View differences:

app/models/issue_query.rb (working copy)
263 263
        :default_order => 'desc',
264 264
        :caption => :label_spent_time
265 265
      )
266

  
267
      @available_columns.insert index+1, QueryColumn.new(:total_spent_hours,
268
        :sortable => "COALESCE( " +
269
                     "(SELECT SUM(t.hours) FROM #{TimeEntry.table_name} AS t JOIN #{Issue.table_name} AS i ON t.issue_id = i.id " +
270
                         "WHERE            (i.root_id = #{Issue.table_name}.root_id) " +
271
                                      "AND (i.lft >= #{Issue.table_name}.lft) " +
272
                                      "AND (i.rgt <= #{Issue.table_name}.rgt) " +
273
                      "), 0) ",
274
        :default_order => 'desc',
275
        :caption => :label_total_spent_time
276
      )
266 277
    end
267 278

  
268 279
    if User.current.allowed_to?(:set_issues_private, nil, :global => true) ||
config/locales/de.yml (working copy)
726 726
  label_sort_lower: Eins tiefer
727 727
  label_sort_lowest: Ans Ende
728 728
  label_spent_time: Aufgewendete Zeit
729
  label_total_spent_time: Kumulierte aufgewendete Zeit (mit Unteraufgaben)
729 730
  label_start_to_end: Anfang - Ende
730 731
  label_start_to_start: Anfang - Anfang
731 732
  label_statistics: Statistiken
config/locales/en.yml (working copy)
732 732
  label_changes_details: Details of all changes
733 733
  label_issue_tracking: Issue tracking
734 734
  label_spent_time: Spent time
735
  label_total_spent_time: Cumulated spent time (with subissues)
735 736
  label_overall_spent_time: Overall spent time
736 737
  label_f_hour: "%{value} hour"
737 738
  label_f_hour_plural: "%{value} hours"
    (1-1/1)