diff --git a/app/models/card/entropy.rb b/app/models/card/entropy.rb index b0eded7a3..511832513 100644 --- a/app/models/card/entropy.rb +++ b/app/models/card/entropy.rb @@ -26,11 +26,19 @@ module Card::Entropy end def subject_to_entropy? - doing? || (auto_closing? && considering?) + auto_reconsidering? || auto_closing? + end + + def auto_reconsidering? + doing? && last_active_at + end + + def auto_closing? + considering? && collection.auto_closing? && last_active_at end def auto_close_at - last_active_at + auto_close_period if auto_closing? && last_active_at + last_active_at + auto_close_period if auto_closing? end def days_until_close @@ -38,10 +46,14 @@ module Card::Entropy end def auto_reconsider_at - last_active_at + AUTO_RECONSIDER_PERIOD if last_active_at + last_active_at + AUTO_RECONSIDER_PERIOD if auto_reconsidering? end def days_until_reconsider (auto_reconsider_at.to_date - Date.current).to_i if auto_reconsider_at end + + def entropy_cleaned_at + auto_close_at || auto_reconsider_at + end end diff --git a/app/views/cards/display/preview/_bubble.html.erb b/app/views/cards/display/preview/_bubble.html.erb index c05989755..f0e3df352 100644 --- a/app/views/cards/display/preview/_bubble.html.erb +++ b/app/views/cards/display/preview/_bubble.html.erb @@ -1,7 +1,7 @@