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

WIP

Wieland Lindenthalf3c08797da9f
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index c660aaa49d6..eaa212267bb 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -484,19 +484,6 @@ en:
upgrade_to_ee_text: "Wow! If you need this feature you are a super pro! Would you mind supporting us OpenSource developers by becoming an Enterprise Edition client?"
more_information: "More information"
nevermind: "Nevermind"
- filter_types:
- parent: "being child of"
- precedes: "preceding"
- follows: "following"
- relates: "relating to"
- duplicates: "duplicating"
- duplicated: "duplicated by"
- blocks: "blocking"
- blocked: "blocked by"
- partof: "being part of"
- includes: "including"
- requires: "requiring"
- required: "required by"
edit:
form_configuration: "Form Configuration"
projects: "Projects"
@@ -850,8 +837,7 @@ en:
relation_columns: 'Need to see relations in the work package list?'
check_out_link: 'Check out the Enterprise Edition.'
relation_filters:
- first_part: "Show all work packages"
- second_part: "the current work package"
+ filter_work_packages_by_relation_type: 'Filter work packages by relation type'
tabs:
overview: Overview
activity: Activity
diff --git a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html
index c4263e78036..b2bb2104a51 100644
--- a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html
+++ b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.html
@@ -1,6 +1,6 @@
<div class="relation-filter-selector">
<h5>
- <span [textContent]="text.first_part"></span>
+ <span [textContent]="text.filter_work_packages_by_relation_type"></span>
&ngsp;
<select class="form--select form--inline-select"
id=""
@@ -12,7 +12,5 @@
[ngValue]="filter">
</option>
</select>
- &ngsp;
- <span [textContent]="text.second_part"></span>
</h5>
</div>
diff --git a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts
index 7672a9724b0..d8843432ef8 100644
--- a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts
+++ b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts
@@ -35,21 +35,22 @@ export class WpTableConfigurationRelationSelectorComponent implements OnInit {
public selectedRelationFilter:QueryFilterResource|undefined = undefined;
public text = {
+ filter_work_packages_by_relation_type: this.I18n.t('js.work_packages.table_configuration.relation_filters.filter_work_packages_by_relation_type'),
please_select: this.I18n.t('js.placeholders.selection'),
- first_part: this.I18n.t('js.work_packages.table_configuration.relation_filters.first_part'),
- second_part: this.I18n.t('js.work_packages.table_configuration.relation_filters.second_part'),
- parent: this.I18n.t('js.types.attribute_groups.filter_types.parent'),
- precedes: this.I18n.t('js.types.attribute_groups.filter_types.precedes'),
- follows: this.I18n.t('js.types.attribute_groups.filter_types.follows'),
- relates: this.I18n.t('js.types.attribute_groups.filter_types.relates'),
- duplicates: this.I18n.t('js.types.attribute_groups.filter_types.duplicates'),
- duplicated: this.I18n.t('js.types.attribute_groups.filter_types.duplicated'),
- blocks: this.I18n.t('js.types.attribute_groups.filter_types.blocks'),
- blocked: this.I18n.t('js.types.attribute_groups.filter_types.blocked'),
- requires: this.I18n.t('js.types.attribute_groups.filter_types.requires'),
- required: this.I18n.t('js.types.attribute_groups.filter_types.required'),
- partof: this.I18n.t('js.types.attribute_groups.filter_types.partof'),
- includes: this.I18n.t('js.types.attribute_groups.filter_types.includes')
+ // We need to inverse the translation strings, as the filters's are named the other way around than what
+ // a user knows from the relations tab:
+ parent: this.I18n.t('js.relation_labels.children'),
+ precedes: this.I18n.t('js.relation_labels.follows'),
+ follows: this.I18n.t('js.relation_labels.precedes'),
+ relates: this.I18n.t('js.relation_labels.relates'),
+ duplicates: this.I18n.t('js.relation_labels.duplicated'),
+ duplicated: this.I18n.t('js.relation_labels.duplicates'),
+ blocks: this.I18n.t('js.relation_labels.blocked'),
+ blocked: this.I18n.t('js.relation_labels.blocks'),
+ requires: this.I18n.t('js.relation_labels.required'),
+ required: this.I18n.t('js.relation_labels.requires'),
+ partof: this.I18n.t('js.relation_labels.includes'),
+ includes: this.I18n.t('js.relation_labels.partof')
};
constructor(readonly injector:Injector,
diff --git a/spec/features/types/form_configuration_query_spec.rb b/spec/features/types/form_configuration_query_spec.rb
index c07130a3bd1..c858dc2e8ed 100644
--- a/spec/features/types/form_configuration_query_spec.rb
+++ b/spec/features/types/form_configuration_query_spec.rb
@@ -37,23 +37,21 @@ describe 'form query configuration', type: :feature, js: true do
let(:other_project) { FactoryBot.create :project, types: [type_task] }
let!(:work_package) do
FactoryBot.create :work_package,
- project: project,
- type: type_bug
+ new_relation.merge(
+ project: project,
+ type: type_bug
+ )
end
- let(:wp_relation_type) { :parent }
+ let(:wp_relation_type) { :children }
let(:frontend_relation_type) { wp_relation_type }
- let(:relation_target) { work_package }
+ let(:relation_target) { related_task }
let(:new_relation) do
relation = Hash.new
- relation[wp_relation_type] = relation_target
+ relation[wp_relation_type] = [related_bug, related_task, related_task_other_project]
relation
end
let!(:related_task) do
- FactoryBot.create :work_package,
- new_relation.merge(
- project: project,
- type: type_task
- )
+ FactoryBot.create :work_package, project: project, type: type_task
end
let!(:unrelated_task) do
FactoryBot.create :work_package, subject: 'Unrelated task', type: type_task, project: project
@@ -62,18 +60,10 @@ describe 'form query configuration', type: :feature, js: true do
FactoryBot.create :work_package, subject: 'Unrelated bug', type: type_bug, project: project
end
let!(:related_task_other_project) do
- FactoryBot.create :work_package,
- new_relation.merge(
- project: other_project,
- type: type_task
- )
+ FactoryBot.create :work_package, project: other_project, type: type_task
end
let!(:related_bug) do
- FactoryBot.create :work_package,
- new_relation.merge(
- project: project,
- type: type_bug
- )
+ FactoryBot.create :work_package, project: project, type: type_bug
end
let(:wp_page) { Pages::FullWorkPackage.new(work_package) }
@@ -91,18 +81,18 @@ describe 'form query configuration', type: :feature, js: true do
end
it 'can save an empty query group' do
- form.add_query_group('Empty test', :parent)
+ form.add_query_group('Empty test', :children)
form.save_changes
expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
type_bug.reload
- query_group = type_bug.attribute_groups.detect{ |x| x.is_a?(Type::QueryGroup) }
+ query_group = type_bug.attribute_groups.detect { |x| x.is_a?(Type::QueryGroup) }
expect(query_group.attributes).to be_kind_of(::Query)
expect(query_group.key).to eq('Empty test')
end
it 'loads the children from the table split view (Regression #28490)' do
- form.add_query_group('Subtasks', :parent)
+ form.add_query_group('Subtasks', :children)
# Save changed query
form.save_changes
expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
@@ -129,7 +119,7 @@ describe 'form query configuration', type: :feature, js: true do
let(:wp_page) { Pages::FullWorkPackageCreate.new }
it 'does not show a subgroup (Regression #29582)' do
- form.add_query_group('Subtasks', :parent)
+ form.add_query_group('Subtasks', :children)
# Save changed query
form.save_changes
expect(page).to have_selector('.flash.notice', text: 'Successful update.', wait: 10)
@@ -143,7 +133,7 @@ describe 'form query configuration', type: :feature, js: true do
end
it 'can modify and keep changed columns (Regression #27604)' do
- form.add_query_group('Columns Test', :parent)
+ form.add_query_group('Columns Test', :children)
form.edit_query_group('Columns Test')
# Restrict filters to type_task
@@ -166,7 +156,7 @@ describe 'form query configuration', type: :feature, js: true do
column_names = query.attributes.columns.map(&:name).sort
expect(column_names).to eq %i[id subject]
- form.add_query_group('Second query', :parent)
+ form.add_query_group('Second query', :children)
form.edit_query_group('Second query')
# Restrict filters to type_task
diff --git a/spec/support/browsers/chrome.rb b/spec/support/browsers/chrome.rb
index 931db2373ca..0131eb35184 100644
--- a/spec/support/browsers/chrome.rb
+++ b/spec/support/browsers/chrome.rb
@@ -23,6 +23,8 @@ def register_chrome_headless(language)
options.add_argument('--disable-gpu')
end
+ options.add_argument("--remote-debugging-port=9222")
+
options.add_argument('--no-sandbox')
options.add_argument('--disable-gpu')
options.add_argument('--disable-popup-blocking')
diff --git a/spec/support/components/admin/type_configuration_form.rb b/spec/support/components/admin/type_configuration_form.rb
index b64aa8a41eb..a20bac201c3 100644
--- a/spec/support/components/admin/type_configuration_form.rb
+++ b/spec/support/components/admin/type_configuration_form.rb
@@ -130,11 +130,11 @@ module Components
modal = ::Components::WorkPackages::TableConfigurationModal.new
within find('.relation-filter-selector') do
- select I18n.t("js.types.attribute_groups.filter_types.#{relation_filter}")
+ select I18n.t("js.relation_labels.#{relation_filter}")
# While we are here, let's check that all relation filters are present.
option_labels = %w[
- parent
+ children
precedes
follows
relates
@@ -146,7 +146,7 @@ module Components
includes
requires
required
- ].map { |filter_name| I18n.t("js.types.attribute_groups.filter_types.#{filter_name}") }
+ ].map { |filter_name| I18n.t("js.relation_labels.#{filter_name}") }
option_labels.each do |label|
expect(page).to have_text(label)
diff --git a/spec/support/local_storage_cleanup.rb b/spec/support/local_storage_cleanup.rb
index 773161a3578..a719a1fec45 100644
--- a/spec/support/local_storage_cleanup.rb
+++ b/spec/support/local_storage_cleanup.rb
@@ -28,6 +28,6 @@
RSpec.configure do |config|
config.after(:each, js: true) do
- Capybara.current_session.driver.execute_script('window.localStorage.clear()')
+ Capybara.current_session.driver.execute_script('window.localStorage.clear()') rescue nil
end
end