diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/people-cloud/people-cloud.component.ts b/lib/process-services-cloud/src/lib/task/start-task/components/people-cloud/people-cloud.component.ts
index 4915d53d74..6da51ccb2c 100644
--- a/lib/process-services-cloud/src/lib/task/start-task/components/people-cloud/people-cloud.component.ts
+++ b/lib/process-services-cloud/src/lib/task/start-task/components/people-cloud/people-cloud.component.ts
@@ -123,6 +123,9 @@ export class PeopleCloudComponent implements OnInit {
if (value) {
this.setError();
} else {
+ if (!this.isMultipleMode()) {
+ this.removeUser.emit();
+ }
this.clearError();
}
}),
diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.html b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.html
index e29a69e7fe..ef0600aaaa 100644
--- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.html
+++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.html
@@ -62,7 +62,7 @@
diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts
index e24ee1edd4..e12dbda381 100644
--- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts
+++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts
@@ -136,6 +136,7 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
private loadCurrentUser() {
this.currentUser = this.identityUserService.getCurrentUserInfo();
+ this.assigneeName = this.currentUser.username;
}
public saveTask() {
@@ -143,7 +144,7 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
const newTask = Object.assign(this.taskForm.value);
newTask.appName = this.getAppName();
newTask.dueDate = this.getDueDate();
- newTask.assignee = this.getAssigneeName();
+ newTask.assignee = this.assigneeName;
this.createNewTask(new TaskDetailsCloudModel(newTask));
}
@@ -173,10 +174,6 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
return this.appName ? this.appName : '';
}
- private getAssigneeName(): string {
- return this.assigneeName ? this.assigneeName : this.currentUser.username;
- }
-
onDateChanged(newDateValue) {
this.dateError = false;
@@ -192,6 +189,10 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
this.assigneeName = assignee ? assignee.username : '';
}
+ onRemoveUser() {
+ this.assigneeName = null;
+ }
+
public whitespaceValidator(control: FormControl) {
const isWhitespace = (control.value || '').trim().length === 0;
const isValid = !isWhitespace;