{"action":"closed","number":290,"pull_request":{"url":"https://api.github.com/repos/orionjs/orion/pulls/290","id":43912333,"html_url":"https://github.com/orionjs/orion/pull/290","diff_url":"https://github.com/orionjs/orion/pull/290.diff","patch_url":"https://github.com/orionjs/orion/pull/290.patch","issue_url":"https://api.github.com/repos/orionjs/orion/issues/290","number":290,"state":"closed","locked":false,"title":"Allow sortFields options to define sorting of selectable values","user":{"login":"TomFreudenberg","id":410087,"avatar_url":"https://avatars.githubusercontent.com/u/410087?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFreudenberg","html_url":"https://github.com/TomFreudenberg","followers_url":"https://api.github.com/users/TomFreudenberg/followers","following_url":"https://api.github.com/users/TomFreudenberg/following{/other_user}","gists_url":"https://api.github.com/users/TomFreudenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFreudenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFreudenberg/subscriptions","organizations_url":"https://api.github.com/users/TomFreudenberg/orgs","repos_url":"https://api.github.com/users/TomFreudenberg/repos","events_url":"https://api.github.com/users/TomFreudenberg/events{/privacy}","received_events_url":"https://api.github.com/users/TomFreudenberg/received_events","type":"User","site_admin":false},"body":"Hi, as described on forum\r\n\r\nhttp://forums.orionjs.org/t/solved-sort-of-relation-collection/116\r\n\r\nthis PR will allow to define sorting of relations.\r\n\r\nAs I checked on selectize, I made some changes to relationships.js and attributes.js to enable a new property called\r\n\r\nsortFields\r\n\r\nUsage\r\n\r\n````\r\nsortFields: [ 'your_field_name', 'second_field_name' ]\r\n````\r\n\r\nThis will sort ascending\r\n\r\n````\r\nsortFields: { 'your_field_name': 'desc', 'second_field_name': 'asc' }\r\n````\r\n\r\nSo you can choose for sort order\r\n\r\n","created_at":"2015-09-01T18:51:40Z","updated_at":"2015-09-01T19:09:42Z","closed_at":"2015-09-01T19:09:42Z","merged_at":"2015-09-01T19:09:42Z","merge_commit_sha":"160cb18150f9cf9e712c28cc7c602e22f50009e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/orionjs/orion/pulls/290/commits","review_comments_url":"https://api.github.com/repos/orionjs/orion/pulls/290/comments","review_comment_url":"https://api.github.com/repos/orionjs/orion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orionjs/orion/issues/290/comments","statuses_url":"https://api.github.com/repos/orionjs/orion/statuses/cc648dd79ff138f049efcea985c78e74e04b7fbc","head":{"label":"TomFreudenberg:master-feature-relations-sortfields","ref":"master-feature-relations-sortfields","sha":"cc648dd79ff138f049efcea985c78e74e04b7fbc","user":{"login":"TomFreudenberg","id":410087,"avatar_url":"https://avatars.githubusercontent.com/u/410087?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFreudenberg","html_url":"https://github.com/TomFreudenberg","followers_url":"https://api.github.com/users/TomFreudenberg/followers","following_url":"https://api.github.com/users/TomFreudenberg/following{/other_user}","gists_url":"https://api.github.com/users/TomFreudenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFreudenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFreudenberg/subscriptions","organizations_url":"https://api.github.com/users/TomFreudenberg/orgs","repos_url":"https://api.github.com/users/TomFreudenberg/repos","events_url":"https://api.github.com/users/TomFreudenberg/events{/privacy}","received_events_url":"https://api.github.com/users/TomFreudenberg/received_events","type":"User","site_admin":false},"repo":{"id":41756152,"name":"orion","full_name":"TomFreudenberg/orion","owner":{"login":"TomFreudenberg","id":410087,"avatar_url":"https://avatars.githubusercontent.com/u/410087?v=3","gravatar_id":"","url":"https://api.github.com/users/TomFreudenberg","html_url":"https://github.com/TomFreudenberg","followers_url":"https://api.github.com/users/TomFreudenberg/followers","following_url":"https://api.github.com/users/TomFreudenberg/following{/other_user}","gists_url":"https://api.github.com/users/TomFreudenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/TomFreudenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomFreudenberg/subscriptions","organizations_url":"https://api.github.com/users/TomFreudenberg/orgs","repos_url":"https://api.github.com/users/TomFreudenberg/repos","events_url":"https://api.github.com/users/TomFreudenberg/events{/privacy}","received_events_url":"https://api.github.com/users/TomFreudenberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomFreudenberg/orion","description":"Orion is a simple and powerful CMS for meteor that allows you to build simple or complex websites with powerful admin panels in minutes","fork":true,"url":"https://api.github.com/repos/TomFreudenberg/orion","forks_url":"https://api.github.com/repos/TomFreudenberg/orion/forks","keys_url":"https://api.github.com/repos/TomFreudenberg/orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomFreudenberg/orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomFreudenberg/orion/teams","hooks_url":"https://api.github.com/repos/TomFreudenberg/orion/hooks","issue_events_url":"https://api.github.com/repos/TomFreudenberg/orion/issues/events{/number}","events_url":"https://api.github.com/repos/TomFreudenberg/orion/events","assignees_url":"https://api.github.com/repos/TomFreudenberg/orion/assignees{/user}","branches_url":"https://api.github.com/repos/TomFreudenberg/orion/branches{/branch}","tags_url":"https://api.github.com/repos/TomFreudenberg/orion/tags","blobs_url":"https://api.github.com/repos/TomFreudenberg/orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomFreudenberg/orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomFreudenberg/orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomFreudenberg/orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomFreudenberg/orion/statuses/{sha}","languages_url":"https://api.github.com/repos/TomFreudenberg/orion/languages","stargazers_url":"https://api.github.com/repos/TomFreudenberg/orion/stargazers","contributors_url":"https://api.github.com/repos/TomFreudenberg/orion/contributors","subscribers_url":"https://api.github.com/repos/TomFreudenberg/orion/subscribers","subscription_url":"https://api.github.com/repos/TomFreudenberg/orion/subscription","commits_url":"https://api.github.com/repos/TomFreudenberg/orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomFreudenberg/orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomFreudenberg/orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomFreudenberg/orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomFreudenberg/orion/contents/{+path}","compare_url":"https://api.github.com/repos/TomFreudenberg/orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomFreudenberg/orion/merges","archive_url":"https://api.github.com/repos/TomFreudenberg/orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomFreudenberg/orion/downloads","issues_url":"https://api.github.com/repos/TomFreudenberg/orion/issues{/number}","pulls_url":"https://api.github.com/repos/TomFreudenberg/orion/pulls{/number}","milestones_url":"https://api.github.com/repos/TomFreudenberg/orion/milestones{/number}","notifications_url":"https://api.github.com/repos/TomFreudenberg/orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomFreudenberg/orion/labels{/name}","releases_url":"https://api.github.com/repos/TomFreudenberg/orion/releases{/id}","created_at":"2015-09-01T18:34:48Z","updated_at":"2015-09-01T18:34:48Z","pushed_at":"2015-09-01T18:49:35Z","git_url":"git://github.com/TomFreudenberg/orion.git","ssh_url":"git@github.com:TomFreudenberg/orion.git","clone_url":"https://github.com/TomFreudenberg/orion.git","svn_url":"https://github.com/TomFreudenberg/orion","homepage":"http://orionjs.org","size":4344,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"orionjs:master","ref":"master","sha":"5739d42439be37e55424eff77721c10995a258fc","user":{"login":"orionjs","id":9722061,"avatar_url":"https://avatars.githubusercontent.com/u/9722061?v=3","gravatar_id":"","url":"https://api.github.com/users/orionjs","html_url":"https://github.com/orionjs","followers_url":"https://api.github.com/users/orionjs/followers","following_url":"https://api.github.com/users/orionjs/following{/other_user}","gists_url":"https://api.github.com/users/orionjs/gists{/gist_id}","starred_url":"https://api.github.com/users/orionjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orionjs/subscriptions","organizations_url":"https://api.github.com/users/orionjs/orgs","repos_url":"https://api.github.com/users/orionjs/repos","events_url":"https://api.github.com/users/orionjs/events{/privacy}","received_events_url":"https://api.github.com/users/orionjs/received_events","type":"Organization","site_admin":false},"repo":{"id":26445130,"name":"orion","full_name":"orionjs/orion","owner":{"login":"orionjs","id":9722061,"avatar_url":"https://avatars.githubusercontent.com/u/9722061?v=3","gravatar_id":"","url":"https://api.github.com/users/orionjs","html_url":"https://github.com/orionjs","followers_url":"https://api.github.com/users/orionjs/followers","following_url":"https://api.github.com/users/orionjs/following{/other_user}","gists_url":"https://api.github.com/users/orionjs/gists{/gist_id}","starred_url":"https://api.github.com/users/orionjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orionjs/subscriptions","organizations_url":"https://api.github.com/users/orionjs/orgs","repos_url":"https://api.github.com/users/orionjs/repos","events_url":"https://api.github.com/users/orionjs/events{/privacy}","received_events_url":"https://api.github.com/users/orionjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orionjs/orion","description":"Orion is a simple and powerful CMS for meteor that allows you to build simple or complex websites with powerful admin panels in minutes","fork":false,"url":"https://api.github.com/repos/orionjs/orion","forks_url":"https://api.github.com/repos/orionjs/orion/forks","keys_url":"https://api.github.com/repos/orionjs/orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orionjs/orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orionjs/orion/teams","hooks_url":"https://api.github.com/repos/orionjs/orion/hooks","issue_events_url":"https://api.github.com/repos/orionjs/orion/issues/events{/number}","events_url":"https://api.github.com/repos/orionjs/orion/events","assignees_url":"https://api.github.com/repos/orionjs/orion/assignees{/user}","branches_url":"https://api.github.com/repos/orionjs/orion/branches{/branch}","tags_url":"https://api.github.com/repos/orionjs/orion/tags","blobs_url":"https://api.github.com/repos/orionjs/orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orionjs/orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orionjs/orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/orionjs/orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orionjs/orion/statuses/{sha}","languages_url":"https://api.github.com/repos/orionjs/orion/languages","stargazers_url":"https://api.github.com/repos/orionjs/orion/stargazers","contributors_url":"https://api.github.com/repos/orionjs/orion/contributors","subscribers_url":"https://api.github.com/repos/orionjs/orion/subscribers","subscription_url":"https://api.github.com/repos/orionjs/orion/subscription","commits_url":"https://api.github.com/repos/orionjs/orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/orionjs/orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/orionjs/orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/orionjs/orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/orionjs/orion/contents/{+path}","compare_url":"https://api.github.com/repos/orionjs/orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orionjs/orion/merges","archive_url":"https://api.github.com/repos/orionjs/orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orionjs/orion/downloads","issues_url":"https://api.github.com/repos/orionjs/orion/issues{/number}","pulls_url":"https://api.github.com/repos/orionjs/orion/pulls{/number}","milestones_url":"https://api.github.com/repos/orionjs/orion/milestones{/number}","notifications_url":"https://api.github.com/repos/orionjs/orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orionjs/orion/labels{/name}","releases_url":"https://api.github.com/repos/orionjs/orion/releases{/id}","created_at":"2014-11-10T16:36:24Z","updated_at":"2015-09-01T03:43:17Z","pushed_at":"2015-09-01T19:09:42Z","git_url":"git://github.com/orionjs/orion.git","ssh_url":"git@github.com:orionjs/orion.git","clone_url":"https://github.com/orionjs/orion.git","svn_url":"https://github.com/orionjs/orion","homepage":"http://orionjs.org","size":4344,"stargazers_count":407,"watchers_count":407,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":32,"forks":76,"open_issues":32,"watchers":407,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orionjs/orion/pulls/290"},"html":{"href":"https://github.com/orionjs/orion/pull/290"},"issue":{"href":"https://api.github.com/repos/orionjs/orion/issues/290"},"comments":{"href":"https://api.github.com/repos/orionjs/orion/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/orionjs/orion/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/orionjs/orion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orionjs/orion/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/orionjs/orion/statuses/cc648dd79ff138f049efcea985c78e74e04b7fbc"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"nicolaslopezj","id":2042567,"avatar_url":"https://avatars.githubusercontent.com/u/2042567?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaslopezj","html_url":"https://github.com/nicolaslopezj","followers_url":"https://api.github.com/users/nicolaslopezj/followers","following_url":"https://api.github.com/users/nicolaslopezj/following{/other_user}","gists_url":"https://api.github.com/users/nicolaslopezj/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaslopezj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaslopezj/subscriptions","organizations_url":"https://api.github.com/users/nicolaslopezj/orgs","repos_url":"https://api.github.com/users/nicolaslopezj/repos","events_url":"https://api.github.com/users/nicolaslopezj/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaslopezj/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":11,"deletions":0,"changed_files":2}}