1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

shorten long line of Query#relative_date_clause

git-svn-id: http://svn.redmine.org/redmine/trunk@20607 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2020-12-10 13:33:44 +00:00
parent 163fda086f
commit c840cefb76

View File

@ -1553,7 +1553,10 @@ class Query < ActiveRecord::Base
# Returns a SQL clause for a date or datetime field using relative dates.
def relative_date_clause(table, field, days_from, days_to, is_custom_filter)
date_clause(table, field, (days_from ? User.current.today + days_from : nil), (days_to ? User.current.today + days_to : nil), is_custom_filter)
date_clause(
table, field, (days_from ? User.current.today + days_from : nil),
(days_to ? User.current.today + days_to : nil), is_custom_filter
)
end
# Returns a Date or Time from the given filter value