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

Revert "Add the working days switch to the datepicker on Work packages"

Dombi Attila01505d84db22
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/date-edit-field/date-edit-field.component.ts b/frontend/src/app/shared/components/fields/edit/field-types/date-edit-field/date-edit-field.component.ts
index 1b79f47191b..1f8224a6d8a 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/date-edit-field/date-edit-field.component.ts
+++ b/frontend/src/app/shared/components/fields/edit/field-types/date-edit-field/date-edit-field.component.ts
@@ -39,7 +39,6 @@ import { TimezoneService } from 'core-app/core/datetime/timezone.service';
[id]="handler.htmlId"
class="inline-edit--field"
[opened]="opened"
- [showIgnoreNonWorkingDays]="showIgnoreNonWorkingDays"
(closed)="onModalClosed()"
></op-single-date-picker>
`,
@@ -48,18 +47,12 @@ import { TimezoneService } from 'core-app/core/datetime/timezone.service';
export class DateEditFieldComponent extends EditFieldComponent implements OnInit {
@InjectField() readonly timezoneService:TimezoneService;
- showIgnoreNonWorkingDays = false;
-
opened = false;
ngOnInit():void {
super.ngOnInit();
// Open the datepicker when the field is not part of an editing form.
this.opened = !this.handler.inEditMode;
-
- if (this.name.startsWith('customField')) {
- this.showIgnoreNonWorkingDays = true;
- }
}
public get value() {
diff --git a/spec/features/work_packages/details/date_editor_spec.rb b/spec/features/work_packages/details/date_editor_spec.rb
index d9b996e47ad..04b876d4414 100644
--- a/spec/features/work_packages/details/date_editor_spec.rb
+++ b/spec/features/work_packages/details/date_editor_spec.rb
@@ -299,7 +299,6 @@ describe 'date inplace editor',
# Open date picker
cf_field.input_element.click
- datepicker.expect_working_days_only_enabled
datepicker.set_date Time.zone.today
datepicker.save!
@@ -317,9 +316,8 @@ describe 'date inplace editor',
cf_field.activate!
cf_field.expect_active!
- datepicker.expect_working_days_only_enabled
-
datepicker.set_date Time.zone.today
+
datepicker.expect_year Time.zone.today.year
datepicker.expect_month Time.zone.today.strftime("%B")
datepicker.expect_day Time.zone.today.day
diff --git a/spec/support/components/datepicker/datepicker.rb b/spec/support/components/datepicker/datepicker.rb
index 47f9518c45c..4184d60bce0 100644
--- a/spec/support/components/datepicker/datepicker.rb
+++ b/spec/support/components/datepicker/datepicker.rb
@@ -159,20 +159,6 @@ module Components
expect_input(date.iso8601)
end
- ##
- # Expect the "Working days only" switch to be enabled
-
- def expect_working_days_only_enabled
- expect(container).to have_field("Working days only", checked: true)
- end
-
- ##
- # Expect the "Working days only" switch to be disabled
-
- def expect_working_days_only_disabled
- expect(container).to have_field("Working days only", checked: false)
- end
-
##
# Expect the given date to be non working
def expect_non_working(date)