Commit b2998c39 authored by Eric Davis's avatar Eric Davis

Merge pull request #132 from mbreit/feature/733-issue-due-today

[#733] Add Issue#due_today? and add due-today css class
parents 05092b27 ed0e92b1
......@@ -401,6 +401,11 @@ class Issue < ActiveRecord::Base
!due_date.nil? && (due_date < Date.today) && !status.is_closed?
end
# Returns true if the issue is due today and not closed
def due_today?
!due_date.nil? && (due_date == Date.today) && !status.is_closed?
end
# Is the amount of work done less than it should for the due date
def behind_schedule?
return false if start_date.nil? || due_date.nil?
......@@ -556,6 +561,7 @@ class Issue < ActiveRecord::Base
s = "issue status-#{status.position} priority-#{priority.position}"
s << ' closed' if closed?
s << ' overdue' if overdue?
s << ' due-today' if due_today?
s << ' child' if child?
s << ' parent' unless leaf?
s << ' created-by-me' if User.current.logged? && author_id == User.current.id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment