{"action":"created","comment":{"url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/comments/232240092","pull_request_review_id":173393673,"id":232240092,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjI0MDA5Mg==","diff_hunk":"@@ -115,8 +115,8 @@ public async Task<IEnumerable<ContentItem>> GetAsync(IEnumerable<string> content\n             {\n                 contentItems[i] = await LoadAsync(contentItems[i]);\n             }\n-            \n-            return contentItems;\n+\n+            return contentItems.OrderBy(c => contentItemIds.ToList().IndexOf(c.ContentItemId));","path":"src/OrchardCore/OrchardCore.ContentManagement/DefaultContentManager.cs","position":7,"original_position":7,"commit_id":"c268e3479d60b53225c831a4d229935a4dad7441","original_commit_id":"c268e3479d60b53225c831a4d229935a4dad7441","user":{"login":"jameshawkins","id":1388327,"node_id":"MDQ6VXNlcjEzODgzMjc=","avatar_url":"https://avatars3.githubusercontent.com/u/1388327?v=4","gravatar_id":"","url":"https://api.github.com/users/jameshawkins","html_url":"https://github.com/jameshawkins","followers_url":"https://api.github.com/users/jameshawkins/followers","following_url":"https://api.github.com/users/jameshawkins/following{/other_user}","gists_url":"https://api.github.com/users/jameshawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/jameshawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameshawkins/subscriptions","organizations_url":"https://api.github.com/users/jameshawkins/orgs","repos_url":"https://api.github.com/users/jameshawkins/repos","events_url":"https://api.github.com/users/jameshawkins/events{/privacy}","received_events_url":"https://api.github.com/users/jameshawkins/received_events","type":"User","site_admin":false},"body":"I tested it via the `content_item_id` liquid filter which calls that method. Easy to repro:\r\n\r\n1. Setup new site with blog recipe\r\n2. Grab a couple of content item ids and note the associated document id\r\n3. Add a liquid page with the following, listing the content item ids in an order other than by document id ascending:\r\n```\r\n{% assign itemIds = \"4bfjky93de72k7qtpezeennwxv,405rvh88sz0972f788yjckce5c\" | split: ',' %}\r\n{% assign items = itemIds | content_item_id %}\r\n{% for item in items %}\r\n<div>\r\n\t{{ item.ContentItem.ContentItemId }}\r\n</div>\r\n{% endfor %}\r\n```\r\n4. The results are listed in order by document id rather than the order specified.\r\n\r\nMaybe it can be fixed in yessql too?","created_at":"2018-11-09T12:42:43Z","updated_at":"2018-11-09T12:42:44Z","html_url":"https://github.com/OrchardCMS/OrchardCore/pull/2652#discussion_r232240092","pull_request_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/comments/232240092"},"html":{"href":"https://github.com/OrchardCMS/OrchardCore/pull/2652#discussion_r232240092"},"pull_request":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652"}},"in_reply_to_id":232090436},"pull_request":{"url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652","id":229530134,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTMwMTM0","html_url":"https://github.com/OrchardCMS/OrchardCore/pull/2652","diff_url":"https://github.com/OrchardCMS/OrchardCore/pull/2652.diff","patch_url":"https://github.com/OrchardCMS/OrchardCore/pull/2652.patch","issue_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues/2652","number":2652,"state":"open","locked":false,"title":"Preserve Document Order","user":{"login":"jameshawkins","id":1388327,"node_id":"MDQ6VXNlcjEzODgzMjc=","avatar_url":"https://avatars3.githubusercontent.com/u/1388327?v=4","gravatar_id":"","url":"https://api.github.com/users/jameshawkins","html_url":"https://github.com/jameshawkins","followers_url":"https://api.github.com/users/jameshawkins/followers","following_url":"https://api.github.com/users/jameshawkins/following{/other_user}","gists_url":"https://api.github.com/users/jameshawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/jameshawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameshawkins/subscriptions","organizations_url":"https://api.github.com/users/jameshawkins/orgs","repos_url":"https://api.github.com/users/jameshawkins/repos","events_url":"https://api.github.com/users/jameshawkins/events{/privacy}","received_events_url":"https://api.github.com/users/jameshawkins/received_events","type":"User","site_admin":false},"body":"Fixes #2651 ","created_at":"2018-11-08T22:31:09Z","updated_at":"2018-11-09T12:42:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec5ab6789389c0879fbc5094d08fc77f7f325d1b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652/commits","review_comments_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652/comments","review_comment_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues/2652/comments","statuses_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/statuses/c268e3479d60b53225c831a4d229935a4dad7441","head":{"label":"jameshawkins:fix/queries-document-order","ref":"fix/queries-document-order","sha":"c268e3479d60b53225c831a4d229935a4dad7441","user":{"login":"jameshawkins","id":1388327,"node_id":"MDQ6VXNlcjEzODgzMjc=","avatar_url":"https://avatars3.githubusercontent.com/u/1388327?v=4","gravatar_id":"","url":"https://api.github.com/users/jameshawkins","html_url":"https://github.com/jameshawkins","followers_url":"https://api.github.com/users/jameshawkins/followers","following_url":"https://api.github.com/users/jameshawkins/following{/other_user}","gists_url":"https://api.github.com/users/jameshawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/jameshawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameshawkins/subscriptions","organizations_url":"https://api.github.com/users/jameshawkins/orgs","repos_url":"https://api.github.com/users/jameshawkins/repos","events_url":"https://api.github.com/users/jameshawkins/events{/privacy}","received_events_url":"https://api.github.com/users/jameshawkins/received_events","type":"User","site_admin":false},"repo":{"id":116842421,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY4NDI0MjE=","name":"OrchardCore","full_name":"jameshawkins/OrchardCore","private":false,"owner":{"login":"jameshawkins","id":1388327,"node_id":"MDQ6VXNlcjEzODgzMjc=","avatar_url":"https://avatars3.githubusercontent.com/u/1388327?v=4","gravatar_id":"","url":"https://api.github.com/users/jameshawkins","html_url":"https://github.com/jameshawkins","followers_url":"https://api.github.com/users/jameshawkins/followers","following_url":"https://api.github.com/users/jameshawkins/following{/other_user}","gists_url":"https://api.github.com/users/jameshawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/jameshawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameshawkins/subscriptions","organizations_url":"https://api.github.com/users/jameshawkins/orgs","repos_url":"https://api.github.com/users/jameshawkins/repos","events_url":"https://api.github.com/users/jameshawkins/events{/privacy}","received_events_url":"https://api.github.com/users/jameshawkins/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jameshawkins/OrchardCore","description":"Orchard Core is an open-source modular and extensible application framework built with ASP.NET Core, and a content management system (CMS) built on top of that application framework.","fork":true,"url":"https://api.github.com/repos/jameshawkins/OrchardCore","forks_url":"https://api.github.com/repos/jameshawkins/OrchardCore/forks","keys_url":"https://api.github.com/repos/jameshawkins/OrchardCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jameshawkins/OrchardCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jameshawkins/OrchardCore/teams","hooks_url":"https://api.github.com/repos/jameshawkins/OrchardCore/hooks","issue_events_url":"https://api.github.com/repos/jameshawkins/OrchardCore/issues/events{/number}","events_url":"https://api.github.com/repos/jameshawkins/OrchardCore/events","assignees_url":"https://api.github.com/repos/jameshawkins/OrchardCore/assignees{/user}","branches_url":"https://api.github.com/repos/jameshawkins/OrchardCore/branches{/branch}","tags_url":"https://api.github.com/repos/jameshawkins/OrchardCore/tags","blobs_url":"https://api.github.com/repos/jameshawkins/OrchardCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jameshawkins/OrchardCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jameshawkins/OrchardCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/jameshawkins/OrchardCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jameshawkins/OrchardCore/statuses/{sha}","languages_url":"https://api.github.com/repos/jameshawkins/OrchardCore/languages","stargazers_url":"https://api.github.com/repos/jameshawkins/OrchardCore/stargazers","contributors_url":"https://api.github.com/repos/jameshawkins/OrchardCore/contributors","subscribers_url":"https://api.github.com/repos/jameshawkins/OrchardCore/subscribers","subscription_url":"https://api.github.com/repos/jameshawkins/OrchardCore/subscription","commits_url":"https://api.github.com/repos/jameshawkins/OrchardCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/jameshawkins/OrchardCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/jameshawkins/OrchardCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/jameshawkins/OrchardCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/jameshawkins/OrchardCore/contents/{+path}","compare_url":"https://api.github.com/repos/jameshawkins/OrchardCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jameshawkins/OrchardCore/merges","archive_url":"https://api.github.com/repos/jameshawkins/OrchardCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jameshawkins/OrchardCore/downloads","issues_url":"https://api.github.com/repos/jameshawkins/OrchardCore/issues{/number}","pulls_url":"https://api.github.com/repos/jameshawkins/OrchardCore/pulls{/number}","milestones_url":"https://api.github.com/repos/jameshawkins/OrchardCore/milestones{/number}","notifications_url":"https://api.github.com/repos/jameshawkins/OrchardCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jameshawkins/OrchardCore/labels{/name}","releases_url":"https://api.github.com/repos/jameshawkins/OrchardCore/releases{/id}","deployments_url":"https://api.github.com/repos/jameshawkins/OrchardCore/deployments","created_at":"2018-01-09T16:39:55Z","updated_at":"2018-11-08T21:09:13Z","pushed_at":"2018-11-08T22:30:05Z","git_url":"git://github.com/jameshawkins/OrchardCore.git","ssh_url":"git@github.com:jameshawkins/OrchardCore.git","clone_url":"https://github.com/jameshawkins/OrchardCore.git","svn_url":"https://github.com/jameshawkins/OrchardCore","homepage":"http://www.orchardproject.net/","size":62298,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"OrchardCMS:dev","ref":"dev","sha":"b0c72e8042d56145388e21d97e2b8d3e132585fb","user":{"login":"OrchardCMS","id":1159247,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNTkyNDc=","avatar_url":"https://avatars2.githubusercontent.com/u/1159247?v=4","gravatar_id":"","url":"https://api.github.com/users/OrchardCMS","html_url":"https://github.com/OrchardCMS","followers_url":"https://api.github.com/users/OrchardCMS/followers","following_url":"https://api.github.com/users/OrchardCMS/following{/other_user}","gists_url":"https://api.github.com/users/OrchardCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/OrchardCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrchardCMS/subscriptions","organizations_url":"https://api.github.com/users/OrchardCMS/orgs","repos_url":"https://api.github.com/users/OrchardCMS/repos","events_url":"https://api.github.com/users/OrchardCMS/events{/privacy}","received_events_url":"https://api.github.com/users/OrchardCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":26884725,"node_id":"MDEwOlJlcG9zaXRvcnkyNjg4NDcyNQ==","name":"OrchardCore","full_name":"OrchardCMS/OrchardCore","private":false,"owner":{"login":"OrchardCMS","id":1159247,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNTkyNDc=","avatar_url":"https://avatars2.githubusercontent.com/u/1159247?v=4","gravatar_id":"","url":"https://api.github.com/users/OrchardCMS","html_url":"https://github.com/OrchardCMS","followers_url":"https://api.github.com/users/OrchardCMS/followers","following_url":"https://api.github.com/users/OrchardCMS/following{/other_user}","gists_url":"https://api.github.com/users/OrchardCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/OrchardCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrchardCMS/subscriptions","organizations_url":"https://api.github.com/users/OrchardCMS/orgs","repos_url":"https://api.github.com/users/OrchardCMS/repos","events_url":"https://api.github.com/users/OrchardCMS/events{/privacy}","received_events_url":"https://api.github.com/users/OrchardCMS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OrchardCMS/OrchardCore","description":"Orchard Core is an open-source modular and extensible application framework built with ASP.NET Core, and a content management system (CMS) built on top of that application framework.","fork":false,"url":"https://api.github.com/repos/OrchardCMS/OrchardCore","forks_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/forks","keys_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/teams","hooks_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/hooks","issue_events_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues/events{/number}","events_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/events","assignees_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/assignees{/user}","branches_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/branches{/branch}","tags_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/tags","blobs_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/statuses/{sha}","languages_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/languages","stargazers_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/stargazers","contributors_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/contributors","subscribers_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/subscribers","subscription_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/subscription","commits_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/contents/{+path}","compare_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/merges","archive_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/downloads","issues_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues{/number}","pulls_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls{/number}","milestones_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/milestones{/number}","notifications_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/labels{/name}","releases_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/releases{/id}","deployments_url":"https://api.github.com/repos/OrchardCMS/OrchardCore/deployments","created_at":"2014-11-19T22:29:26Z","updated_at":"2018-11-09T08:16:45Z","pushed_at":"2018-11-09T09:42:19Z","git_url":"git://github.com/OrchardCMS/OrchardCore.git","ssh_url":"git@github.com:OrchardCMS/OrchardCore.git","clone_url":"https://github.com/OrchardCMS/OrchardCore.git","svn_url":"https://github.com/OrchardCMS/OrchardCore","homepage":"http://www.orchardproject.net/","size":45281,"stargazers_count":2177,"watchers_count":2177,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":766,"mirror_url":null,"archived":false,"open_issues_count":411,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":766,"open_issues":411,"watchers":2177,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652"},"html":{"href":"https://github.com/OrchardCMS/OrchardCore/pull/2652"},"issue":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues/2652"},"comments":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/issues/2652/comments"},"review_comments":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652/comments"},"review_comment":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/pulls/2652/commits"},"statuses":{"href":"https://api.github.com/repos/OrchardCMS/OrchardCore/statuses/c268e3479d60b53225c831a4d229935a4dad7441"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jameshawkins"}}