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
filled some ToDos
Christophe Bliard5253d6db417c
diff --git a/modules/storages/app/services/storages/file_links/delete_service.rb b/modules/storages/app/services/storages/file_links/delete_service.rbindex 3973f44cdca..0eeef43a65b 100644--- a/modules/storages/app/services/storages/file_links/delete_service.rb+++ b/modules/storages/app/services/storages/file_links/delete_service.rb@@ -27,7 +27,6 @@#++# See also: ../storages/create_service.rb for comments-# ToDo: There are two module statements here instead of one in storages/create_service.rbmodule Storagesmodule FileLinksclass DeleteService < ::BaseServices::Deletediff --git a/modules/storages/app/services/storages/storages/create_service.rb b/modules/storages/app/services/storages/storages/create_service.rbindex cece362161c..54c36065314 100644--- a/modules/storages/app/services/storages/storages/create_service.rb+++ b/modules/storages/app/services/storages/storages/create_service.rb@@ -26,13 +26,13 @@# See COPYRIGHT and LICENSE files for more details.#++-# The comments here are also referenced from the other *_service.rb files in the module-# ToDo: add purpose-# ToDo: Where is the model called? I believe this one isn't called at all, right?-# ToDo: Why Storages::Storage_s_ module?-# File Links uses two modules lines in:-# modules/storages/app/services/storages/file_links/delete_service.rb-# Reference: ToDo: Link to documentation on services+# The comments here are also valid for the other *_service.rb files+# The logic for creating storage was extracted from the controller and put into+# a service: https://dev.to/joker666/ruby-on-rails-pattern-service-objects-b19+# Purpose: create and persist a Storages::Storage record+# Used by: Storages::Admin::StoragesController#create, could also be used by the+# API in the future+# Reference: https://www.openproject.org/docs/development/concepts/contracted-services/module Storages::Storagesclass CreateService < ::BaseServices::Createenddiff --git a/modules/storages/lib/api/v3/storages/storage_representer.rb b/modules/storages/lib/api/v3/storages/storage_representer.rbindex 8535c488fca..1eb20587721 100644--- a/modules/storages/lib/api/v3/storages/storage_representer.rb+++ b/modules/storages/lib/api/v3/storages/storage_representer.rb@@ -26,22 +26,18 @@# See COPYRIGHT and LICENSE files for more details.#++-# I understand this is a Roar "representer":-# Also see: For Roar documentation https://github.com/trailblazer/roar-# and the Roar-Rails integration: https://github.com/apotonick/roar-rails-# Roar is a "thin layer on top of": https://github.com/trailblazer/representable-# "Representable maps Ruby objects to documents and back"-# ToDo: What exactly is a representer? I understand it's atrributes plus-# a number of links? These are the ones defined below?+# Reference: Representable https://trailblazer.to/2.1/docs/representable.html+# "Representable maps Ruby objects to documents and back"+# Reference: Roar is a thin layer on top of Representable https://github.com/trailblazer/roar+# Reference: Roar-Rails integration: https://github.com/apotonick/roar-railsmodule APImodule V3module Storagesclass StorageRepresenter < ::API::Decorators::Single- # ToDo: LinkedResource is about linking to other objects related to Storages?+ # LinkedResource module defines helper methods to describe attributesinclude API::Decorators::LinkedResourceinclude API::Decorators::DateProperty- # ToDo: repeating again the attributes of a Storage?property :idproperty :name@@ -50,8 +46,7 @@ module APIdate_time_property :updated_at- # A link back to the specific object ("represented"):- # ToDo: what is "storage(...)" here?+ # A link back to the specific object ("represented")link :self do{href: api_v3_paths.storage(represented.id),@@ -59,8 +54,6 @@ module API}end- # There is apparently just a single type supported at the moment...- # ToDo: So this URL is fake?link :type do{href: "#{::API::V3::URN_PREFIX}storages:nextcloud",diff --git a/modules/storages/lib/open_project/storages/engine.rb b/modules/storages/lib/open_project/storages/engine.rbindex 1c438c5193c..b64b274f0ac 100644--- a/modules/storages/lib/open_project/storages/engine.rb+++ b/modules/storages/lib/open_project/storages/engine.rb@@ -27,16 +27,14 @@#++# See also: Getting started with Engines: https://guides.rubyonrails.org/engines.html-# ToDo: What is the name convention for where to store the engine.rb file? Why is-# there an open_project in the path?+# This file got generated by the open_project:plugin generator+# Todo: Which is the part of the system that automatically loads the engines?module OpenProject::Storagesclass Engine < ::Rails::Engine- # ToDo: Where is this used/referenced?+ # Todo: where is it used and why is it needed? (we could use the default value)engine_name :openproject_storages- # ToDo: I understand these are OP specific helpers, but which ones are used?- # The next line "register" is defined here as well as "add_api_path" etc.- # ToDo: But why is this included and not referenced?+ # please see comments inside ActsAsOpEngine classinclude OpenProject::Plugins::ActsAsOpEngine# For documentation see the definition of register in "ActsAsOpEngine"@@ -47,8 +45,9 @@ module OpenProject::Storagesbundled: true,settings: {},name: 'OpenProject Storages' do- # ToDo: Redmine plugin API?+ # Defines permission constraints used in the module (controller, etc.)# Apparently only defined the name, dependencies and global(?) permissions?+ # Permissions documentation: https://www.openproject.org/docs/development/concepts/permissions/#definition-of-permissionsproject_module :storages, dependencies: :work_package_tracking dopermission :view_file_links,{},