:conditions=>["(((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?) or (start_date<? and due_date>?)) and start_date is not null and due_date is not null)",@gantt.date_from,@gantt.date_to,@gantt.date_from,@gantt.date_to,@gantt.date_from,@gantt.date_to]
)
# Issues that don't have a due date but that are assigned to a version with a date
:conditions=>["(((start_date>=? and start_date<=?) or (effective_date>=? and effective_date<=?) or (start_date<? and effective_date>?)) and start_date is not null and due_date is null and effective_date is not null)",@gantt.date_from,@gantt.date_to,@gantt.date_from,@gantt.date_to,@gantt.date_from,@gantt.date_to]
)
# Versions
events+=@query.versions(:conditions=>["effective_date BETWEEN ? AND ?",@gantt.date_from,@gantt.date_to])