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

Fix labels

Oliver Güntherab6459068067
diff --git a/app/views/custom_actions/_form.html.erb b/app/views/custom_actions/_form.html.erb
index 2791dd2fdf5..a3e4dec9077 100644
--- a/app/views/custom_actions/_form.html.erb
+++ b/app/views/custom_actions/_form.html.erb
@@ -39,7 +39,7 @@
items: condition.allowed_values.map { |v| { id: v[:value], name: v[:label] } },
model: condition.value_objects.map { |v| { id: v[:value], name: v[:label] } },
inputName: input_name,
- inputId: "custom_action_conditions_#{condition.key}",
+ labelForId: "custom_action_conditions_#{condition.key}",
appendTo: "body",
}
%>
@@ -69,23 +69,23 @@
<% if action.key == :project %>
<%= angular_component_tag 'opce-project-autocompleter',
inputs: {
- multiple: true,
+ multiple: false,
filters: [{ name: 'active', operator: '=', values: ['t'] }],
resource: "projects",
inputName: input_name,
appendTo: "body",
- inputValue: action.values
+ inputValue: action.values.first
}
%>
<% else %>
<%= angular_component_tag 'opce-autocompleter',
inputs: {
- multiple: true,
+ multiple: action.multi_value?,
defaultData: false,
items: action.allowed_values.map { |v| { id: v[:value], name: v[:label] } },
model: action.value_objects.map { |v| { id: v[:value], name: v[:label] } },
inputName: input_name,
- inputId: "custom_action_conditions_#{action.key}",
+ labelForId: "custom_action_actions_#{action.key}",
appendTo: "body",
}
%>
diff --git a/spec/support/pages/admin/custom_actions/form.rb b/spec/support/pages/admin/custom_actions/form.rb
index f700f0d551c..8550ed7e28e 100644
--- a/spec/support/pages/admin/custom_actions/form.rb
+++ b/spec/support/pages/admin/custom_actions/form.rb
@@ -66,7 +66,7 @@ module Pages
end
def expect_action(name, value)
- value = "null" if value.nil?
+ value = "" if value.nil?
within "#custom-actions-form--actions" do
if value.is_a?(Array)