Description of problem:
Retrieving of user task comments (method getCommentsByTaskId(Long taskId) in UserTaskServiceImpl) return list of comments without defined sorting. For lot of databases it isn't an issue as they return comments ordered by id, but for example Oracle database return comments with random ordering.
It would be nice to have consist ordering of comments for all databases all the time.
Version-Release number of selected component (if applicable):
Simulated on kie server - test testUserTaskComments() in UserTaskServiceIntegrationTest. If kie server is backed by Oracle database then taskClient.getTaskCommentsByTaskId returns comments in random order - tests count with it so they will pass all the time.
Steps to Reproduce:
Comments are returned in random order.
Comments has consistent order all the time for all databases.
Created PR with fix proposal: https://github.com/droolsjbpm/jbpm/pull/322
PR merged into master and 6.3.x
Verified in 6.2.0 CR1