Patch #43619 ยป merge-two-date-queries.patch
| app/models/issue.rb | ||
|---|---|---|
| 1870 | 1870 | |
| 1871 | 1871 |
if p.dates_derived? |
| 1872 | 1872 |
# start/due dates = lowest/highest dates of children |
| 1873 |
p.start_date = p.children.minimum(:start_date) |
|
| 1874 |
p.due_date = p.children.maximum(:due_date) |
|
| 1873 |
p.start_date, p.due_date = p.children.pick('MIN(start_date)', 'MAX(due_date)')
|
|
| 1875 | 1874 |
if p.start_date && p.due_date && p.due_date < p.start_date |
| 1876 | 1875 |
p.start_date, p.due_date = p.due_date, p.start_date |
| 1877 | 1876 |
end |