summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/issue_query.rb6
-rw-r--r--config/locales/ar.yml1
-rw-r--r--config/locales/az.yml1
-rw-r--r--config/locales/bg.yml1
-rw-r--r--config/locales/bs.yml1
-rw-r--r--config/locales/ca.yml1
-rw-r--r--config/locales/cs.yml1
-rw-r--r--config/locales/da.yml1
-rw-r--r--config/locales/de.yml1
-rw-r--r--config/locales/el.yml1
-rw-r--r--config/locales/en-GB.yml1
-rw-r--r--config/locales/en.yml1
-rw-r--r--config/locales/es-PA.yml1
-rw-r--r--config/locales/es.yml1
-rw-r--r--config/locales/et.yml1
-rw-r--r--config/locales/eu.yml1
-rw-r--r--config/locales/fa.yml1
-rw-r--r--config/locales/fi.yml1
-rw-r--r--config/locales/fr.yml1
-rw-r--r--config/locales/gl.yml1
-rw-r--r--config/locales/he.yml1
-rw-r--r--config/locales/hr.yml1
-rw-r--r--config/locales/hu.yml1
-rw-r--r--config/locales/id.yml1
-rw-r--r--config/locales/it.yml1
-rw-r--r--config/locales/ja.yml1
-rw-r--r--config/locales/ko.yml1
-rw-r--r--config/locales/lt.yml1
-rw-r--r--config/locales/lv.yml1
-rw-r--r--config/locales/mk.yml1
-rw-r--r--config/locales/mn.yml1
-rw-r--r--config/locales/nl.yml1
-rw-r--r--config/locales/no.yml1
-rw-r--r--config/locales/pl.yml1
-rw-r--r--config/locales/pt-BR.yml1
-rw-r--r--config/locales/pt.yml1
-rw-r--r--config/locales/ro.yml1
-rw-r--r--config/locales/ru.yml1
-rw-r--r--config/locales/sk.yml1
-rw-r--r--config/locales/sl.yml1
-rw-r--r--config/locales/sq.yml1
-rw-r--r--config/locales/sr-YU.yml1
-rw-r--r--config/locales/sr.yml1
-rw-r--r--config/locales/sv.yml1
-rw-r--r--config/locales/th.yml1
-rw-r--r--config/locales/tr.yml1
-rw-r--r--config/locales/uk.yml1
-rw-r--r--config/locales/vi.yml1
-rw-r--r--config/locales/zh-TW.yml1
-rw-r--r--config/locales/zh.yml1
-rw-r--r--test/functional/issues_controller_test.rb12
51 files changed, 67 insertions, 0 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb
index 20ea59630..edc1290fe 100644
--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -267,6 +267,12 @@ class IssueQuery < Query
: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) ||
diff --git a/config/locales/ar.yml b/config/locales/ar.yml
index 22ed41b9e..c76149877 100644
--- a/config/locales/ar.yml
+++ b/config/locales/ar.yml
@@ -1154,3 +1154,4 @@ ar:
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: الوقت الذي تم انفاقه كاملا
diff --git a/config/locales/az.yml b/config/locales/az.yml
index a21724acb..de78f3890 100644
--- a/config/locales/az.yml
+++ b/config/locales/az.yml
@@ -1251,3 +1251,4 @@ az:
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
diff --git a/config/locales/bg.yml b/config/locales/bg.yml
index 425080142..2cd3d8ba2 100644
--- a/config/locales/bg.yml
+++ b/config/locales/bg.yml
@@ -1147,3 +1147,4 @@ bg:
description_date_to: Въведете крайна дата
text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.<br />Промяна след създаването му не е възможна.'
label_password_required: Confirm your password to continue
+ label_total_spent_time: Общо употребено време
diff --git a/config/locales/bs.yml b/config/locales/bs.yml
index d8b054d30..ee5fb1eb3 100644
--- a/config/locales/bs.yml
+++ b/config/locales/bs.yml
@@ -1167,3 +1167,4 @@ bs:
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
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
index 3b5843313..1c6d7facb 100644
--- a/config/locales/ca.yml
+++ b/config/locales/ca.yml
@@ -1156,3 +1156,4 @@ ca:
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"
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index 8541a5707..030e2be4c 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -1156,3 +1156,4 @@ cs:
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: Celkem strávený čas
diff --git a/config/locales/da.yml b/config/locales/da.yml
index b8cd988a0..19e54431e 100644
--- a/config/locales/da.yml
+++ b/config/locales/da.yml
@@ -1171,3 +1171,4 @@ da:
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
diff --git a/config/locales/de.yml b/config/locales/de.yml
index adba9648f..8a2bba7dd 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -1163,3 +1163,4 @@ de:
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
diff --git a/config/locales/el.yml b/config/locales/el.yml
index f97de710e..71d3f73bf 100644
--- a/config/locales/el.yml
+++ b/config/locales/el.yml
@@ -1154,3 +1154,4 @@ el:
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
diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml
index 4380361ec..2b618f80a 100644
--- a/config/locales/en-GB.yml
+++ b/config/locales/en-GB.yml
@@ -1156,3 +1156,4 @@ en-GB:
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
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 1341239f3..039df462f 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -748,6 +748,7 @@ en:
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"
diff --git a/config/locales/es-PA.yml b/config/locales/es-PA.yml
index ce70bda0a..ec0dba02b 100644
--- a/config/locales/es-PA.yml
+++ b/config/locales/es-PA.yml
@@ -1188,3 +1188,4 @@ es-PA:
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
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 7d34f4b26..4042eec9d 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -1186,3 +1186,4 @@ es:
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
diff --git a/config/locales/et.yml b/config/locales/et.yml
index 5e8bc6409..3f2514f16 100644
--- a/config/locales/et.yml
+++ b/config/locales/et.yml
@@ -1167,3 +1167,4 @@ et:
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"
diff --git a/config/locales/eu.yml b/config/locales/eu.yml
index 727b2f8ff..d7c6d9b14 100644
--- a/config/locales/eu.yml
+++ b/config/locales/eu.yml
@@ -1155,3 +1155,4 @@ eu:
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
diff --git a/config/locales/fa.yml b/config/locales/fa.yml
index 266486276..49d1710eb 100644
--- a/config/locales/fa.yml
+++ b/config/locales/fa.yml
@@ -1155,3 +1155,4 @@ fa:
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: زمان صرف شده روی هم
diff --git a/config/locales/fi.yml b/config/locales/fi.yml
index a4cd9707a..65893e0a7 100644
--- a/config/locales/fi.yml
+++ b/config/locales/fi.yml
@@ -1175,3 +1175,4 @@ fi:
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
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 0fa522b0f..3432514be 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -768,6 +768,7 @@ fr:
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"
diff --git a/config/locales/gl.yml b/config/locales/gl.yml
index 7ff2d4cd4..fdacf9833 100644
--- a/config/locales/gl.yml
+++ b/config/locales/gl.yml
@@ -1162,3 +1162,4 @@ gl:
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"
diff --git a/config/locales/he.yml b/config/locales/he.yml
index 991ea7788..6abee17a9 100644
--- a/config/locales/he.yml
+++ b/config/locales/he.yml
@@ -1159,3 +1159,4 @@ he:
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: זמן שהושקע סה"כ
diff --git a/config/locales/hr.yml b/config/locales/hr.yml
index 708a0548c..4cee66120 100644
--- a/config/locales/hr.yml
+++ b/config/locales/hr.yml
@@ -1155,3 +1155,4 @@ hr:
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
diff --git a/config/locales/hu.yml b/config/locales/hu.yml
index b594ad19a..6319ddf23 100644
--- a/config/locales/hu.yml
+++ b/config/locales/hu.yml
@@ -1173,3 +1173,4 @@
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ő
diff --git a/config/locales/id.yml b/config/locales/id.yml
index e1caf0e31..0839b09a0 100644
--- a/config/locales/id.yml
+++ b/config/locales/id.yml
@@ -1158,3 +1158,4 @@ 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
diff --git a/config/locales/it.yml b/config/locales/it.yml
index c29bf2700..709149438 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -1149,3 +1149,4 @@ it:
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
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 3e083fb39..5c1f4b6eb 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -1169,3 +1169,4 @@ ja:
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: すべての作業時間の記録
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
index 6e46c8158..258dc099a 100644
--- a/config/locales/ko.yml
+++ b/config/locales/ko.yml
@@ -1198,3 +1198,4 @@ ko:
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: 총 소요시간
diff --git a/config/locales/lt.yml b/config/locales/lt.yml
index 1a6e88425..652af5639 100644
--- a/config/locales/lt.yml
+++ b/config/locales/lt.yml
@@ -1213,3 +1213,4 @@ lt:
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
diff --git a/config/locales/lv.yml b/config/locales/lv.yml
index 2e568185d..dea9f8e13 100644
--- a/config/locales/lv.yml
+++ b/config/locales/lv.yml
@@ -1148,3 +1148,4 @@ lv:
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
diff --git a/config/locales/mk.yml b/config/locales/mk.yml
index f7c9b6b8d..b752cc5cb 100644
--- a/config/locales/mk.yml
+++ b/config/locales/mk.yml
@@ -1154,3 +1154,4 @@ mk:
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: Вкупно потрошено време
diff --git a/config/locales/mn.yml b/config/locales/mn.yml
index 17a63860c..e0bea04a4 100644
--- a/config/locales/mn.yml
+++ b/config/locales/mn.yml
@@ -1155,3 +1155,4 @@ mn:
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
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index 3d3c8ded0..96dfa9f7d 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -1133,3 +1133,4 @@ nl:
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
diff --git a/config/locales/no.yml b/config/locales/no.yml
index 1f97c6733..df905ce5a 100644
--- a/config/locales/no.yml
+++ b/config/locales/no.yml
@@ -1144,3 +1144,4 @@
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
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
index bc8f562ad..94c94b336 100644
--- a/config/locales/pl.yml
+++ b/config/locales/pl.yml
@@ -1174,3 +1174,4 @@ pl:
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
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index 02f3b1702..3806c670d 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -1173,3 +1173,4 @@ pt-BR:
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
diff --git a/config/locales/pt.yml b/config/locales/pt.yml
index 128fa2e34..ec1ed1d18 100644
--- a/config/locales/pt.yml
+++ b/config/locales/pt.yml
@@ -1159,3 +1159,4 @@ pt:
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
diff --git a/config/locales/ro.yml b/config/locales/ro.yml
index 5d1277c39..83a8c13b4 100644
--- a/config/locales/ro.yml
+++ b/config/locales/ro.yml
@@ -1149,3 +1149,4 @@ ro:
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
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index 3c43c5875..73b519fd3 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -1260,3 +1260,4 @@ ru:
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: Всего затрачено времени
diff --git a/config/locales/sk.yml b/config/locales/sk.yml
index 6a6a7b956..d16aeb5f2 100644
--- a/config/locales/sk.yml
+++ b/config/locales/sk.yml
@@ -1144,3 +1144,4 @@ sk:
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
diff --git a/config/locales/sl.yml b/config/locales/sl.yml
index a2bfcd932..7bea31d4b 100644
--- a/config/locales/sl.yml
+++ b/config/locales/sl.yml
@@ -1154,3 +1154,4 @@ sl:
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
diff --git a/config/locales/sq.yml b/config/locales/sq.yml
index a04a499f5..7fbdf65c0 100644
--- a/config/locales/sq.yml
+++ b/config/locales/sq.yml
@@ -1150,3 +1150,4 @@ sq:
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
diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml
index ea21928b3..62a65bbb4 100644
--- a/config/locales/sr-YU.yml
+++ b/config/locales/sr-YU.yml
@@ -1156,3 +1156,4 @@ sr-YU:
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
diff --git a/config/locales/sr.yml b/config/locales/sr.yml
index 28256fbd6..d0146bd9a 100644
--- a/config/locales/sr.yml
+++ b/config/locales/sr.yml
@@ -1155,3 +1155,4 @@ sr:
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: Целокупно утрошено време
diff --git a/config/locales/sv.yml b/config/locales/sv.yml
index dace2c47e..b55d2a2a0 100644
--- a/config/locales/sv.yml
+++ b/config/locales/sv.yml
@@ -1187,3 +1187,4 @@ sv:
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
diff --git a/config/locales/th.yml b/config/locales/th.yml
index 399eeb4af..1b1e6ec1a 100644
--- a/config/locales/th.yml
+++ b/config/locales/th.yml
@@ -1151,3 +1151,4 @@ th:
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
diff --git a/config/locales/tr.yml b/config/locales/tr.yml
index ae576d6e0..71d629ddb 100644
--- a/config/locales/tr.yml
+++ b/config/locales/tr.yml
@@ -1163,3 +1163,4 @@ tr:
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: Toplam harcanan zaman
diff --git a/config/locales/uk.yml b/config/locales/uk.yml
index a5eb003d0..c3714bed0 100644
--- a/config/locales/uk.yml
+++ b/config/locales/uk.yml
@@ -1149,3 +1149,4 @@ uk:
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
diff --git a/config/locales/vi.yml b/config/locales/vi.yml
index 0496cbcf2..dad4e0af8 100644
--- a/config/locales/vi.yml
+++ b/config/locales/vi.yml
@@ -1207,3 +1207,4 @@ vi:
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
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
index 2d38033dd..98dd0bc33 100644
--- a/config/locales/zh-TW.yml
+++ b/config/locales/zh-TW.yml
@@ -1230,3 +1230,4 @@
description_date_from: 輸入起始日期
description_date_to: 輸入結束日期
text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。<br />一旦儲存之後, 代碼便無法再次被更改。'
+ label_total_spent_time: 整體耗用工時
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index eafbe3ae6..592b97e8f 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1155,3 +1155,4 @@ zh:
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: 总体耗时
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 095860703..6d106e88b 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -714,6 +714,13 @@ class IssuesControllerTest < ActionController::TestCase
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')
@@ -848,6 +855,11 @@ class IssuesControllerTest < ActionController::TestCase
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)