:default_order => 'desc',
:caption => :label_spent_time
)
+ @available_columns.insert index+1, QueryColumn.new(:total_spent_hours,
+ :sortable => "COALESCE((SELECT SUM(hours) FROM #{TimeEntry.table_name} JOIN #{Issue.table_name} subtasks ON subtasks.id = #{TimeEntry.table_name}.issue_id" +
+ " WHERE subtasks.root_id = #{Issue.table_name}.root_id AND subtasks.lft >= #{Issue.table_name}.lft AND subtasks.rgt <= #{Issue.table_name}.rgt), 0)",
+ :default_order => 'desc',
+ :caption => :label_total_spent_time
+ )
end
if User.current.allowed_to?(:set_issues_private, nil, :global => true) ||
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: الوقت الذي تم انفاقه كاملا
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Cəmi sərf olunan vaxt
description_date_from: Въведете начална дата
description_date_to: Въведете крайна дата
text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
+ label_total_spent_time: Общо употребено време
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: "Temps total invertit"
label_member_management_all_roles: Všechny role
label_member_management_selected_roles_only: Pouze tyto role
label_password_required: Pro pokračování potvrďte vaše heslo
+ label_total_spent_time: Celkem strávený čas
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overordnet forbrug af tid
label_member_management: Member management
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
+ label_total_spent_time: Aufgewendete Zeit aller Projekte anzeigen
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_changes_details: Details of all changes
label_issue_tracking: Issue tracking
label_spent_time: Spent time
+ label_total_spent_time: Total spent time
label_overall_spent_time: Overall spent time
label_f_hour: "%{value} hour"
label_f_hour_plural: "%{value} hours"
label_member_management_all_roles: Todos los roles
label_member_management_selected_roles_only: Sólo estos roles
label_password_required: Confirme su contraseña para continuar
+ label_total_spent_time: Tiempo total dedicado
label_member_management_all_roles: Todos los roles
label_member_management_selected_roles_only: Sólo estos roles
label_password_required: Confirme su contraseña para continuar
+ label_total_spent_time: Tiempo total dedicado
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: "Kokku kulutatud aeg"
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Igarotako denbora guztira
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: زمان صرف شده روی هم
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_changes_details: Détails de tous les changements
label_issue_tracking: Suivi des demandes
label_spent_time: Temps passé
+ label_total_spent_time: Temps passé total
label_overall_spent_time: Temps passé global
label_f_hour: "%{value} heure"
label_f_hour_plural: "%{value} heures"
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: "Tempo total empregado"
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: זמן שהושקע סה"כ
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Összes ráfordított idő
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: Tutti i ruoli
label_member_management_selected_roles_only: Solo questi ruoli
label_password_required: Confirm your password to continue
+ label_total_spent_time: Totale tempo impiegato
label_member_management_all_roles: すべてのロール
label_member_management_selected_roles_only: 次のロールのみ
label_password_required: この操作を続行するにはパスワードを入力してください
+ label_total_spent_time: すべての作業時間の記録
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: 총 소요시간
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Visas dirbtas laikas
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Вкупно потрошено време
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Totaal bestede tijd
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: All tidsbruk
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Przepracowany czas
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Tempo gasto geral
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Total de tempo registado
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: Все роли
label_member_management_selected_roles_only: Только эти роли
label_password_required: Для продолжения введите свой пароль
+ label_total_spent_time: Всего затрачено времени
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Celkový strávený čas
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Skupni porabljeni čas
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Celokupno utrošeno vreme
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Целокупно утрошено време
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Total tid spenderad
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: Tüm roller
label_member_management_selected_roles_only: Sadece bu roller
label_password_required: Devam etmek için şifrenizi doğrulayın
+ label_total_spent_time: Toplam harcanan zaman
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Overall spent time
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: Tổng thời gian sử dụng
description_date_from: 輸入起始日期
description_date_to: 輸入結束日期
text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
+ label_total_spent_time: 整體耗用工時
label_member_management_all_roles: All roles
label_member_management_selected_roles_only: Only these roles
label_password_required: Confirm your password to continue
+ label_total_spent_time: 总体耗时
hours = assigns(:issues).collect(&:spent_hours)
assert_equal hours.sort.reverse, hours
end
+
+ def test_index_sort_by_total_spent_hours
+ get :index, :sort => 'total_spent_hours:desc'
+ assert_response :success
+ hours = assigns(:issues).collect(&:total_spent_hours)
+ assert_equal hours.sort.reverse, hours
+ end
def test_index_sort_by_user_custom_field
cf = IssueCustomField.create!(:name => 'User', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'user')
assert_select 'table.issues tr#issue-3 td.spent_hours', :text => '1.00'
end
+ def test_index_with_total_spent_hours_column
+ get :index, :set_filter => 1, :c => %w(subject total_spent_hours)
+ assert_select 'table.issues tr#issue-3 td.total_spent_hours', :text => '1.00'
+ end
+
def test_index_should_not_show_spent_hours_column_without_permission
Role.anonymous.remove_permission! :view_time_entries
get :index, :set_filter => 1, :c => %w(subject spent_hours)