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 wording of ignore non working days

Oliver Günther59cfaf06a8b4
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index abaf604c504..1e80b55e253 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -919,10 +919,10 @@ en:
changing_dates_affects_follow_relations: "Changing these dates will affect dates of related work packages."
click_on_show_relations_to_open_gantt: 'Click on "%{button_name}" for GANTT overview.'
show_relations: 'Show relations'
- include_non_working_days:
+ ignore_non_working_days:
title: 'Working days'
- false: 'Working days only'
- true: 'Include non-working days'
+ false: 'Work week'
+ true: 'Include weekends'
description_filter: "Filter"
description_enter_text: "Enter text"
description_options_hide: "Hide options"
diff --git a/frontend/src/app/shared/components/datepicker/helpers/date-modal.helpers.ts b/frontend/src/app/shared/components/datepicker/helpers/date-modal.helpers.ts
index 5c115acce83..983d8cf6da4 100644
--- a/frontend/src/app/shared/components/datepicker/helpers/date-modal.helpers.ts
+++ b/frontend/src/app/shared/components/datepicker/helpers/date-modal.helpers.ts
@@ -100,12 +100,12 @@ export function setDates(dates:DateOption|DateOption[], datePicker:DatePicker, e
export function onDayCreate(
dayElem:DayElement,
- includeNonWorkingDays:boolean,
+ ignoreNonWorkingDays:boolean,
isNonWorkingDay:boolean,
minimalDate:Date|null|undefined,
isDayDisabled:boolean,
):void {
- if (!includeNonWorkingDays && isNonWorkingDay) {
+ if (!ignoreNonWorkingDays && isNonWorkingDay) {
dayElem.classList.add('flatpickr-non-working-day');
}
diff --git a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
index f81b9cf065e..30d83e7ffb2 100644
--- a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
+++ b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
@@ -28,14 +28,14 @@
<div class="form--field">
<label class="form--label">
- {{ text.includeNonWorkingDays.title }}
+ {{ text.ignoreNonWorkingDays.title }}
</label>
<div class="form--field-container">
<spot-toggle
- [options]="includeNonWorkingDaysOptions"
- [value]="includeNonWorkingDays"
+ [options]="ignoreNonWorkingDaysOptions"
+ [value]="ignoreNonWorkingDays"
[name]="'include-non-working-days'"
- [(ngModel)]="includeNonWorkingDays"
+ [(ngModel)]="ignoreNonWorkingDays"
(ngModelChange)="changeNonWorkingDays()"
data-qa-selector="op-datepicker-modal--include-non-working-days"
></spot-toggle>
diff --git a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts
index 22ad744c1d7..358736b6ce6 100644
--- a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts
+++ b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.ts
@@ -139,10 +139,10 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
manual: this.I18n.t('js.scheduling.manual'),
default: this.I18n.t('js.scheduling.default'),
},
- includeNonWorkingDays: {
- title: this.I18n.t('js.work_packages.datepicker_modal.include_non_working_days.title'),
- yes: this.I18n.t('js.work_packages.datepicker_modal.include_non_working_days.true'),
- no: this.I18n.t('js.work_packages.datepicker_modal.include_non_working_days.false'),
+ ignoreNonWorkingDays: {
+ title: this.I18n.t('js.work_packages.datepicker_modal.ignore_non_working_days.title'),
+ yes: this.I18n.t('js.work_packages.datepicker_modal.ignore_non_working_days.true'),
+ no: this.I18n.t('js.work_packages.datepicker_modal.ignore_non_working_days.false'),
},
};
@@ -151,15 +151,15 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
scheduleManually = false;
schedulingOptions = [
- { value: true, title: this.text.scheduling.manual },
{ value: false, title: this.text.scheduling.default },
+ { value: true, title: this.text.scheduling.manual },
];
- includeNonWorkingDays = false;
+ ignoreNonWorkingDays = false;
- includeNonWorkingDaysOptions = [
- { value: true, title: this.text.includeNonWorkingDays.yes },
- { value: false, title: this.text.includeNonWorkingDays.no },
+ ignoreNonWorkingDaysOptions = [
+ { value: false, title: this.text.ignoreNonWorkingDays.no },
+ { value: true, title: this.text.ignoreNonWorkingDays.yes },
];
duration:number|null;
@@ -243,7 +243,7 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
.forPayload({
...fieldsToUpdate,
lockVersion: this.changeset.value<string>('lockVersion'),
- ignoreNonWorkingDays: this.includeNonWorkingDays,
+ ignoreNonWorkingDays: this.ignoreNonWorkingDays,
scheduleManually: this.scheduleManually,
})),
)
@@ -262,7 +262,7 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
this.htmlId = `wp-datepicker-${locals.fieldName as string}`;
this.scheduleManually = !!this.changeset.value('scheduleManually');
- this.includeNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
+ this.ignoreNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
this.setDurationDaysFromUpstream(this.changeset.value('duration'));
@@ -313,7 +313,7 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
this.changeset.setValue('scheduleManually', this.scheduleManually);
// Apply include NWD
- this.changeset.setValue('ignoreNonWorkingDays', this.includeNonWorkingDays);
+ this.changeset.setValue('ignoreNonWorkingDays', this.ignoreNonWorkingDays);
// Apply the dates if they could be changed
if (this.isSchedulable) {
@@ -469,7 +469,7 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
onDayCreate: (dObj:Date[], dStr:string, fp:flatpickr.Instance, dayElem:DayElement) => {
onDayCreate(
dayElem,
- this.includeNonWorkingDays,
+ this.ignoreNonWorkingDays,
this.weekdayService.isNonWorkingDay(dayElem.dateObj),
minimalDate,
this.isDayDisabled(dayElem, minimalDate),
@@ -678,7 +678,7 @@ export class MultiDateModalComponent extends OpModalComponent implements AfterVi
const payload = form.payload as { startDate:string, dueDate:string, duration:string, ignoreNonWorkingDays:boolean };
this.dates.start = payload.startDate;
this.dates.end = payload.dueDate;
- this.includeNonWorkingDays = payload.ignoreNonWorkingDays;
+ this.ignoreNonWorkingDays = payload.ignoreNonWorkingDays;
this.setDurationDaysFromUpstream(payload.duration);
diff --git a/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html b/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html
index ebf89b0cee8..fcdb6fefb89 100644
--- a/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html
+++ b/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html
@@ -28,14 +28,14 @@
<div class="form--field">
<label class="form--label">
- {{ text.includeNonWorkingDays.title }}
+ {{ text.ignoreNonWorkingDays.title }}
</label>
<div class="form--field-container">
<spot-toggle
- [options]="includeNonWorkingDaysOptions"
- [value]="includeNonWorkingDays"
+ [options]="ignoreNonWorkingDaysOptions"
+ [value]="ignoreNonWorkingDays"
[name]="'include-non-working-days'"
- [(ngModel)]="includeNonWorkingDays"
+ [(ngModel)]="ignoreNonWorkingDays"
(ngModelChange)="changeNonWorkingDays()"
data-qa-selector="op-datepicker-modal--include-non-working-days"
></spot-toggle>
diff --git a/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.ts b/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.ts
index fe1703013fb..333e7833daf 100644
--- a/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.ts
+++ b/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.ts
@@ -108,10 +108,10 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
manual: this.I18n.t('js.scheduling.manual'),
default: this.I18n.t('js.scheduling.default'),
},
- includeNonWorkingDays: {
- title: this.I18n.t('js.work_packages.datepicker_modal.include_non_working_days.title'),
- yes: this.I18n.t('js.work_packages.datepicker_modal.include_non_working_days.true'),
- no: this.I18n.t('js.work_packages.datepicker_modal.include_non_working_days.false'),
+ ignoreNonWorkingDays: {
+ title: this.I18n.t('js.work_packages.datepicker_modal.ignore_non_working_days.title'),
+ yes: this.I18n.t('js.work_packages.datepicker_modal.ignore_non_working_days.true'),
+ no: this.I18n.t('js.work_packages.datepicker_modal.ignore_non_working_days.false'),
},
};
@@ -124,11 +124,11 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
{ value: false, title: this.text.scheduling.default },
];
- includeNonWorkingDays = false;
+ ignoreNonWorkingDays = false;
- includeNonWorkingDaysOptions = [
- { value: true, title: this.text.includeNonWorkingDays.yes },
- { value: false, title: this.text.includeNonWorkingDays.no },
+ ignoreNonWorkingDaysOptions = [
+ { value: true, title: this.text.ignoreNonWorkingDays.yes },
+ { value: false, title: this.text.ignoreNonWorkingDays.no },
];
htmlId = '';
@@ -157,7 +157,7 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
.forPayload({
date,
lockVersion: this.changeset.value<string>('lockVersion'),
- ignoreNonWorkingDays: this.includeNonWorkingDays,
+ ignoreNonWorkingDays: this.ignoreNonWorkingDays,
})),
)
.subscribe((form) => this.updateDatesFromForm(form));
@@ -174,7 +174,7 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
this.changeset = locals.changeset as ResourceChangeset;
this.htmlId = `wp-datepicker-${locals.fieldName as string}`;
- this.includeNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
+ this.ignoreNonWorkingDays = !!this.changeset.value('ignoreNonWorkingDays');
this.date = this.changeset.value('date');
}
@@ -219,7 +219,7 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
this.initializeDatepicker();
// If we're single date, update the date
- if (!this.includeNonWorkingDays && this.date) {
+ if (!this.ignoreNonWorkingDays && this.date) {
// Resent the current start and end dates so duration can be calculated again.
this.dateUpdates$.next(this.date);
}
@@ -295,7 +295,7 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
onDayCreate: (dObj:Date[], dStr:string, fp:flatpickr.Instance, dayElem:DayElement) => {
onDayCreate(
dayElem,
- this.includeNonWorkingDays,
+ this.ignoreNonWorkingDays,
this.datePickerInstance?.weekdaysService.isNonWorkingDay(dayElem.dateObj),
minimalDate,
this.dateModalScheduling.isDayDisabled(dayElem, minimalDate),
@@ -326,7 +326,7 @@ export class SingleDateModalComponent extends OpModalComponent implements AfterV
const payload = form.payload as { date:string, ignoreNonWorkingDays:boolean };
this.date = payload.date;
- this.includeNonWorkingDays = payload.ignoreNonWorkingDays;
+ this.ignoreNonWorkingDays = payload.ignoreNonWorkingDays;
const parsedDate = parseDate(payload.date) as Date;
this.enforceManualChangesToDatepicker(parsedDate);
diff --git a/spec/support/components/datepicker/work_package_datepicker.rb b/spec/support/components/datepicker/work_package_datepicker.rb
index 39bd9fd5550..674bd830ce4 100644
--- a/spec/support/components/datepicker/work_package_datepicker.rb
+++ b/spec/support/components/datepicker/work_package_datepicker.rb
@@ -155,9 +155,9 @@ module Components
def ignore_non_working_days_option(val)
if val
- 'Include non-working days'
+ 'Include weekends'
else
- 'Working days only'
+ 'Work week'
end
end