AAE-34514 Disable next task checkbox for forms (#10824)

This commit is contained in:
Fabian Kindgen
2025-04-29 09:48:27 +02:00
committed by GitHub
parent 2c438760ea
commit 0f1200b5a2
3 changed files with 23 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
[showTitle]="showTitle"
[taskId]="taskId"
[taskDetails]="taskDetails"
[showNextTaskCheckbox]="showNextTaskCheckbox && canCompleteTask()"
[showNextTaskCheckbox]="showNextTaskCheckbox && canCompleteTask() && nextTaskCheckboxForFormsActivated"
[isNextTaskCheckboxChecked]="isNextTaskCheckboxChecked"
(cancelClick)="onCancelForm()"
(executeOutcome)="onExecuteOutcome($event)"
@@ -68,7 +68,7 @@
<mat-card-actions class="adf-task-form-actions" align="end">
<mat-checkbox
id="adf-form-open-next-task"
*ngIf="showNextTaskCheckbox && canCompleteTask()"
*ngIf="showNextTaskCheckbox && canCompleteTask() && nextTaskCheckboxForFormsActivated"
[checked]="isNextTaskCheckboxChecked"
(change)="onNextTaskCheckboxCheckedChanged($event)"
>{{ 'ADF_CLOUD_TASK_FORM.OPEN_NEXT_TASK.LABEL' | translate }}

View File

@@ -480,6 +480,11 @@ describe('UserTaskCloudComponent', () => {
});
it('should allow controlling [open next task] checkbox visibility', () => {
if (!component.nextTaskCheckboxForFormsActivated) {
expect(true).toBeTrue();
return;
}
taskDetails.formKey = 'form';
component.getTaskType();
component.taskId = 'taskId';
@@ -556,6 +561,11 @@ describe('UserTaskCloudComponent', () => {
});
it('should allow controlling [open next task] checkbox value', async () => {
if (!component.nextTaskCheckboxForFormsActivated) {
expect(true).toBeTrue();
return;
}
taskDetails.formKey = 'form';
component.getTaskType();
@@ -584,6 +594,11 @@ describe('UserTaskCloudComponent', () => {
});
it('should call onNextTaskCheckboxCheckedChanged when the checkbox is checked', async () => {
if (!component.nextTaskCheckboxForFormsActivated) {
expect(true).toBeTrue();
return;
}
taskDetails.formKey = 'form';
component.getTaskType();

View File

@@ -160,6 +160,12 @@ export class UserTaskCloudComponent implements OnInit, OnChanges {
taskType: TaskTypesType;
taskTypeEnum = TaskTypes;
/**
* The `Open next task` feature is currently disabled for forms only.
* See https://hyland.atlassian.net/browse/AAE-34514 for further details.
*/
readonly nextTaskCheckboxForFormsActivated = false;
private taskCloudService: TaskCloudService = inject(TaskCloudService);
private readonly destroyRef = inject(DestroyRef);