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
chore[#48620] rename attribute options to `key`, `value`
Kabiru Mwenja44c2c0096078
diff --git a/app/components/attribute_groups/attribute_key_value_component.html.erb b/app/components/attribute_groups/attribute_key_value_component.html.erbindex 7bf9bd3c504..a0d3e690993 100644--- a/app/components/attribute_groups/attribute_key_value_component.html.erb+++ b/app/components/attribute_groups/attribute_key_value_component.html.erb@@ -1,6 +1,6 @@-<div class="attributes-key-value--key"><%= attribute_key %></div>+<div class="attributes-key-value--key"><%= key %></div><div class="attributes-key-value--value-container"><div class="attributes-key-value--value -text">- <span><%= attribute_value %></span>+ <span><%= value %></span></div></div>diff --git a/app/components/attribute_groups/attribute_key_value_component.rb b/app/components/attribute_groups/attribute_key_value_component.rbindex 6d141df77b7..095812077ff 100644--- a/app/components/attribute_groups/attribute_key_value_component.rb+++ b/app/components/attribute_groups/attribute_key_value_component.rb@@ -30,7 +30,7 @@module AttributeGroupsclass AttributeKeyValueComponent < ::RailsComponent- options :attribute_key, :attribute_value+ options :key, :valuedef initialize(attribute_key:, attribute_value:, **options)super(attribute_key:, attribute_value:, **options)diff --git a/spec/components/attribute_groups/attribute_group_component_spec.rb b/spec/components/attribute_groups/attribute_group_component_spec.rbindex 672aafb789b..82740b2439d 100644--- a/spec/components/attribute_groups/attribute_group_component_spec.rb+++ b/spec/components/attribute_groups/attribute_group_component_spec.rb@@ -36,8 +36,8 @@ RSpec.describe AttributeGroups::AttributeGroupComponent, type: :component docomponent.with_group_header(title: "A Title")component.with_attributes_key_value(- [{ attribute_key: "Attribute Key 1", attribute_value: "Attribute Value 1" },- { attribute_key: "Attribute Key 2", attribute_value: "Attribute Value 2" }]+ [{ key: "Attribute Key 1", value: "Attribute Value 1" },+ { key: "Attribute Key 2", value: "Attribute Value 2" }])endenddiff --git a/spec/components/attribute_groups/attribute_key_value_component_spec.rb b/spec/components/attribute_groups/attribute_key_value_component_spec.rbindex 60eea991429..fc72510a72c 100644--- a/spec/components/attribute_groups/attribute_key_value_component_spec.rb+++ b/spec/components/attribute_groups/attribute_key_value_component_spec.rb@@ -32,7 +32,7 @@ require "rails_helper"RSpec.describe AttributeGroups::AttributeKeyValueComponent, type: :component dosubject(:component_render) do- render_inline(described_class.new(attribute_key: 'Attribute Key', attribute_value: 'Attribute Value'))+ render_inline(described_class.new(key: 'Attribute Key', value: 'Attribute Value'))endbefore { component_render }