{"action":"created","comment":{"url":"https://api.github.com/repos/ding2/ting/pulls/comments/28772142","id":28772142,"diff_hunk":"@@ -350,9 +350,29 @@ function ting_element_info() {\n       '#input' => TRUE,\n       '#process' => array('ting_ranking_field_element_process'),\n     ),\n+    'ting_sort_default' => array(\n+      '#input' => TRUE,\n+      '#process' => array('ting_sort_default'),\n+    )\n   );\n }\n \n+function ting_sort_default($element, $form_state){\n+  $element['#tree'] = TRUE;\n+\n+  $element['sort_type'] = array(\n+    '#title' => t('Type'),\n+    '#type' => 'select',\n+    '#options' => array(\n+      'rank_frequency' => t('rank_frequency'),\n+      'rank_general' => t('rank_general'),\n+      'rank_none' => t('rank_none'),","path":"ting.module","position":20,"original_position":20,"commit_id":"9ae471738c68f6eda9f8c874b01d1e3797cc126f","original_commit_id":"9ae471738c68f6eda9f8c874b01d1e3797cc126f","user":{"login":"kasperg","id":73966,"avatar_url":"https://avatars.githubusercontent.com/u/73966?v=3","gravatar_id":"","url":"https://api.github.com/users/kasperg","html_url":"https://github.com/kasperg","followers_url":"https://api.github.com/users/kasperg/followers","following_url":"https://api.github.com/users/kasperg/following{/other_user}","gists_url":"https://api.github.com/users/kasperg/gists{/gist_id}","starred_url":"https://api.github.com/users/kasperg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasperg/subscriptions","organizations_url":"https://api.github.com/users/kasperg/orgs","repos_url":"https://api.github.com/users/kasperg/repos","events_url":"https://api.github.com/users/kasperg/events{/privacy}","received_events_url":"https://api.github.com/users/kasperg/received_events","type":"User","site_admin":false},"body":"Could we add a more human friendly label to each option? A description of the field could be nice as well.","created_at":"2015-04-21T12:18:25Z","updated_at":"2015-04-21T12:18:25Z","html_url":"https://github.com/ding2/ting/pull/27#discussion_r28772142","pull_request_url":"https://api.github.com/repos/ding2/ting/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/ding2/ting/pulls/comments/28772142"},"html":{"href":"https://github.com/ding2/ting/pull/27#discussion_r28772142"},"pull_request":{"href":"https://api.github.com/repos/ding2/ting/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/ding2/ting/pulls/27","id":31831807,"html_url":"https://github.com/ding2/ting/pull/27","diff_url":"https://github.com/ding2/ting/pull/27.diff","patch_url":"https://github.com/ding2/ting/pull/27.patch","issue_url":"https://api.github.com/repos/ding2/ting/issues/27","number":27,"state":"open","locked":false,"title":"Issue1113 by Pjohans: Set and use default (best match) sort method from ...","user":{"login":"pjohans","id":953804,"avatar_url":"https://avatars.githubusercontent.com/u/953804?v=3","gravatar_id":"","url":"https://api.github.com/users/pjohans","html_url":"https://github.com/pjohans","followers_url":"https://api.github.com/users/pjohans/followers","following_url":"https://api.github.com/users/pjohans/following{/other_user}","gists_url":"https://api.github.com/users/pjohans/gists{/gist_id}","starred_url":"https://api.github.com/users/pjohans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjohans/subscriptions","organizations_url":"https://api.github.com/users/pjohans/orgs","repos_url":"https://api.github.com/users/pjohans/repos","events_url":"https://api.github.com/users/pjohans/events{/privacy}","received_events_url":"https://api.github.com/users/pjohans/received_events","type":"User","site_admin":false},"body":"...admin/config/ting/ranking\r\n\r\nWhen searching user can select sort-method. If 'best match' is chosen sort parameter is set according to setting in admin/ting/ranking/Default sort method (best match)\r\n\r\nbesides that <rank> is not valid since os.3.1, so it dies here","created_at":"2015-03-24T14:35:44Z","updated_at":"2015-04-21T12:18:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23b3dae06bb26e0de59857b432c2af4c5100ab08","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ding2/ting/pulls/27/commits","review_comments_url":"https://api.github.com/repos/ding2/ting/pulls/27/comments","review_comment_url":"https://api.github.com/repos/ding2/ting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ding2/ting/issues/27/comments","statuses_url":"https://api.github.com/repos/ding2/ting/statuses/9ae471738c68f6eda9f8c874b01d1e3797cc126f","head":{"label":"pjohans:Issue1113","ref":"Issue1113","sha":"9ae471738c68f6eda9f8c874b01d1e3797cc126f","user":{"login":"pjohans","id":953804,"avatar_url":"https://avatars.githubusercontent.com/u/953804?v=3","gravatar_id":"","url":"https://api.github.com/users/pjohans","html_url":"https://github.com/pjohans","followers_url":"https://api.github.com/users/pjohans/followers","following_url":"https://api.github.com/users/pjohans/following{/other_user}","gists_url":"https://api.github.com/users/pjohans/gists{/gist_id}","starred_url":"https://api.github.com/users/pjohans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjohans/subscriptions","organizations_url":"https://api.github.com/users/pjohans/orgs","repos_url":"https://api.github.com/users/pjohans/repos","events_url":"https://api.github.com/users/pjohans/events{/privacy}","received_events_url":"https://api.github.com/users/pjohans/received_events","type":"User","site_admin":false},"repo":{"id":30912502,"name":"ting","full_name":"pjohans/ting","owner":{"login":"pjohans","id":953804,"avatar_url":"https://avatars.githubusercontent.com/u/953804?v=3","gravatar_id":"","url":"https://api.github.com/users/pjohans","html_url":"https://github.com/pjohans","followers_url":"https://api.github.com/users/pjohans/followers","following_url":"https://api.github.com/users/pjohans/following{/other_user}","gists_url":"https://api.github.com/users/pjohans/gists{/gist_id}","starred_url":"https://api.github.com/users/pjohans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjohans/subscriptions","organizations_url":"https://api.github.com/users/pjohans/orgs","repos_url":"https://api.github.com/users/pjohans/repos","events_url":"https://api.github.com/users/pjohans/events{/privacy}","received_events_url":"https://api.github.com/users/pjohans/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pjohans/ting","description":"Ting integration","fork":true,"url":"https://api.github.com/repos/pjohans/ting","forks_url":"https://api.github.com/repos/pjohans/ting/forks","keys_url":"https://api.github.com/repos/pjohans/ting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pjohans/ting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pjohans/ting/teams","hooks_url":"https://api.github.com/repos/pjohans/ting/hooks","issue_events_url":"https://api.github.com/repos/pjohans/ting/issues/events{/number}","events_url":"https://api.github.com/repos/pjohans/ting/events","assignees_url":"https://api.github.com/repos/pjohans/ting/assignees{/user}","branches_url":"https://api.github.com/repos/pjohans/ting/branches{/branch}","tags_url":"https://api.github.com/repos/pjohans/ting/tags","blobs_url":"https://api.github.com/repos/pjohans/ting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pjohans/ting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pjohans/ting/git/refs{/sha}","trees_url":"https://api.github.com/repos/pjohans/ting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pjohans/ting/statuses/{sha}","languages_url":"https://api.github.com/repos/pjohans/ting/languages","stargazers_url":"https://api.github.com/repos/pjohans/ting/stargazers","contributors_url":"https://api.github.com/repos/pjohans/ting/contributors","subscribers_url":"https://api.github.com/repos/pjohans/ting/subscribers","subscription_url":"https://api.github.com/repos/pjohans/ting/subscription","commits_url":"https://api.github.com/repos/pjohans/ting/commits{/sha}","git_commits_url":"https://api.github.com/repos/pjohans/ting/git/commits{/sha}","comments_url":"https://api.github.com/repos/pjohans/ting/comments{/number}","issue_comment_url":"https://api.github.com/repos/pjohans/ting/issues/comments{/number}","contents_url":"https://api.github.com/repos/pjohans/ting/contents/{+path}","compare_url":"https://api.github.com/repos/pjohans/ting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pjohans/ting/merges","archive_url":"https://api.github.com/repos/pjohans/ting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pjohans/ting/downloads","issues_url":"https://api.github.com/repos/pjohans/ting/issues{/number}","pulls_url":"https://api.github.com/repos/pjohans/ting/pulls{/number}","milestones_url":"https://api.github.com/repos/pjohans/ting/milestones{/number}","notifications_url":"https://api.github.com/repos/pjohans/ting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pjohans/ting/labels{/name}","releases_url":"https://api.github.com/repos/pjohans/ting/releases{/id}","created_at":"2015-02-17T10:33:51Z","updated_at":"2015-03-24T12:45:52Z","pushed_at":"2015-03-27T09:56:19Z","git_url":"git://github.com/pjohans/ting.git","ssh_url":"git@github.com:pjohans/ting.git","clone_url":"https://github.com/pjohans/ting.git","svn_url":"https://github.com/pjohans/ting","homepage":"","size":600,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"ding2:master","ref":"master","sha":"81bb8628b3247e98c1b83de628a93a149c51fc81","user":{"login":"ding2","id":564698,"avatar_url":"https://avatars.githubusercontent.com/u/564698?v=3","gravatar_id":"","url":"https://api.github.com/users/ding2","html_url":"https://github.com/ding2","followers_url":"https://api.github.com/users/ding2/followers","following_url":"https://api.github.com/users/ding2/following{/other_user}","gists_url":"https://api.github.com/users/ding2/gists{/gist_id}","starred_url":"https://api.github.com/users/ding2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ding2/subscriptions","organizations_url":"https://api.github.com/users/ding2/orgs","repos_url":"https://api.github.com/users/ding2/repos","events_url":"https://api.github.com/users/ding2/events{/privacy}","received_events_url":"https://api.github.com/users/ding2/received_events","type":"Organization","site_admin":false},"repo":{"id":1267326,"name":"ting","full_name":"ding2/ting","owner":{"login":"ding2","id":564698,"avatar_url":"https://avatars.githubusercontent.com/u/564698?v=3","gravatar_id":"","url":"https://api.github.com/users/ding2","html_url":"https://github.com/ding2","followers_url":"https://api.github.com/users/ding2/followers","following_url":"https://api.github.com/users/ding2/following{/other_user}","gists_url":"https://api.github.com/users/ding2/gists{/gist_id}","starred_url":"https://api.github.com/users/ding2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ding2/subscriptions","organizations_url":"https://api.github.com/users/ding2/orgs","repos_url":"https://api.github.com/users/ding2/repos","events_url":"https://api.github.com/users/ding2/events{/privacy}","received_events_url":"https://api.github.com/users/ding2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ding2/ting","description":"Ting integration","fork":false,"url":"https://api.github.com/repos/ding2/ting","forks_url":"https://api.github.com/repos/ding2/ting/forks","keys_url":"https://api.github.com/repos/ding2/ting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ding2/ting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ding2/ting/teams","hooks_url":"https://api.github.com/repos/ding2/ting/hooks","issue_events_url":"https://api.github.com/repos/ding2/ting/issues/events{/number}","events_url":"https://api.github.com/repos/ding2/ting/events","assignees_url":"https://api.github.com/repos/ding2/ting/assignees{/user}","branches_url":"https://api.github.com/repos/ding2/ting/branches{/branch}","tags_url":"https://api.github.com/repos/ding2/ting/tags","blobs_url":"https://api.github.com/repos/ding2/ting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ding2/ting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ding2/ting/git/refs{/sha}","trees_url":"https://api.github.com/repos/ding2/ting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ding2/ting/statuses/{sha}","languages_url":"https://api.github.com/repos/ding2/ting/languages","stargazers_url":"https://api.github.com/repos/ding2/ting/stargazers","contributors_url":"https://api.github.com/repos/ding2/ting/contributors","subscribers_url":"https://api.github.com/repos/ding2/ting/subscribers","subscription_url":"https://api.github.com/repos/ding2/ting/subscription","commits_url":"https://api.github.com/repos/ding2/ting/commits{/sha}","git_commits_url":"https://api.github.com/repos/ding2/ting/git/commits{/sha}","comments_url":"https://api.github.com/repos/ding2/ting/comments{/number}","issue_comment_url":"https://api.github.com/repos/ding2/ting/issues/comments{/number}","contents_url":"https://api.github.com/repos/ding2/ting/contents/{+path}","compare_url":"https://api.github.com/repos/ding2/ting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ding2/ting/merges","archive_url":"https://api.github.com/repos/ding2/ting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ding2/ting/downloads","issues_url":"https://api.github.com/repos/ding2/ting/issues{/number}","pulls_url":"https://api.github.com/repos/ding2/ting/pulls{/number}","milestones_url":"https://api.github.com/repos/ding2/ting/milestones{/number}","notifications_url":"https://api.github.com/repos/ding2/ting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ding2/ting/labels{/name}","releases_url":"https://api.github.com/repos/ding2/ting/releases{/id}","created_at":"2011-01-18T14:47:32Z","updated_at":"2015-02-25T08:25:30Z","pushed_at":"2015-04-14T11:10:39Z","git_url":"git://github.com/ding2/ting.git","ssh_url":"git@github.com:ding2/ting.git","clone_url":"https://github.com/ding2/ting.git","svn_url":"https://github.com/ding2/ting","homepage":"","size":926,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":13,"forks":14,"open_issues":13,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ding2/ting/pulls/27"},"html":{"href":"https://github.com/ding2/ting/pull/27"},"issue":{"href":"https://api.github.com/repos/ding2/ting/issues/27"},"comments":{"href":"https://api.github.com/repos/ding2/ting/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/ding2/ting/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/ding2/ting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ding2/ting/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/ding2/ting/statuses/9ae471738c68f6eda9f8c874b01d1e3797cc126f"}}}}