diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index a15321732..67f183aa1 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,5 +1,8 @@ ## RELEASE NOTES +### Version 7.0.75-exui-1717-rc1 +**EXUI-1717** add-task-failure-logs + ### Version 7.0.75-exui-2462-rc1 **EXUI-2462** DynamicRadioList incorrectly selects the wrong radio button diff --git a/package.json b/package.json index 7b227dc4c..854dc1649 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hmcts/ccd-case-ui-toolkit", - "version": "7.0.75-exui-2462-rc", + "version": "7.0.75-exui-1717-rc1", "engines": { "node": ">=18.19.0" }, diff --git a/projects/ccd-case-ui-toolkit/package.json b/projects/ccd-case-ui-toolkit/package.json index cb26fbc83..e63ff03c7 100644 --- a/projects/ccd-case-ui-toolkit/package.json +++ b/projects/ccd-case-ui-toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@hmcts/ccd-case-ui-toolkit", - "version": "7.0.75-exui-2462-rc", + "version": "7.0.75-exui-1717-rc1", "engines": { "node": ">=18.19.0" }, diff --git a/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/case-edit/case-edit.component.ts b/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/case-edit/case-edit.component.ts index d6284bf93..4c0f9fb92 100644 --- a/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/case-edit/case-edit.component.ts +++ b/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/case-edit/case-edit.component.ts @@ -401,8 +401,8 @@ export class CaseEditComponent implements OnInit, OnDestroy { const caseField: CaseField = caseFieldsLookup[key]; // If caseField.hidden is NOT truthy and also NOT equal to false, then it must be null/undefined (remember that // both null and undefined are equal to *neither false nor true*) - if (caseField && caseField.retain_hidden_value && - (caseField.hidden || (caseField.hidden !== false && parentField && parentField.hidden))) { + if (caseField?.retain_hidden_value && + (caseField?.hidden || (caseField?.hidden !== false && parentField?.hidden))) { if (caseField.field_type.type === 'Complex') { // Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to // handle both null and undefined values diff --git a/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/event-completion-state-machine.service.ts b/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/event-completion-state-machine.service.ts index 3271052da..99d1114db 100644 --- a/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/event-completion-state-machine.service.ts +++ b/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/event-completion-state-machine.service.ts @@ -83,7 +83,7 @@ export class EventCompletionStateMachineService { const assignNeeded = context.sessionStorageService.getItem('assignNeeded'); context.workAllocationService.getTask(context.task.id).subscribe( taskResponse => { - if (taskResponse && taskResponse.task && taskResponse.task.task_state) { + if (taskResponse?.task?.task_state) { switch (taskResponse.task.task_state.toUpperCase()) { case TaskState.Unassigned: // Task unassigned @@ -115,6 +115,12 @@ export class EventCompletionStateMachineService { state.trigger(EventCompletionStates.CompleteEventAndTask); break; } + } else if (!taskResponse?.task) { + context.alertService.setPreserveAlerts(true); + context.alertService.warning({ phrase: 'Task statecheck : no task available for completion', replacements: {} }); + } else { + context.alertService.setPreserveAlerts(true); + context.alertService.warning({ phrase: 'Task statecheck : no task state available for completion', replacements: {} }); } }, error => { @@ -140,6 +146,8 @@ export class EventCompletionStateMachineService { // just set event can be completed context.component.eventCanBeCompleted.emit(true); } else { + context.alertService.setPreserveAlerts(true); + context.alertService.warning({phrase: 'CompleteEventAndTask : no task available for completion', replacements: {}}); // Emit event cannot be completed event context.component.eventCanBeCompleted.emit(false); } @@ -161,6 +169,8 @@ export class EventCompletionStateMachineService { context.sessionStorageService.setItem('assignNeeded', 'true'); context.component.eventCanBeCompleted.emit(true); } else { + context.alertService.setPreserveAlerts(true); + context.alertService.warning({phrase: 'Unassigned task : no task available for completion', replacements: {}}); // Emit event cannot be completed event context.component.eventCanBeCompleted.emit(false); } diff --git a/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/work-allocation.service.ts b/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/work-allocation.service.ts index 0339548ce..eb8f301c0 100644 --- a/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/work-allocation.service.ts +++ b/projects/ccd-case-ui-toolkit/src/lib/shared/components/case-editor/services/work-allocation.service.ts @@ -105,6 +105,8 @@ export class WorkAllocationService { */ public completeTask(taskId: string, eventName?: string): Observable { if (!this.isWAEnabled()) { + this.alertService.setPreserveAlerts(true); + this.alertService.warning({ phrase:'completeTask: Work Allocation is not enabled, so the task could not be completed. Please complete the task associated with the case manually.'}); return of(null); } this.appConfig.logMessage(`completeTask: completing ${taskId}`); @@ -129,6 +131,8 @@ export class WorkAllocationService { */ public assignAndCompleteTask(taskId: string, eventName?: string): Observable { if (!this.isWAEnabled()) { + this.alertService.setPreserveAlerts(true); + this.alertService.warning({ phrase:'assignAndCompleteTask: Work Allocation is not enabled, so the task could not be completed. Please complete the task associated with the case manually.'}); return of(null); } this.appConfig.logMessage(`assignAndCompleteTask: completing ${taskId}`);