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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
mark TODOs in project model
ulfertsf5168bed61ef
diff --git a/app/models/project.rb b/app/models/project.rbindex 939524f0de4..322de9a2a1c 100644--- a/app/models/project.rb+++ b/app/models/project.rb@@ -198,7 +198,7 @@ class Project < ActiveRecord::Basevisible.like(query)end- # end timelines+ # TODO: move into SetAttributesServicedef initialize(attributes = nil)super@@ -312,6 +312,7 @@ class Project < ActiveRecord::Basecondend+ # TODO: Move into ArchiveService# Archives the project and its descendantsdef archive# Check that there is no issue of a non descendant project that is assigned@@ -332,6 +333,7 @@ class Project < ActiveRecord::Basetrueend+ # TODO: Move into UnarchiveService# Unarchives the project# All its ancestors must be activedef unarchive@@ -340,6 +342,7 @@ class Project < ActiveRecord::Baseupdate_attribute :status, STATUS_ACTIVEend+ # TODO: Move into contract# Returns an array of projects the project can be moved to# by the current userdef allowed_parents@@ -356,6 +359,7 @@ class Project < ActiveRecord::Base@allowed_parentsend+ # TODO: Move into contractdef allowed_parent?(p)p = guarantee_project_or_nil_or_false(p)return false if p == false # have to explicitly check for false@@ -478,6 +482,7 @@ class Project < ActiveRecord::Baseendend+ # TODO: Move into DeleteService# Deletes all project's membersdef delete_all_membersme = Member.table_name@@ -543,6 +548,7 @@ class Project < ActiveRecord::Basenameend+ # TODO: Move into helper# Returns a short description of the projects (first lines)def short_description(length = 255)unless description.present?@@ -574,6 +580,7 @@ class Project < ActiveRecord::Baseactive? && !due_date.nil? && (due_date < Date.today)end+ # TODO: Can be deleted?# Returns the percent completed for this project, based on the# progress on it's versions.def completed_percent(options = { include_subprojects: false })@@ -698,7 +705,7 @@ class Project < ActiveRecord::Baseproject_tree(projects) do |project, level|element = {project: project,- level: level+ level: level}element.merge!(yield(project)) if block_given?