From 87e57272fab5d4a7915e95c1866edff2b5460e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Ja=C5=9Bkowski?= <138671284+g-jaskowski@users.noreply.github.com> Date: Thu, 24 Aug 2023 16:51:38 +0200 Subject: [PATCH] [ACS-5898] prevent custom task filters from always sending due after date (#8847) * ACS-5898 prevent custom task filters from always sending due after date, build custom filters form without initial values * ACS-5898 revert setDueAfterFilter method removal, make its use conditional --- .../task-list-demo.component.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts index 7c73d658865..c2352fcb74d 100644 --- a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts +++ b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts @@ -105,19 +105,19 @@ export class TaskListDemoComponent implements OnInit, OnDestroy { buildForm() { this.taskListForm = this.formBuilder.group({ taskAppId: new UntypedFormControl(this.defaultAppId, [Validators.pattern('^[0-9]*$')]), - taskName: new UntypedFormControl(''), - taskId: new UntypedFormControl(''), - taskProcessDefinitionId: new UntypedFormControl(''), - taskProcessInstanceId: new UntypedFormControl(''), - taskAssignment: new UntypedFormControl(''), - taskState: new UntypedFormControl(''), - taskSort: new UntypedFormControl(''), - taskSize: new UntypedFormControl('', [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]), - taskPage: new UntypedFormControl('', [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]), - taskDueAfter: new UntypedFormControl(''), - taskDueBefore: new UntypedFormControl(''), - taskStart: new UntypedFormControl('', [Validators.pattern('^[0-9]*$')]), - taskIncludeProcessInstance: new UntypedFormControl('') + taskName: new UntypedFormControl(), + taskId: new UntypedFormControl(), + taskProcessDefinitionId: new UntypedFormControl(), + taskProcessInstanceId: new UntypedFormControl(), + taskAssignment: new UntypedFormControl(), + taskState: new UntypedFormControl(), + taskSort: new UntypedFormControl(), + taskSize: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]), + taskPage: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$'), Validators.min(this.minValue)]), + taskDueAfter: new UntypedFormControl(), + taskDueBefore: new UntypedFormControl(), + taskStart: new UntypedFormControl(null, [Validators.pattern('^[0-9]*$')]), + taskIncludeProcessInstance: new UntypedFormControl() }); this.taskListForm.valueChanges @@ -142,7 +142,7 @@ export class TaskListDemoComponent implements OnInit, OnDestroy { this.state = taskFilter.taskState; this.sort = taskFilter.taskSort; this.start = taskFilter.taskStart; - this.dueAfter = this.setDueAfterFilter(taskFilter.taskDueAfter); + this.dueAfter = taskFilter.taskDueAfter ? this.setDueAfterFilter(taskFilter.taskDueAfter) : null; this.dueBefore = taskFilter.taskDueBefore; if (taskFilter.taskSize) {