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

register adding project_life_cycle_steps_changes

Ivan Kuchin53ae934d6792
diff --git a/lib_static/plugins/acts_as_journalized/lib/journal_changes.rb b/lib_static/plugins/acts_as_journalized/lib/journal_changes.rb
index 6edd4d69078..8e638521bbb 100644
--- a/lib_static/plugins/acts_as_journalized/lib/journal_changes.rb
+++ b/lib_static/plugins/acts_as_journalized/lib/journal_changes.rb
@@ -36,6 +36,7 @@ module JournalChanges
get_data_changes,
get_attachments_changes,
get_custom_fields_changes,
+ get_project_life_cycle_steps_changes,
get_file_links_changes,
get_agenda_items_changes
].compact
@@ -87,6 +88,21 @@ module JournalChanges
customizable_changes
end
+ def get_project_life_cycle_steps_changes
+ return unless journable.respond_to?(:life_cycle_steps)
+
+ ::Acts::Journalized::Differ::Association.new(
+ predecessor,
+ self,
+ association: :project_life_cycle_step_journals,
+ id_attribute: :life_cycle_step_id
+ ).attributes_changes(
+ %i[start_date end_date active],
+ key_prefix: "project_life_cycle_step",
+ grouped: true
+ )
+ end
+
def get_file_links_changes
return unless has_file_links?