Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Update days_left to use expires_at

Mir Bhatia0b15d19f4fac
diff --git a/app/models/enterprise_token.rb b/app/models/enterprise_token.rb
index ee76c654a9d..c7b6af9c801 100644
--- a/app/models/enterprise_token.rb
+++ b/app/models/enterprise_token.rb
@@ -223,7 +223,7 @@ class EnterpriseToken < ApplicationRecord
end
def days_left
- valid_until.present? ? (valid_until.to_date - Time.zone.today).to_i : nil
+ (expires_at.to_date - Time.zone.today).to_i
end
private