We have moved to GitHub Issues
Created by Matt Cheale 02 Sep 2016, 13:45:17 Updated by Sebastiaan Janssen 20 Feb 2017, 13:53:22Tags: PR
Relates to: U4-8788
What did you do? Attempted to use contentResource.sort()
What did you expect to happen? Relevant nodes to have their SortOrder values updated according to the order of the idSortOrder.
What actually happened? Relevant nodes have their SortOrder updated but in the default order they come out the database.
The logic would appear to retrieve all the content from ContentService.GetByIds() but this doesn't ensure the returned order is equal to the order of the passed in parameter. I'll be submitting a pull request shortly once I have an issue number.
@Shandem it seems that the real issue is U4-8788 - should content service GetByIds return the items in the same order as the ids? should we sort in the controller or in the service (I'm not sure... in most cases we don't need to sort, so service might be overkill).
My gut feeling is that the service is overkill and that the heavy work is best kept in the write process.
Note: we'll fix GetByIds to return the items in the same order as the ids?
Issue U4-8788 has been fixed and now the content service respect the IDs order in GetById, and so this issue is considered fixed as well.
Backwards Compatible: True
Fix Submitted: Pull request
Affected versions: 7.5.1, 7.5.2
Due in version: 7.5.5
Sprint: Sprint 43