{"action":"created","comment":{"url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/comments/188009244","pull_request_review_id":119902326,"id":188009244,"diff_hunk":"@@ -20,36 +19,15 @@ end %>\n         </tr>\n       </thead>\n \n+      <tbody class=\"current-user\">\n+        <% @scope.cases.assigned_to(current_user).order(created_at: :desc).decorate.each do |c| %>\n+          <%= render 'partials/case_table_row', kase: c, show_resolved: @show_resolved %>\n+        <% end %>\n+      </tbody>\n+\n       <tbody>\n-        <% @scope.cases.order(created_at: :desc).decorate.each do |c| %>\n-      <%\n-        # If @show_resolved, show only non-open cases; if not @show_resolved, show only open cases.\n-        # Hence logic simplifies to the below (!=)\n-      %>\n-          <% if @show_resolved != c.open?  %>\n-            <% if (c.resolved? || c.closed?) && !manage_cases_page %>\n-              <tr\n-                class=\"closed-case-row\"\n-                title=\"This support case has been resolved; you should open a new support case if you wish to contact Alces Flight Support\"\n-              >\n-            <% else %>\n-              <tr>\n-            <% end %>\n-              <td><%= link_to c.display_id, case_path(c) %></td>\n-              <%= timestamp_td(\n-                description:  'Support case created',\n-                timestamp: c.created_at\n-              ) %>\n-              <td><%= c.user_facing_state %></td>\n-              <td style=\"white-space: nowrap;\"><%= c.user.name %></td>\n-              <td><%= link_to c.subject, case_path(c) %></td>\n-              <td><%= c.assignee&.name || 'Nobody' %></td>\n-              <td><%= c.association_info %></td>\n-              <% if @show_resolved %>\n-                <td><%= c.credit_charge %></td>\n-              <% end %>\n-            </tr>\n-          <% end %>\n+        <% @scope.cases.not_assigned_to(current_user).order(created_at: :desc).decorate.each do |c| %>","path":"app/views/cases/index.html.erb","position":null,"original_position":45,"commit_id":"35330ce9959dbf18d3fa7715261c1eb492211c15","original_commit_id":"b6407336cf103350b7f2e06d795700063a779caa","user":{"login":"atoghill","id":36155339,"avatar_url":"https://avatars0.githubusercontent.com/u/36155339?v=4","gravatar_id":"","url":"https://api.github.com/users/atoghill","html_url":"https://github.com/atoghill","followers_url":"https://api.github.com/users/atoghill/followers","following_url":"https://api.github.com/users/atoghill/following{/other_user}","gists_url":"https://api.github.com/users/atoghill/gists{/gist_id}","starred_url":"https://api.github.com/users/atoghill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atoghill/subscriptions","organizations_url":"https://api.github.com/users/atoghill/orgs","repos_url":"https://api.github.com/users/atoghill/repos","events_url":"https://api.github.com/users/atoghill/events{/privacy}","received_events_url":"https://api.github.com/users/atoghill/received_events","type":"User","site_admin":false},"body":"As of 35330ce these are now ordered by default. However this line is still present in more than one location. If there is a place that would order all such objects by default then please let me know so I can put it there instead.","created_at":"2018-05-14T16:03:32Z","updated_at":"2018-05-14T16:03:32Z","html_url":"https://github.com/alces-software/alces-flight-center/pull/247#discussion_r188009244","pull_request_url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/comments/188009244"},"html":{"href":"https://github.com/alces-software/alces-flight-center/pull/247#discussion_r188009244"},"pull_request":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247"}},"in_reply_to_id":187945623},"pull_request":{"url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247","id":187426490,"html_url":"https://github.com/alces-software/alces-flight-center/pull/247","diff_url":"https://github.com/alces-software/alces-flight-center/pull/247.diff","patch_url":"https://github.com/alces-software/alces-flight-center/pull/247.patch","issue_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues/247","number":247,"state":"open","locked":false,"title":"Prioritise cases assigned to the current user","user":{"login":"atoghill","id":36155339,"avatar_url":"https://avatars0.githubusercontent.com/u/36155339?v=4","gravatar_id":"","url":"https://api.github.com/users/atoghill","html_url":"https://github.com/atoghill","followers_url":"https://api.github.com/users/atoghill/followers","following_url":"https://api.github.com/users/atoghill/following{/other_user}","gists_url":"https://api.github.com/users/atoghill/gists{/gist_id}","starred_url":"https://api.github.com/users/atoghill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atoghill/subscriptions","organizations_url":"https://api.github.com/users/atoghill/orgs","repos_url":"https://api.github.com/users/atoghill/repos","events_url":"https://api.github.com/users/atoghill/events{/privacy}","received_events_url":"https://api.github.com/users/atoghill/received_events","type":"User","site_admin":false},"body":"This PR implements prioritisation and highlighting of cases that have been assigned to the current user. Cases are split into two distinct groups of those that are and aren't assigned to the current user. With those that are assigned appearing first and foremost at the top in descending order with a darker background to make them stand out.\r\n\r\n_(Trello: https://trello.com/c/rvMjwwcA/287-make-cases-assigned-to-current-user-more-prominent-every-time-we-display-case-tables)_","created_at":"2018-05-11T10:30:48Z","updated_at":"2018-05-14T16:03:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50d8d2e92fbc934578c00277d31192fe79b8742a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247/commits","review_comments_url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247/comments","review_comment_url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues/247/comments","statuses_url":"https://api.github.com/repos/alces-software/alces-flight-center/statuses/35330ce9959dbf18d3fa7715261c1eb492211c15","head":{"label":"alces-software:feature/prioritise-user-assigned-cases","ref":"feature/prioritise-user-assigned-cases","sha":"35330ce9959dbf18d3fa7715261c1eb492211c15","user":{"login":"alces-software","id":945288,"avatar_url":"https://avatars0.githubusercontent.com/u/945288?v=4","gravatar_id":"","url":"https://api.github.com/users/alces-software","html_url":"https://github.com/alces-software","followers_url":"https://api.github.com/users/alces-software/followers","following_url":"https://api.github.com/users/alces-software/following{/other_user}","gists_url":"https://api.github.com/users/alces-software/gists{/gist_id}","starred_url":"https://api.github.com/users/alces-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alces-software/subscriptions","organizations_url":"https://api.github.com/users/alces-software/orgs","repos_url":"https://api.github.com/users/alces-software/repos","events_url":"https://api.github.com/users/alces-software/events{/privacy}","received_events_url":"https://api.github.com/users/alces-software/received_events","type":"Organization","site_admin":false},"repo":{"id":103410349,"name":"alces-flight-center","full_name":"alces-software/alces-flight-center","owner":{"login":"alces-software","id":945288,"avatar_url":"https://avatars0.githubusercontent.com/u/945288?v=4","gravatar_id":"","url":"https://api.github.com/users/alces-software","html_url":"https://github.com/alces-software","followers_url":"https://api.github.com/users/alces-software/followers","following_url":"https://api.github.com/users/alces-software/following{/other_user}","gists_url":"https://api.github.com/users/alces-software/gists{/gist_id}","starred_url":"https://api.github.com/users/alces-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alces-software/subscriptions","organizations_url":"https://api.github.com/users/alces-software/orgs","repos_url":"https://api.github.com/users/alces-software/repos","events_url":"https://api.github.com/users/alces-software/events{/privacy}","received_events_url":"https://api.github.com/users/alces-software/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alces-software/alces-flight-center","description":"Alces Flight Center cluster support and management site","fork":false,"url":"https://api.github.com/repos/alces-software/alces-flight-center","forks_url":"https://api.github.com/repos/alces-software/alces-flight-center/forks","keys_url":"https://api.github.com/repos/alces-software/alces-flight-center/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alces-software/alces-flight-center/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alces-software/alces-flight-center/teams","hooks_url":"https://api.github.com/repos/alces-software/alces-flight-center/hooks","issue_events_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues/events{/number}","events_url":"https://api.github.com/repos/alces-software/alces-flight-center/events","assignees_url":"https://api.github.com/repos/alces-software/alces-flight-center/assignees{/user}","branches_url":"https://api.github.com/repos/alces-software/alces-flight-center/branches{/branch}","tags_url":"https://api.github.com/repos/alces-software/alces-flight-center/tags","blobs_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/refs{/sha}","trees_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alces-software/alces-flight-center/statuses/{sha}","languages_url":"https://api.github.com/repos/alces-software/alces-flight-center/languages","stargazers_url":"https://api.github.com/repos/alces-software/alces-flight-center/stargazers","contributors_url":"https://api.github.com/repos/alces-software/alces-flight-center/contributors","subscribers_url":"https://api.github.com/repos/alces-software/alces-flight-center/subscribers","subscription_url":"https://api.github.com/repos/alces-software/alces-flight-center/subscription","commits_url":"https://api.github.com/repos/alces-software/alces-flight-center/commits{/sha}","git_commits_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/commits{/sha}","comments_url":"https://api.github.com/repos/alces-software/alces-flight-center/comments{/number}","issue_comment_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues/comments{/number}","contents_url":"https://api.github.com/repos/alces-software/alces-flight-center/contents/{+path}","compare_url":"https://api.github.com/repos/alces-software/alces-flight-center/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alces-software/alces-flight-center/merges","archive_url":"https://api.github.com/repos/alces-software/alces-flight-center/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alces-software/alces-flight-center/downloads","issues_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues{/number}","pulls_url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls{/number}","milestones_url":"https://api.github.com/repos/alces-software/alces-flight-center/milestones{/number}","notifications_url":"https://api.github.com/repos/alces-software/alces-flight-center/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alces-software/alces-flight-center/labels{/name}","releases_url":"https://api.github.com/repos/alces-software/alces-flight-center/releases{/id}","deployments_url":"https://api.github.com/repos/alces-software/alces-flight-center/deployments","created_at":"2017-09-13T14:30:59Z","updated_at":"2018-05-14T14:15:43Z","pushed_at":"2018-05-14T16:02:24Z","git_url":"git://github.com/alces-software/alces-flight-center.git","ssh_url":"git@github.com:alces-software/alces-flight-center.git","clone_url":"https://github.com/alces-software/alces-flight-center.git","svn_url":"https://github.com/alces-software/alces-flight-center","homepage":"https://center.alces-flight.com/","size":12915,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":26,"watchers":2,"default_branch":"develop"}},"base":{"label":"alces-software:develop","ref":"develop","sha":"d5757c269e51474bcf9e7027a20c46613a500caa","user":{"login":"alces-software","id":945288,"avatar_url":"https://avatars0.githubusercontent.com/u/945288?v=4","gravatar_id":"","url":"https://api.github.com/users/alces-software","html_url":"https://github.com/alces-software","followers_url":"https://api.github.com/users/alces-software/followers","following_url":"https://api.github.com/users/alces-software/following{/other_user}","gists_url":"https://api.github.com/users/alces-software/gists{/gist_id}","starred_url":"https://api.github.com/users/alces-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alces-software/subscriptions","organizations_url":"https://api.github.com/users/alces-software/orgs","repos_url":"https://api.github.com/users/alces-software/repos","events_url":"https://api.github.com/users/alces-software/events{/privacy}","received_events_url":"https://api.github.com/users/alces-software/received_events","type":"Organization","site_admin":false},"repo":{"id":103410349,"name":"alces-flight-center","full_name":"alces-software/alces-flight-center","owner":{"login":"alces-software","id":945288,"avatar_url":"https://avatars0.githubusercontent.com/u/945288?v=4","gravatar_id":"","url":"https://api.github.com/users/alces-software","html_url":"https://github.com/alces-software","followers_url":"https://api.github.com/users/alces-software/followers","following_url":"https://api.github.com/users/alces-software/following{/other_user}","gists_url":"https://api.github.com/users/alces-software/gists{/gist_id}","starred_url":"https://api.github.com/users/alces-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alces-software/subscriptions","organizations_url":"https://api.github.com/users/alces-software/orgs","repos_url":"https://api.github.com/users/alces-software/repos","events_url":"https://api.github.com/users/alces-software/events{/privacy}","received_events_url":"https://api.github.com/users/alces-software/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alces-software/alces-flight-center","description":"Alces Flight Center cluster support and management site","fork":false,"url":"https://api.github.com/repos/alces-software/alces-flight-center","forks_url":"https://api.github.com/repos/alces-software/alces-flight-center/forks","keys_url":"https://api.github.com/repos/alces-software/alces-flight-center/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alces-software/alces-flight-center/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alces-software/alces-flight-center/teams","hooks_url":"https://api.github.com/repos/alces-software/alces-flight-center/hooks","issue_events_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues/events{/number}","events_url":"https://api.github.com/repos/alces-software/alces-flight-center/events","assignees_url":"https://api.github.com/repos/alces-software/alces-flight-center/assignees{/user}","branches_url":"https://api.github.com/repos/alces-software/alces-flight-center/branches{/branch}","tags_url":"https://api.github.com/repos/alces-software/alces-flight-center/tags","blobs_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/refs{/sha}","trees_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alces-software/alces-flight-center/statuses/{sha}","languages_url":"https://api.github.com/repos/alces-software/alces-flight-center/languages","stargazers_url":"https://api.github.com/repos/alces-software/alces-flight-center/stargazers","contributors_url":"https://api.github.com/repos/alces-software/alces-flight-center/contributors","subscribers_url":"https://api.github.com/repos/alces-software/alces-flight-center/subscribers","subscription_url":"https://api.github.com/repos/alces-software/alces-flight-center/subscription","commits_url":"https://api.github.com/repos/alces-software/alces-flight-center/commits{/sha}","git_commits_url":"https://api.github.com/repos/alces-software/alces-flight-center/git/commits{/sha}","comments_url":"https://api.github.com/repos/alces-software/alces-flight-center/comments{/number}","issue_comment_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues/comments{/number}","contents_url":"https://api.github.com/repos/alces-software/alces-flight-center/contents/{+path}","compare_url":"https://api.github.com/repos/alces-software/alces-flight-center/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alces-software/alces-flight-center/merges","archive_url":"https://api.github.com/repos/alces-software/alces-flight-center/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alces-software/alces-flight-center/downloads","issues_url":"https://api.github.com/repos/alces-software/alces-flight-center/issues{/number}","pulls_url":"https://api.github.com/repos/alces-software/alces-flight-center/pulls{/number}","milestones_url":"https://api.github.com/repos/alces-software/alces-flight-center/milestones{/number}","notifications_url":"https://api.github.com/repos/alces-software/alces-flight-center/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alces-software/alces-flight-center/labels{/name}","releases_url":"https://api.github.com/repos/alces-software/alces-flight-center/releases{/id}","deployments_url":"https://api.github.com/repos/alces-software/alces-flight-center/deployments","created_at":"2017-09-13T14:30:59Z","updated_at":"2018-05-14T14:15:43Z","pushed_at":"2018-05-14T16:02:24Z","git_url":"git://github.com/alces-software/alces-flight-center.git","ssh_url":"git@github.com:alces-software/alces-flight-center.git","clone_url":"https://github.com/alces-software/alces-flight-center.git","svn_url":"https://github.com/alces-software/alces-flight-center","homepage":"https://center.alces-flight.com/","size":12915,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":26,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247"},"html":{"href":"https://github.com/alces-software/alces-flight-center/pull/247"},"issue":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/issues/247"},"comments":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/alces-software/alces-flight-center/statuses/35330ce9959dbf18d3fa7715261c1eb492211c15"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"atoghill"}}