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

Set consistent order in state initialization

Aaron Contrerasff8a5f8a26a5
diff --git a/app/components/shares/share_dialog_component.rb b/app/components/shares/share_dialog_component.rb
index e9e56d6cc76..702f5adc556 100644
--- a/app/components/shares/share_dialog_component.rb
+++ b/app/components/shares/share_dialog_component.rb
@@ -37,8 +37,8 @@ module Shares
def initialize(shares:, strategy:, errors:)
super
- @strategy = strategy
@shares = shares
+ @strategy = strategy
@errors = errors
end
diff --git a/app/components/shares/share_row_component.rb b/app/components/shares/share_row_component.rb
index b047f143529..1a4376af63d 100644
--- a/app/components/shares/share_row_component.rb
+++ b/app/components/shares/share_row_component.rb
@@ -37,8 +37,8 @@ module Shares
def initialize(share:, strategy:, container: nil)
super
- @strategy = strategy
@share = share
+ @strategy = strategy
@entity = strategy.entity
@principal = share.principal
@available_roles = strategy.available_roles