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

Disable sendNotifications to new project component

Oliver Günther5528f3f39cff
diff --git a/frontend/src/app/features/projects/components/new-project/new-project.component.ts b/frontend/src/app/features/projects/components/new-project/new-project.component.ts
index 8b23833c1e1..0cb1c2645f6 100644
--- a/frontend/src/app/features/projects/components/new-project/new-project.component.ts
+++ b/frontend/src/app/features/projects/components/new-project/new-project.component.ts
@@ -33,7 +33,7 @@ export class NewProjectComponent extends UntilDestroyedMixin implements OnInit {
fieldGroups:IDynamicFieldGroupConfig[];
- initialPayload = {};
+ initialPayload:Record<string, unknown> = {};
text = {
use_template: this.I18n.t('js.project.use_template'),
@@ -85,7 +85,7 @@ export class NewProjectComponent extends UntilDestroyedMixin implements OnInit {
this.resourcePath = this.apiV3Service.projects.path;
this.fieldGroups = [{
name: this.text.advancedSettingsLabel,
- fieldsFilter: (field) => !['name', 'parent'].includes(field.templateOptions?.property!)
+ fieldsFilter: (field) => !['name', 'parent', 'sendNotifications'].includes(field.templateOptions?.property as string)
&& !(field.templateOptions?.required
&& !field.templateOptions.hasDefault
&& field.templateOptions.payloadValue == null),
@@ -108,6 +108,10 @@ export class NewProjectComponent extends UntilDestroyedMixin implements OnInit {
this.initialPayload = {
...this.initialPayload,
name: this.dynamicForm.model.name,
+ _meta: {
+ ...(this.initialPayload?._meta as Record<string, unknown>),
+ sendNotifications: false,
+ },
};
this.formUrl = selected?.href ? `${selected.href}/copy` : null;
}