Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2.5
-
None
Description
The issue is the following:
getRequestsByTaskStatus behaves correctly and returns the latest N requests. Note that the N requests have M (M >> N) tasks.
Then the call to findByRequestIds gets oldest N tasks where the requestId for tasks belong to the list returned by the first call. So instead of getting M tasks we only get N tasks that too N oldest tasks which are returned. As a result the call never returns that latest request/tasks.
The fix is to drop the filter done by the calls findByRequestIds and findByRequestAndTaskIds. Filter should only be applied on the number of requests to be returned.