Defect #27153 » calendars_order_error_500_cleanup.diff
| app/models/issue_query.rb (Arbeitskopie) | ||
|---|---|---|
| 272 | 272 |
# Returns the issues |
| 273 | 273 |
# Valid options are :order, :offset, :limit, :include, :conditions |
| 274 | 274 |
def issues(options={})
|
| 275 |
order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?)
|
|
| 275 |
order_option = ([options[:order]] || [group_by_sort_order, sort_clause]).flatten.reject(&:blank?)
|
|
| 276 | 276 | |
| 277 | 277 |
scope = Issue.visible. |
| 278 | 278 |
joins(:status, :project). |
| app/controllers/calendars_controller.rb (Arbeitskopie) | ||
|---|---|---|
| 38 | 38 | |
| 39 | 39 |
@calendar = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :month) |
| 40 | 40 |
retrieve_query |
| 41 |
@query.group_by = nil |
|
| 42 | 41 |
if @query.valid? |
| 43 | 42 |
events = [] |
| 44 | 43 |
events += @query.issues(:include => [:tracker, :assigned_to, :priority], |
| 45 |
:conditions => ["((start_date BETWEEN ? AND ?) OR (due_date BETWEEN ? AND ?))", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt] |
|
| 44 |
:conditions => ["((start_date BETWEEN ? AND ?) OR (due_date BETWEEN ? AND ?))", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt], |
|
| 45 |
:order => [] |
|
| 46 | 46 |
) |
| 47 | 47 |
events += @query.versions(:conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt]) |
| 48 | 48 | |
| app/controllers/gantts_controller.rb (Arbeitskopie) | ||
|---|---|---|
| 32 | 32 |
@gantt = Redmine::Helpers::Gantt.new(params) |
| 33 | 33 |
@gantt.project = @project |
| 34 | 34 |
retrieve_query |
| 35 |
@query.group_by = nil |
|
| 36 | 35 |
@gantt.query = @query if @query.valid? |
| 37 | 36 | |
| 38 | 37 |
basename = (@project ? "#{@project.identifier}-" : '') + 'gantt'
|