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): BPMS6.2.0ER4 How reproducible: 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: 1. 2. 3. Actual results: Comments are returned in random order. Expected results: Comments has consistent order all the time for all databases. Additional info:
Created PR with fix proposal: https://github.com/droolsjbpm/jbpm/pull/322
PR merged into master and 6.3.x jbpm master: https://github.com/droolsjbpm/jbpm/commit/04b2b02ada03d0097cc9a05b577220dbb1651c35 6.3.x: https://github.com/droolsjbpm/jbpm/commit/52fd20254e38780d89e343237055090572f8d27a
Verified in 6.2.0 CR1