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
Fix meeting time zones
Oliver Günther2714bbb13a59
diff --git a/frontend/src/stimulus/controllers/dynamic/meetings/form.controller.ts b/frontend/src/stimulus/controllers/dynamic/meetings/form.controller.tsindex a98f0f79074..1da9a6756f6 100644--- a/frontend/src/stimulus/controllers/dynamic/meetings/form.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/meetings/form.controller.ts@@ -33,8 +33,8 @@ import { TurboRequestsService } from 'core-app/core/turbo/turbo-requests.serviceimport { PathHelperService } from 'core-app/core/path-helper/path-helper.service';export default class extends ApplicationController {- private turboRequests:TurboRequestsService;- private pathHelper:PathHelperService;+ protected turboRequests:TurboRequestsService;+ protected pathHelper:PathHelperService;async connect() {const context = await window.OpenProject.getPluginContext();diff --git a/frontend/src/stimulus/controllers/dynamic/recurring-meetings/form.controller.ts b/frontend/src/stimulus/controllers/dynamic/recurring-meetings/form.controller.tsindex b9e9cd99427..f58e2eb4e77 100644--- a/frontend/src/stimulus/controllers/dynamic/recurring-meetings/form.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/recurring-meetings/form.controller.ts@@ -1,16 +1,11 @@-import { ApplicationController } from 'stimulus-use';-import { TurboRequestsService } from 'core-app/core/turbo/turbo-requests.service';-import { PathHelperService } from 'core-app/core/path-helper/path-helper.service';+import OpMeetingsFormController from 'core-stimulus/controllers/dynamic/meetings/form.controller';-export default class OpRecurringMeetingsFormController extends ApplicationController {- private turboRequests:TurboRequestsService;- private pathHelper:PathHelperService;+export default class OpRecurringMeetingsFormController extends OpMeetingsFormController {+ static values = {+ persisted: Boolean,+ };- async connect() {- const context = await window.OpenProject.getPluginContext();- this.turboRequests = context.services.turboRequests;- this.pathHelper = context.services.pathHelperService;- }+ declare persistedValue:boolean;updateFrequencyText():void {const data = new FormData(this.element as HTMLFormElement);@@ -31,4 +26,13 @@ export default class OpRecurringMeetingsFormController extends ApplicationContro},);}++ updateTimezoneText() {+ // We don't update the timezone text on editing recurring meetings+ if (this.persistedValue) {+ return;+ }++ super.updateTimezoneText();+ }}diff --git a/frontend/tsconfig.base.json b/frontend/tsconfig.base.jsonindex b494c9c768f..1ef24cc8d89 100644--- a/frontend/tsconfig.base.json+++ b/frontend/tsconfig.base.json@@ -36,6 +36,7 @@"paths": {"@ng-select/ng-select": ["../node_modules/@ng-select/ng-select/"],"core-app/*": ["./app/*"],+ "core-stimulus/*": ["./stimulus/*"],"core-typings/*": ["./typings/*"],diff --git a/modules/meeting/app/components/meetings/index/form_component.html.erb b/modules/meeting/app/components/meetings/index/form_component.html.erbindex f59e9648f24..81cada069af 100644--- a/modules/meeting/app/components/meetings/index/form_component.html.erb+++ b/modules/meeting/app/components/meetings/index/form_component.html.erb@@ -7,10 +7,10 @@data: {turbo: true,controller: [- "meetings--form","show-when-value-selected",@meeting.is_a?(RecurringMeeting) ? "recurring-meetings--form" : nil- ].compact.join(" ")+ ].compact.join(" "),+ "recurring-meetings--form-persisted-value": @meeting.persisted?},html: {id: "meeting-form"diff --git a/modules/meeting/app/forms/meeting/time_group.rb b/modules/meeting/app/forms/meeting/time_group.rbindex e24ac55348b..5c9346c85b1 100644--- a/modules/meeting/app/forms/meeting/time_group.rb+++ b/modules/meeting/app/forms/meeting/time_group.rb@@ -98,6 +98,8 @@ class Meeting::TimeGroup < ApplicationFormenddef timezone_caption+ return if @meeting.is_a?(RecurringMeeting) && @meeting.persisted?+friendly_timezone_name(User.current.time_zone, period: @meeting.start_time)endend