diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-08-07 12:35:32 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-08-07 12:35:32 +0000 |
commit | b3deca7a2606a6b2cef464ed08417be4ffb0cb6b (patch) | |
tree | 58cb99a58196581520303a57e9f2024553649eae /app/models/concerns | |
parent | 411070c3afa621a0bdc741617c1d17f54205b81a (diff) | |
parent | 6dc7490789237a84b66baaaf4c6deea5ec3bf2de (diff) | |
download | gitlab-ce-b3deca7a2606a6b2cef464ed08417be4ffb0cb6b.tar.gz |
Merge branch 'group-todos' into 'master'
Group todos
See merge request gitlab-org/gitlab-ce!20675
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/issuable.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index b93c1145f82..7a459078151 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -243,6 +243,12 @@ module Issuable opened? end + def overdue? + return false unless respond_to?(:due_date) + + due_date.try(:past?) || false + end + def user_notes_count if notes.loaded? # Use the in-memory association to select and count to avoid hitting the db |