Merge branch 'master' into feature_save_queries

pull/6827/head
jwollert 14 years ago
commit aa8bcd64af
  1. 0
      README
  2. 0
      README.rdoc
  3. 0
      app/controllers/cost_reports_controller.rb
  4. 0
      app/helpers/reporting_helper.rb
  5. 0
      app/models/cost_query.rb
  6. 0
      app/models/cost_query/chainable.rb
  7. 7
      app/models/cost_query/custom_field_mixin.rb
  8. 0
      app/models/cost_query/filter.rb
  9. 0
      app/models/cost_query/filter/activity_id.rb
  10. 0
      app/models/cost_query/filter/assigned_to_id.rb
  11. 0
      app/models/cost_query/filter/author_id.rb
  12. 0
      app/models/cost_query/filter/base.rb
  13. 0
      app/models/cost_query/filter/category_id.rb
  14. 0
      app/models/cost_query/filter/cost_object_id.rb
  15. 0
      app/models/cost_query/filter/cost_type_id.rb
  16. 0
      app/models/cost_query/filter/created_on.rb
  17. 0
      app/models/cost_query/filter/custom_field.rb
  18. 0
      app/models/cost_query/filter/due_date.rb
  19. 0
      app/models/cost_query/filter/fixed_version_id.rb
  20. 0
      app/models/cost_query/filter/issue_id.rb
  21. 0
      app/models/cost_query/filter/no_filter.rb
  22. 0
      app/models/cost_query/filter/overridden_costs.rb
  23. 0
      app/models/cost_query/filter/permission_filter.rb
  24. 0
      app/models/cost_query/filter/priority_id.rb
  25. 0
      app/models/cost_query/filter/project_id.rb
  26. 0
      app/models/cost_query/filter/spent_on.rb
  27. 0
      app/models/cost_query/filter/start_date.rb
  28. 0
      app/models/cost_query/filter/status_id.rb
  29. 0
      app/models/cost_query/filter/subject.rb
  30. 0
      app/models/cost_query/filter/tmonth.rb
  31. 0
      app/models/cost_query/filter/tracker_id.rb
  32. 0
      app/models/cost_query/filter/tweek.rb
  33. 0
      app/models/cost_query/filter/tyear.rb
  34. 0
      app/models/cost_query/filter/updated_on.rb
  35. 0
      app/models/cost_query/filter/user_id.rb
  36. 0
      app/models/cost_query/group_by.rb
  37. 0
      app/models/cost_query/group_by/activity_id.rb
  38. 0
      app/models/cost_query/group_by/assigned_to_id.rb
  39. 0
      app/models/cost_query/group_by/author_id.rb
  40. 0
      app/models/cost_query/group_by/base.rb
  41. 0
      app/models/cost_query/group_by/category_id.rb
  42. 0
      app/models/cost_query/group_by/cost_object_id.rb
  43. 0
      app/models/cost_query/group_by/cost_type_id.rb
  44. 0
      app/models/cost_query/group_by/custom_field.rb
  45. 0
      app/models/cost_query/group_by/fixed_version_id.rb
  46. 0
      app/models/cost_query/group_by/issue_id.rb
  47. 0
      app/models/cost_query/group_by/priority_id.rb
  48. 0
      app/models/cost_query/group_by/project_id.rb
  49. 0
      app/models/cost_query/group_by/ruby_aggregation.rb
  50. 0
      app/models/cost_query/group_by/singleton_value.rb
  51. 0
      app/models/cost_query/group_by/spent_on.rb
  52. 0
      app/models/cost_query/group_by/sql_aggregation.rb
  53. 0
      app/models/cost_query/group_by/status_id.rb
  54. 0
      app/models/cost_query/group_by/tmonth.rb
  55. 0
      app/models/cost_query/group_by/tracker_id.rb
  56. 0
      app/models/cost_query/group_by/tweek.rb
  57. 0
      app/models/cost_query/group_by/tyear.rb
  58. 0
      app/models/cost_query/group_by/user_id.rb
  59. 0
      app/models/cost_query/group_by/week.rb
  60. 0
      app/models/cost_query/inherited_attribute.rb
  61. 0
      app/models/cost_query/operator.rb
  62. 9
      app/models/cost_query/query_utils.rb
  63. 0
      app/models/cost_query/result.rb
  64. 0
      app/models/cost_query/sql_statement.rb
  65. 0
      app/models/cost_query/table.rb
  66. 0
      app/models/cost_query/transformer.rb
  67. 0
      app/models/cost_query/validation.rb
  68. 0
      app/models/cost_query/validation/dates.rb
  69. 0
      app/models/cost_query/validation/integers.rb
  70. 0
      app/models/cost_query/validation/sql.rb
  71. 0
      app/models/cost_query/walker.rb
  72. 0
      app/models/entry.rb
  73. 0
      app/views/cost_reports/_cost_entry_table.rhtml
  74. 0
      app/views/cost_reports/_cost_report_table.rhtml
  75. 0
      app/views/cost_reports/_filters.rhtml
  76. 0
      app/views/cost_reports/_group_by.rhtml
  77. 0
      app/views/cost_reports/_restore_query.rhtml
  78. 0
      app/views/cost_reports/_simple_cost_report_table.rhtml
  79. 0
      app/views/cost_reports/_sortable_init.rhtml
  80. 0
      app/views/cost_reports/available_values.rhtml
  81. 0
      app/views/cost_reports/filters/_activate_filter.rhtml
  82. 0
      app/views/cost_reports/filters/_available_value.rhtml
  83. 0
      app/views/cost_reports/filters/_date.rhtml
  84. 0
      app/views/cost_reports/filters/_heavy_values.rhtml
  85. 0
      app/views/cost_reports/filters/_multi_values.rhtml
  86. 0
      app/views/cost_reports/filters/_operators.rhtml
  87. 0
      app/views/cost_reports/filters/_remove_filter.rhtml
  88. 0
      app/views/cost_reports/filters/_text.rhtml
  89. 0
      app/views/cost_reports/filters/_text_box.rhtml
  90. 0
      app/views/cost_reports/index.rhtml
  91. 0
      app/views/hooks/_view_projects_show_sidebar_bottom_hook.rhtml
  92. 0
      assets/images/arrow_B_down.gif
  93. 0
      assets/images/arrow_B_left.gif
  94. 0
      assets/images/arrow_B_right.gif
  95. 0
      assets/images/arrow_B_up.gif
  96. 0
      assets/images/arrow_D_down.gif
  97. 0
      assets/images/arrow_D_left.gif
  98. 0
      assets/images/arrow_D_right.gif
  99. 0
      assets/images/arrow_D_up.gif
  100. 0
      assets/images/button_hover.png
  101. Some files were not shown because too many files have changed in this diff Show More

@ -5,9 +5,10 @@ module CostQuery::CustomFieldMixin
SQL_TYPES = { SQL_TYPES = {
'string' => mysql? ? 'char' : 'varchar', 'string' => mysql? ? 'char' : 'varchar',
'list' => mysql? ? 'char' : 'varchar', 'list' => mysql? ? 'char' : 'varchar',
'text' => 'text', 'date' => 'date', 'text' => mysql? ? 'char' : 'text',
'int' => 'decimal(60,3)', 'float' => 'decimal(60,3)', 'bool' => mysql? ? 'unsigned' : 'boolean',
'bool' => 'boolean' } 'date' => 'date',
'int' => 'decimal(60,3)', 'float' => 'decimal(60,3)' }
def self.extended(base) def self.extended(base)
base.inherited_attribute :factory base.inherited_attribute :factory

@ -127,14 +127,13 @@ module CostQuery::QueryUtils
def iso_year_week(field, default_table = nil) def iso_year_week(field, default_table = nil)
field = field_name_for(field, default_table) field = field_name_for(field, default_table)
"-- code specific for #{adapter_name}\n\t" << \ "-- code specific for #{adapter_name}\n\t" << \
case adapter_name if mysql?
when :mysql
"yearweek(#{field}, 1)" "yearweek(#{field}, 1)"
when :postgresql elsif postgresql?
"(EXTRACT(isoyear from #{field})*100 + \n\t\t" \ "(EXTRACT(isoyear from #{field})*100 + \n\t\t" \
"EXTRACT(week from #{field} - \n\t\t" \ "EXTRACT(week from #{field} - \n\t\t" \
"(EXTRACT(dow FROM #{field})::int+6)%7))" "(EXTRACT(dow FROM #{field})::int+6)%7))"
when :sqlite elsif sqlite?
# enjoy # enjoy
<<-EOS <<-EOS
case case
@ -197,7 +196,7 @@ module CostQuery::QueryUtils
end end
def mysql? def mysql?
adapter_name == :mysql [:mysql, :mysql2].include? adapter_name.to_s.downcase.to_sym
end end
def sqlite? def sqlite?

Before

Width:  |  Height:  |  Size: 51 B

After

Width:  |  Height:  |  Size: 51 B

Before

Width:  |  Height:  |  Size: 50 B

After

Width:  |  Height:  |  Size: 50 B

Before

Width:  |  Height:  |  Size: 51 B

After

Width:  |  Height:  |  Size: 51 B

Before

Width:  |  Height:  |  Size: 49 B

After

Width:  |  Height:  |  Size: 49 B

Before

Width:  |  Height:  |  Size: 51 B

After

Width:  |  Height:  |  Size: 51 B

Before

Width:  |  Height:  |  Size: 53 B

After

Width:  |  Height:  |  Size: 53 B

Before

Width:  |  Height:  |  Size: 53 B

After

Width:  |  Height:  |  Size: 53 B

Before

Width:  |  Height:  |  Size: 52 B

After

Width:  |  Height:  |  Size: 52 B

Before

Width:  |  Height:  |  Size: 937 B

After

Width:  |  Height:  |  Size: 937 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save