Commit 17dcba92 authored by abirembaut's avatar abirembaut Committed by julienmege

fix(admin case list) all versions filter (#504)

* fix(admin case list) all versions filter

- all versions filter wasn't working on processes with a display name different from their name because the filter in the REST API call was set as name=<display name> instead of displayName=<display name>

Covers [BPO-202](https://bonitasoft.atlassian.net/browse/BPO-202)

* fix (cases lists) Case list refresh generate same request twice

- fix e2e tests

Covers [BS-19310](https://bonitasoft.atlassian.net/browse/BS-19310)
parent 0269e620
......@@ -252,7 +252,7 @@
if ($scope.selectedFilters.selectedProcessDefinition) {
filters.push('processDefinitionId=' + $scope.selectedFilters.selectedProcessDefinition);
} else if ($scope.selectedFilters.selectedApp && $scope.selectedFilters.selectedApp !== defaultFilters.appName) {
filters.push('name=' + $scope.selectedFilters.selectedApp);
filters.push('displayName=' + $scope.selectedFilters.selectedApp);
}
if ($scope.selectedFilters.selectedStatus && $scope.selectedFilters.selectedStatus !== defaultFilters.caseStatus) {
filters.push('state=' + $scope.selectedFilters.selectedStatus);
......
......@@ -125,7 +125,7 @@
when('GET', /^\/API\/bpm\/case\?c=.*&d=processDefinitionId&d=started_by&d=startedBySubstitute&n=activeFlowNodes&n=failedFlowNodes&o=id\+DESC&p=.*$/).respond(require('./admin/cases/list/cases-list-320-desc-mocks.json'));
when('GET', /^\/API\/bpm\/case\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&n=activeFlowNodes&n=failedFlowNodes&o=startDate\+ASC&p=0&s=$/).respond(require('./admin/cases/list/cases-list-28-mocks-ordered-by-date.json'));
when('GET', /^\/API\/bpm\/case\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&n=activeFlowNodes&n=failedFlowNodes&o=startDate\+DESC&p=0&s=$/).respond(require('./admin/cases/list/cases-list-28-mocks-ordered-by-date-desc.json'));
when('GET', /^\/API\/bpm\/case\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=name%3DPoule&n=activeFlowNodes&n=failedFlowNodes&o=id\+DESC&p=0&s=$/).respond(require('./admin/cases/list/cases-list-28-mocks-filtered-by-poule-app-name.json'));
when('GET', /^\/API\/bpm\/case\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=displayName%3DPoule&n=activeFlowNodes&n=failedFlowNodes&o=id\+DESC&p=0&s=$/).respond(require('./admin/cases/list/cases-list-28-mocks-filtered-by-poule-app-name.json'));
when('GET', /^\/API\/bpm\/case\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=processDefinitionId%3D4910683075061293406&n=activeFlowNodes&n=failedFlowNodes&o=id\+DESC&p=0&s=$/).respond(require('./admin/cases/list/cases-list-28-mocks-filtered-by-processx-id.json'));
when('GET', /^\/API\/bpm\/case\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=processDefinitionId%3D8967858817451251940&n=activeFlowNodes&n=failedFlowNodes&o=id\+DESC&p=0&s=$/).respond(require('./admin/cases/list/cases-list-28-mocks-filtered-by-poule-2.0-app.json'));
......@@ -140,7 +140,7 @@
when('GET', /^\/API\/bpm\/archivedCase\?c=.*&d=processDefinitionId&d=started_by&d=startedBySubstitute&o=sourceObjectId\+DESC&p=.*$/).respond(require('./admin/cases/list/arch-cases-list-320-mocks.json'));
when('GET', /^\/API\/bpm\/archivedCase\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&o=startDate\+ASC&p=0&s=$/).respond(require('./admin/cases/list/arch-cases-list-28-mocks-ordered-by-date.json'));
when('GET', /^\/API\/bpm\/archivedCase\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&o=startDate\+DESC&p=0&s=$/).respond(require('./admin/cases/list/arch-cases-list-28-mocks-ordered-by-date-desc.json'));
when('GET', /^\/API\/bpm\/archivedCase\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=name%3DPoule&o=sourceObjectId\+DESC&p=0&s=$/).respond(require('./admin/cases/list/arch-cases-list-28-mocks-filtered-by-poule-app-name.json'));
when('GET', /^\/API\/bpm\/archivedCase\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=displayName%3DPoule&o=sourceObjectId\+DESC&p=0&s=$/).respond(require('./admin/cases/list/arch-cases-list-28-mocks-filtered-by-poule-app-name.json'));
when('GET', /^\/API\/bpm\/archivedCase\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=processDefinitionId%3D4910683075061293406&o=sourceObjectId\+DESC&p=0&s=$/).respond(require('./admin/cases/list/arch-cases-list-28-mocks-filtered-by-processx-id.json'));
when('GET', /^\/API\/bpm\/archivedCase\?c=25&d=processDefinitionId&d=started_by&d=startedBySubstitute&f=processDefinitionId%3D8967858817451251940&o=sourceObjectId\+DESC&p=0&s=$/).respond(require('./admin/cases/list/arch-cases-list-28-mocks-filtered-by-poule-2.0-app.json'));
......
......@@ -1079,7 +1079,7 @@
var processName = 'Process1';
scope.selectedFilters.selectedApp = processName;
casesCtrl.buildFilters();
expect(scope.searchOptions.filters).toEqual(['name=' + processName]);
expect(scope.searchOptions.filters).toEqual(['displayName=' + processName]);
expect(scope.pagination.currentPage).toBe(1);
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment