[AAE-27160] Fix the structure of data returned from service-tasks API (#10711)

This commit is contained in:
Stephen Donnell 2025-03-14 14:22:24 -05:00 committed by GitHub
parent 5912423f96
commit d5bd97e3d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 34 additions and 33 deletions

View File

@ -230,7 +230,7 @@ describe('ServiceTaskListCloudComponent', () => {
describe('component changes', () => {
beforeEach(() => {
component.rows = fakeServiceTask.list.entries;
component.rows = fakeServiceTask.list.entries.map((task) => task.entry);
fixture.detectChanges();
});

View File

@ -87,7 +87,7 @@ export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent {
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(
([tasks]) => {
this.rows = tasks.list.entries;
this.rows = tasks.list.entries.map((task) => task.entry);
this.success.emit(tasks);
this.pagination.next(tasks.list.pagination);
this.isReloadingSubject$.next(false);

View File

@ -51,22 +51,24 @@ export const fakeServiceTask = {
list: {
entries: [
{
activityType: 'serviceTask',
activityName: 'serviceTaskName',
appName: 'simpleapp',
completedDate: '2020-09-22T16:03:37.482+0000',
elementId: 'ServiceTask_0lszm0x',
executionId: '2023b099-fced-11ea-b116-62141048995a',
id: '04fdf69f-4ddd-48ab-9563-da776c9b163c',
processDefinitionId: 'Process_24rkVVSR:1:0db78dcd-fc14-11ea-bce0-62141048995a',
processDefinitionKey: 'Process_24rkVVSR',
processDefinitionVersion: 1,
processInstanceId: '2023b097-fced-11ea-b116-62141048995a',
serviceFullName: 'simpleapp-rb',
serviceName: 'simpleapp-rb',
serviceVersion: '',
startedDate: '2020-09-22T16:03:37.444+0000',
status: 'COMPLETED'
entry: {
activityType: 'serviceTask',
activityName: 'serviceTaskName',
appName: 'simpleapp',
completedDate: '2020-09-22T16:03:37.482+0000',
elementId: 'ServiceTask_0lszm0x',
executionId: '2023b099-fced-11ea-b116-62141048995a',
id: '04fdf69f-4ddd-48ab-9563-da776c9b163c',
processDefinitionId: 'Process_24rkVVSR:1:0db78dcd-fc14-11ea-bce0-62141048995a',
processDefinitionKey: 'Process_24rkVVSR',
processDefinitionVersion: 1,
processInstanceId: '2023b097-fced-11ea-b116-62141048995a',
serviceFullName: 'simpleapp-rb',
serviceName: 'simpleapp-rb',
serviceVersion: '',
startedDate: '2020-09-22T16:03:37.444+0000',
status: 'COMPLETED'
}
}
],
pagination: {
@ -79,18 +81,17 @@ export const fakeServiceTask = {
}
};
export const fakeCustomSchema =
[
new ObjectDataColumn<ProcessListDataColumnCustomData>({
key: 'fakeName',
type: 'text',
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
sortable: true
}),
new ObjectDataColumn<ProcessListDataColumnCustomData>({
key: 'fakeTaskName',
type: 'text',
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
sortable: true
})
];
export const fakeCustomSchema = [
new ObjectDataColumn<ProcessListDataColumnCustomData>({
key: 'fakeName',
type: 'text',
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
sortable: true
}),
new ObjectDataColumn<ProcessListDataColumnCustomData>({
key: 'fakeTaskName',
type: 'text',
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
sortable: true
})
];