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

Change default for "ignore_non_working_days" as new WorkPackages should take them into account for calculation

Henriette Darge655646cd59c1
diff --git a/db/migrate/20220816065025_change_default_for_non_working_days.rb b/db/migrate/20220816065025_change_default_for_non_working_days.rb
new file mode 100644
index 00000000000..41368accbc4
--- /dev/null
+++ b/db/migrate/20220816065025_change_default_for_non_working_days.rb
@@ -0,0 +1,5 @@
+class ChangeDefaultForNonWorkingDays < ActiveRecord::Migration[7.0]
+ def change
+ change_column_default :work_packages, :ignore_non_working_days, from: true, to: false
+ end
+end
diff --git a/frontend/src/app/shared/components/datepicker/datepicker.modal.ts b/frontend/src/app/shared/components/datepicker/datepicker.modal.ts
index 4e7f0515cfa..f80c559ef8f 100644
--- a/frontend/src/app/shared/components/datepicker/datepicker.modal.ts
+++ b/frontend/src/app/shared/components/datepicker/datepicker.modal.ts
@@ -140,7 +140,7 @@ export class DatePickerModalComponent extends OpModalComponent implements AfterV
this.singleDate = this.changeset.isWritable('date');
this.scheduleManually = !!this.changeset.value('scheduleManually');
- this.includeNonWorkingDays = !this.changeset.value('ignoreNonWorkingDays');
+ this.includeNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
this.duration = this.changeset.value('duration') as number;
this.formattedDuration = this.timezoneService.formattedDuration(this.duration.toString(), 'days');