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

Don't use string for value in new work package date field

Benjamin Bädorf9d6fd617f9a2
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index b8b2a1893fa..0ee9cdf3416 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -442,7 +442,6 @@ en:
label_no_data: "No data to display"
label_no_due_date: "no finish date"
label_no_start_date: "no start date"
- label_no_date: "no date"
label_no_value: "No value"
label_none: "none"
label_not_contains: "doesn't contain"
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/combined-date-edit-field.component.ts b/frontend/src/app/shared/components/fields/edit/field-types/combined-date-edit-field.component.ts
index a6433eb4c79..5480676e99c 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/combined-date-edit-field.component.ts
+++ b/frontend/src/app/shared/components/fields/edit/field-types/combined-date-edit-field.component.ts
@@ -42,7 +42,6 @@ export class CombinedDateEditFieldComponent extends DatePickerEditFieldComponent
placeholder: {
startDate: this.I18n.t('js.label_no_start_date'),
dueDate: this.I18n.t('js.label_no_due_date'),
- date: this.I18n.t('js.label_no_date'),
},
};
@@ -104,6 +103,6 @@ export class CombinedDateEditFieldComponent extends DatePickerEditFieldComponent
protected current(dateAttribute:'startDate' | 'dueDate' | 'date'):string {
const value = (this.resource && (this.resource as WorkPackageResource)[dateAttribute]) as string|null;
- return (value || this.text.placeholder[dateAttribute]);
+ return (value || '');
}
}
diff --git a/spec/features/work_packages/new/new_work_package_spec.rb b/spec/features/work_packages/new/new_work_package_spec.rb
index 82efe66ca91..6d53cabf4d6 100644
--- a/spec/features/work_packages/new/new_work_package_spec.rb
+++ b/spec/features/work_packages/new/new_work_package_spec.rb
@@ -291,7 +291,7 @@ describe 'new work package', js: true do
date_field = wp_page.edit_field(:date)
- date_field.expect_value(I18n.t('js.label_no_date'))
+ date_field.expect_value('')
# Set date
date_field.click_to_open_datepicker