diff --git a/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts index 64d4f6fb8..9cd313910 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -270,7 +270,8 @@ export class AmendmentCreateWizardComponent extends BaseViewComponent implements category_id: this.motion.category_id, tags_id: this.motion.tags_id, motion_block_id: this.motion.motion_block_id, - amendment_paragraphs: amendedParagraphs + amendment_paragraphs: amendedParagraphs, + workflow_id: this.configService.instant('motions_amendments_workflow') }; const motion = new CreateMotion(); diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts index f92737a1b..83c80175d 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts @@ -728,8 +728,9 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, this.editMotion = true; const defaultMotion: Partial = {}; if (this.route.snapshot.queryParams.parent) { + const parentId = +this.route.snapshot.queryParams.parent; this.amendmentEdit = true; - const parentMotion = this.repo.getViewModel(this.route.snapshot.queryParams.parent); + const parentMotion = this.repo.getViewModel(parentId); const defaultTitle = `${this.translate.instant('Amendment to')} ${parentMotion.identifierOrTitle}`; defaultMotion.title = defaultTitle; defaultMotion.parent_id = parentMotion.id; @@ -1289,9 +1290,16 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, * Sets the default workflow ID during form creation */ public updateWorkflowIdForCreateForm(paragraph?: number): void { - const isStatuteAmendment = !!this.contentForm.get('statute_amendment').value && !!paragraph; - const configKey = isStatuteAmendment ? 'motions_statute_amendments_workflow' : 'motions_workflow'; - const workflowId = this.configService.instant(configKey); + let configKey: string; + + if (!!this.contentForm.get('statute_amendment').value && !!paragraph) { + configKey = 'motions_statute_amendments_workflow'; + } else if (!!this.route.snapshot.queryParams.parent) { + configKey = 'motions_amendments_workflow'; + } else { + configKey = 'motions_workflow'; + } + const workflowId = this.configService.instant(configKey); this.contentForm.patchValue({ workflow_id: +workflowId }); } diff --git a/openslides/motions/config_variables.py b/openslides/motions/config_variables.py index 9e583bfa8..13524e5f2 100644 --- a/openslides/motions/config_variables.py +++ b/openslides/motions/config_variables.py @@ -47,6 +47,16 @@ def get_config_variables(): group="Motions", ) + yield ConfigVariable( + name="motions_amendments_workflow", + default_value="1", + input_type="choice", + label="Workflow of new amendments", + choices=get_workflow_choices, + weight=314, + group="Motions", + ) + yield ConfigVariable( name="motions_preamble", default_value="The assembly may decide:",