Skip to content

Incorrect backend request in Workflow Statistics page #121

@jorgeltd

Description

@jorgeltd

Describe the bug
Version: 2024.02.01

The workflow statistics page has two tables (Workflow steps performed, Current workflows) that are not being presented with data because the front end is making requests to a bad defined backend endpoint.

To Reproduce
Steps to reproduce the behavior:

  1. Login into DSpace as Admin
  2. Open browser network monitor
  3. Go to workflows statistics
  4. Inside network monitor will appear two requests with a 404 status code.
    /server/api/config/workflowSteps/search/byDateRange
    /server/api/config/workflowSteps/search/current

Expected behavior
The service that makes this request is this file and has a string that defines the endpoint to ask as "workflowSteps"

export class WorkflowStepStatisticsDataService extends IdentifiableDataService<WorkflowStepStatistics> {
protected linkPath = 'workflowSteps';
private searchData: SearchDataImpl<WorkflowStepStatistics>;
constructor(
protected requestService: RequestService,
protected rdbService: RemoteDataBuildService,
protected objectCache: ObjectCacheService,
protected halService: HALEndpointService,
) {
super('workflowSteps', requestService, rdbService, objectCache, halService);
this.searchData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
}

But the name of the endpoint seems to be defined here and says is "wfSteps"
https://github.com/4Science/DSpace/blob/56796f9453dfcc65628d7a9e7f13054367ca65cb/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/WorkflowStepStatisticsRest.java#L23-L27

The frontend should use "wfSteps" to retrieve the statistics

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions