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 project input label and text input selection in custom actions spec

Benjamin Bädorf6f4453ed59ac
diff --git a/app/views/custom_actions/_form.html.erb b/app/views/custom_actions/_form.html.erb
index d74b7039296..29c7b878146 100644
--- a/app/views/custom_actions/_form.html.erb
+++ b/app/views/custom_actions/_form.html.erb
@@ -27,9 +27,9 @@
inputs: {
multiple: true,
apiFilters: [],
- name: input_name
- },
- id: "custom_action_conditions_#{condition.key}"
+ name: input_name,
+ labelForId: "custom_action_conditions_#{condition.key}"
+ }
%>
<% else %>
<%= render partial: 'augmented/autocomplete_select_decoration',
diff --git a/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.html b/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.html
index 4adcf630a82..c5191a3dabd 100644
--- a/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.html
+++ b/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.html
@@ -6,6 +6,7 @@
[multiple]="multiple"
[focusDirectly]="focusDirectly"
+ [labelForId]="labelForId"
appendTo="body"
@@ -15,7 +16,7 @@
op-autocompleter-label-tmp
let-item
>
- {{ item.name }}
+ <span class="ng-value-label">{{ item.name }}</span>
</ng-template>
<ng-template
diff --git a/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.ts b/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.ts
index 8a66c103e79..d8321fab326 100644
--- a/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.ts
+++ b/frontend/src/app/shared/components/autocompleter/project-autocompleter/project-autocompleter.component.ts
@@ -93,6 +93,8 @@ export class ProjectAutocompleterComponent implements ControlValueAccessor {
@Input() public multiple = false;
+ @Input() public labelForId:string = '';
+
@Input() public apiFilters:ApiV3ListFilter[] = [];
// This function allows mapping of the results before they are fed to the tree