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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
make everyday for overdue as P1D
Dmitrii57eb0a930ec8
diff --git a/app/contracts/user_preferences/params_contract.rb b/app/contracts/user_preferences/params_contract.rbindex cce4a2d1d16..00e89295d7e 100644--- a/app/contracts/user_preferences/params_contract.rb+++ b/app/contracts/user_preferences/params_contract.rb@@ -29,7 +29,7 @@module UserPreferencesclass ParamsContract < ::ParamsContractDATE_ALERT_DURATIONS = [nil, 0, 1, 3, 7].freeze- DATE_ALERT_OVERDUE_DURATIONS = [nil, 0, 3, 7].freeze+ DATE_ALERT_OVERDUE_DURATIONS = [nil, 1, 3, 7].freezevalidate :only_one_global_setting,if: -> { notifications.present? }diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 662e9f4e7e3..5e8dbe1b54f 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -636,7 +636,7 @@ en:P3D: 3 days beforeP7D: a week beforeoverdue:- PT0S: everyday+ P1D: everydayP3D: every 3 daysP7D: every weekreasons:diff --git a/docs/api/apiv3/components/schemas/notification_settings_model.yml b/docs/api/apiv3/components/schemas/notification_settings_model.ymlindex e3ea9c001dd..e840c82046d 100644--- a/docs/api/apiv3/components/schemas/notification_settings_model.yml+++ b/docs/api/apiv3/components/schemas/notification_settings_model.yml@@ -47,7 +47,7 @@ items:The possible values are: none, every day, every 3 days, every week.enum:- ""- - PT0S+ - P1D- P3D- P1WstartDate:diff --git a/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts b/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.tsindex 642a24765fb..74b67337850 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts+++ b/frontend/src/app/features/user-preferences/notifications-settings/overdue-reminder-available-times.ts@@ -19,8 +19,8 @@ export const REMINDER_AVAILABLE_TIMEFRAMES:{ value:string, title:string }[] = [export const OVERDUE_REMINDER_AVAILABLE_TIMEFRAMES:{ value:string, title:string }[] = [{- value: 'PT0S',- title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.PT0S'),+ value: 'P1D',+ title: window.I18n.t('js.notifications.settings.reminders.timeframes.overdue.P1D'),},{value: 'P3D',diff --git a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.tsindex 9d02ccb31e1..8c066a60de9 100644--- a/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts+++ b/frontend/src/app/features/user-preferences/notifications-settings/table/notification-settings-table.component.ts@@ -93,7 +93,7 @@ export class NotificationSettingsTableComponent {workPackageCommented: new FormControl(false),startDate: new FormControl(this.availableTimes[2].value),dueDate: new FormControl(this.availableTimes[2].value),- overdue: new FormControl(this.availableTimes[1].value),+ overdue: new FormControl(this.availableTimesOverdue[1].value),}));}diff --git a/spec/contracts/user_preferences/params_contract_spec.rb b/spec/contracts/user_preferences/params_contract_spec.rbindex 71140486547..a19e3d20584 100644--- a/spec/contracts/user_preferences/params_contract_spec.rb+++ b/spec/contracts/user_preferences/params_contract_spec.rb@@ -89,7 +89,7 @@ describe UserPreferences::ParamsContract docontext 'when project setting with start_date, due_date and overdue set' dolet(:notification_settings) do[- { project_id: 1234, start_date: 1, due_date: 1, overdue: 0 }+ { project_id: 1234, start_date: 1, due_date: 1, overdue: 1 }]end@@ -99,7 +99,7 @@ describe UserPreferences::ParamsContract docontext 'when global setting with start_date, due_date and overdue set' dolet(:notification_settings) do[- { start_date: 1, due_date: 1, overdue: 0 }+ { start_date: 1, due_date: 1, overdue: 1 }]end@@ -109,7 +109,7 @@ describe UserPreferences::ParamsContract docontext 'when project setting with valid start_date, valid due_date and invalid overdue' dolet(:notification_settings) do[- { project_id: 1234, start_date: 1, due_date: 1, overdue: 1 }+ { project_id: 1234, start_date: 1, due_date: 1, overdue: 0 }]end@@ -119,7 +119,7 @@ describe UserPreferences::ParamsContract docontext 'when global setting with invalid start_date, valid due_date and valid overdue' dolet(:notification_settings) do[- { start_date: -1, due_date: 1, overdue: 0 }+ { start_date: -1, due_date: 1, overdue: 1 }]end