{"action":"created","comment":{"url":"https://api.github.com/repos/objective-solutions/taskboard/pulls/comments/131910254","pull_request_review_id":54933835,"id":131910254,"diff_hunk":"@@ -213,6 +216,46 @@ private FollowUpData createBallparkDemand(Issue demand) {\n         return followUpData;\n     }\n     \n+    private List<Issue> sortIssues(List<Issue> actual) {\n+        List<Issue> actualDemands = new ArrayList<>();\n+        List<Issue> actualFeatures = new ArrayList<>();\n+        List<Issue> actualSubtasks = new ArrayList<>();\n+        List<Issue> issuesOrdered = new ArrayList<>();\n+\n+        for (Issue issue : actual) {\n+            if (issue.isDemand())\n+                actualDemands.add(issue);\n+\n+            if (issue.isFeature())\n+                actualFeatures.add(issue);\n+\n+            if (issue.isSubTask())\n+                actualSubtasks.add(issue);\n+        }\n+\n+        actualDemands = sortIssuesByStatusAndPriorityOrder(actualDemands);\n+        actualFeatures = sortIssuesByStatusAndPriorityOrder(actualFeatures);\n+        actualSubtasks = sortIssuesByStatusAndPriorityOrder(actualSubtasks);\n+\n+        issuesOrdered.addAll(actualDemands);\n+        issuesOrdered.addAll(actualFeatures);\n+        issuesOrdered.addAll(actualSubtasks);\n+\n+        return issuesOrdered;\n+    }\n+\n+    private List<Issue> sortIssuesByStatusAndPriorityOrder(List<Issue> actual) {\n+        Collections.sort(actual, new Comparator<Issue>() {\n+            @Override\n+            public int compare(Issue o1, Issue o2) {\n+                String o1PriorityOrder = o1.getPriorityOrder() != null ? o1.getPriorityOrder().toString() : \"\";","path":"src/main/java/objective/taskboard/followup/impl/FollowUpDataProviderFromCurrentState.java","position":82,"original_position":82,"commit_id":"aff159ae79b6a64d9a8acdbdfe16cb015f945009","original_commit_id":"aff159ae79b6a64d9a8acdbdfe16cb015f945009","user":{"login":"jytakano","id":15266411,"avatar_url":"https://avatars3.githubusercontent.com/u/15266411?v=4","gravatar_id":"","url":"https://api.github.com/users/jytakano","html_url":"https://github.com/jytakano","followers_url":"https://api.github.com/users/jytakano/followers","following_url":"https://api.github.com/users/jytakano/following{/other_user}","gists_url":"https://api.github.com/users/jytakano/gists{/gist_id}","starred_url":"https://api.github.com/users/jytakano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jytakano/subscriptions","organizations_url":"https://api.github.com/users/jytakano/orgs","repos_url":"https://api.github.com/users/jytakano/repos","events_url":"https://api.github.com/users/jytakano/events{/privacy}","received_events_url":"https://api.github.com/users/jytakano/received_events","type":"User","site_admin":false},"body":"Por que transformar para String? Não poderia deixá-lo como Long?","created_at":"2017-08-08T13:25:52Z","updated_at":"2017-08-08T13:53:55Z","html_url":"https://github.com/objective-solutions/taskboard/pull/107#discussion_r131910254","pull_request_url":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/objective-solutions/taskboard/pulls/comments/131910254"},"html":{"href":"https://github.com/objective-solutions/taskboard/pull/107#discussion_r131910254"},"pull_request":{"href":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107","id":134439349,"html_url":"https://github.com/objective-solutions/taskboard/pull/107","diff_url":"https://github.com/objective-solutions/taskboard/pull/107.diff","patch_url":"https://github.com/objective-solutions/taskboard/pull/107.patch","issue_url":"https://api.github.com/repos/objective-solutions/taskboard/issues/107","number":107,"state":"open","locked":false,"title":"Sorting Followup by Issue status and priority order","user":{"login":"JonathanNasc","id":7452214,"avatar_url":"https://avatars0.githubusercontent.com/u/7452214?v=4","gravatar_id":"","url":"https://api.github.com/users/JonathanNasc","html_url":"https://github.com/JonathanNasc","followers_url":"https://api.github.com/users/JonathanNasc/followers","following_url":"https://api.github.com/users/JonathanNasc/following{/other_user}","gists_url":"https://api.github.com/users/JonathanNasc/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanNasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanNasc/subscriptions","organizations_url":"https://api.github.com/users/JonathanNasc/orgs","repos_url":"https://api.github.com/users/JonathanNasc/repos","events_url":"https://api.github.com/users/JonathanNasc/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanNasc/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-07T13:34:38Z","updated_at":"2017-08-08T13:53:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae8f3835ac8b2c33d98877d353f5ed9525537404","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107/commits","review_comments_url":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107/comments","review_comment_url":"https://api.github.com/repos/objective-solutions/taskboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/objective-solutions/taskboard/issues/107/comments","statuses_url":"https://api.github.com/repos/objective-solutions/taskboard/statuses/aff159ae79b6a64d9a8acdbdfe16cb015f945009","head":{"label":"JonathanNasc:master","ref":"master","sha":"aff159ae79b6a64d9a8acdbdfe16cb015f945009","user":{"login":"JonathanNasc","id":7452214,"avatar_url":"https://avatars0.githubusercontent.com/u/7452214?v=4","gravatar_id":"","url":"https://api.github.com/users/JonathanNasc","html_url":"https://github.com/JonathanNasc","followers_url":"https://api.github.com/users/JonathanNasc/followers","following_url":"https://api.github.com/users/JonathanNasc/following{/other_user}","gists_url":"https://api.github.com/users/JonathanNasc/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanNasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanNasc/subscriptions","organizations_url":"https://api.github.com/users/JonathanNasc/orgs","repos_url":"https://api.github.com/users/JonathanNasc/repos","events_url":"https://api.github.com/users/JonathanNasc/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanNasc/received_events","type":"User","site_admin":false},"repo":{"id":96150814,"name":"taskboard","full_name":"JonathanNasc/taskboard","owner":{"login":"JonathanNasc","id":7452214,"avatar_url":"https://avatars0.githubusercontent.com/u/7452214?v=4","gravatar_id":"","url":"https://api.github.com/users/JonathanNasc","html_url":"https://github.com/JonathanNasc","followers_url":"https://api.github.com/users/JonathanNasc/followers","following_url":"https://api.github.com/users/JonathanNasc/following{/other_user}","gists_url":"https://api.github.com/users/JonathanNasc/gists{/gist_id}","starred_url":"https://api.github.com/users/JonathanNasc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonathanNasc/subscriptions","organizations_url":"https://api.github.com/users/JonathanNasc/orgs","repos_url":"https://api.github.com/users/JonathanNasc/repos","events_url":"https://api.github.com/users/JonathanNasc/events{/privacy}","received_events_url":"https://api.github.com/users/JonathanNasc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JonathanNasc/taskboard","description":"Fullstack Taskboard","fork":true,"url":"https://api.github.com/repos/JonathanNasc/taskboard","forks_url":"https://api.github.com/repos/JonathanNasc/taskboard/forks","keys_url":"https://api.github.com/repos/JonathanNasc/taskboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JonathanNasc/taskboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JonathanNasc/taskboard/teams","hooks_url":"https://api.github.com/repos/JonathanNasc/taskboard/hooks","issue_events_url":"https://api.github.com/repos/JonathanNasc/taskboard/issues/events{/number}","events_url":"https://api.github.com/repos/JonathanNasc/taskboard/events","assignees_url":"https://api.github.com/repos/JonathanNasc/taskboard/assignees{/user}","branches_url":"https://api.github.com/repos/JonathanNasc/taskboard/branches{/branch}","tags_url":"https://api.github.com/repos/JonathanNasc/taskboard/tags","blobs_url":"https://api.github.com/repos/JonathanNasc/taskboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JonathanNasc/taskboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JonathanNasc/taskboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/JonathanNasc/taskboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JonathanNasc/taskboard/statuses/{sha}","languages_url":"https://api.github.com/repos/JonathanNasc/taskboard/languages","stargazers_url":"https://api.github.com/repos/JonathanNasc/taskboard/stargazers","contributors_url":"https://api.github.com/repos/JonathanNasc/taskboard/contributors","subscribers_url":"https://api.github.com/repos/JonathanNasc/taskboard/subscribers","subscription_url":"https://api.github.com/repos/JonathanNasc/taskboard/subscription","commits_url":"https://api.github.com/repos/JonathanNasc/taskboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/JonathanNasc/taskboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/JonathanNasc/taskboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/JonathanNasc/taskboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/JonathanNasc/taskboard/contents/{+path}","compare_url":"https://api.github.com/repos/JonathanNasc/taskboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JonathanNasc/taskboard/merges","archive_url":"https://api.github.com/repos/JonathanNasc/taskboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JonathanNasc/taskboard/downloads","issues_url":"https://api.github.com/repos/JonathanNasc/taskboard/issues{/number}","pulls_url":"https://api.github.com/repos/JonathanNasc/taskboard/pulls{/number}","milestones_url":"https://api.github.com/repos/JonathanNasc/taskboard/milestones{/number}","notifications_url":"https://api.github.com/repos/JonathanNasc/taskboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JonathanNasc/taskboard/labels{/name}","releases_url":"https://api.github.com/repos/JonathanNasc/taskboard/releases{/id}","deployments_url":"https://api.github.com/repos/JonathanNasc/taskboard/deployments","created_at":"2017-07-03T21:11:24Z","updated_at":"2017-07-03T21:11:26Z","pushed_at":"2017-08-07T13:32:47Z","git_url":"git://github.com/JonathanNasc/taskboard.git","ssh_url":"git@github.com:JonathanNasc/taskboard.git","clone_url":"https://github.com/JonathanNasc/taskboard.git","svn_url":"https://github.com/JonathanNasc/taskboard","homepage":null,"size":7425,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"objective-solutions:master","ref":"master","sha":"afd8d5290e7e8182ee07d72f8835aefe7a6e4806","user":{"login":"objective-solutions","id":22942665,"avatar_url":"https://avatars2.githubusercontent.com/u/22942665?v=4","gravatar_id":"","url":"https://api.github.com/users/objective-solutions","html_url":"https://github.com/objective-solutions","followers_url":"https://api.github.com/users/objective-solutions/followers","following_url":"https://api.github.com/users/objective-solutions/following{/other_user}","gists_url":"https://api.github.com/users/objective-solutions/gists{/gist_id}","starred_url":"https://api.github.com/users/objective-solutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objective-solutions/subscriptions","organizations_url":"https://api.github.com/users/objective-solutions/orgs","repos_url":"https://api.github.com/users/objective-solutions/repos","events_url":"https://api.github.com/users/objective-solutions/events{/privacy}","received_events_url":"https://api.github.com/users/objective-solutions/received_events","type":"Organization","site_admin":false},"repo":{"id":71564606,"name":"taskboard","full_name":"objective-solutions/taskboard","owner":{"login":"objective-solutions","id":22942665,"avatar_url":"https://avatars2.githubusercontent.com/u/22942665?v=4","gravatar_id":"","url":"https://api.github.com/users/objective-solutions","html_url":"https://github.com/objective-solutions","followers_url":"https://api.github.com/users/objective-solutions/followers","following_url":"https://api.github.com/users/objective-solutions/following{/other_user}","gists_url":"https://api.github.com/users/objective-solutions/gists{/gist_id}","starred_url":"https://api.github.com/users/objective-solutions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objective-solutions/subscriptions","organizations_url":"https://api.github.com/users/objective-solutions/orgs","repos_url":"https://api.github.com/users/objective-solutions/repos","events_url":"https://api.github.com/users/objective-solutions/events{/privacy}","received_events_url":"https://api.github.com/users/objective-solutions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/objective-solutions/taskboard","description":"Fullstack Taskboard","fork":false,"url":"https://api.github.com/repos/objective-solutions/taskboard","forks_url":"https://api.github.com/repos/objective-solutions/taskboard/forks","keys_url":"https://api.github.com/repos/objective-solutions/taskboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/objective-solutions/taskboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/objective-solutions/taskboard/teams","hooks_url":"https://api.github.com/repos/objective-solutions/taskboard/hooks","issue_events_url":"https://api.github.com/repos/objective-solutions/taskboard/issues/events{/number}","events_url":"https://api.github.com/repos/objective-solutions/taskboard/events","assignees_url":"https://api.github.com/repos/objective-solutions/taskboard/assignees{/user}","branches_url":"https://api.github.com/repos/objective-solutions/taskboard/branches{/branch}","tags_url":"https://api.github.com/repos/objective-solutions/taskboard/tags","blobs_url":"https://api.github.com/repos/objective-solutions/taskboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/objective-solutions/taskboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/objective-solutions/taskboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/objective-solutions/taskboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/objective-solutions/taskboard/statuses/{sha}","languages_url":"https://api.github.com/repos/objective-solutions/taskboard/languages","stargazers_url":"https://api.github.com/repos/objective-solutions/taskboard/stargazers","contributors_url":"https://api.github.com/repos/objective-solutions/taskboard/contributors","subscribers_url":"https://api.github.com/repos/objective-solutions/taskboard/subscribers","subscription_url":"https://api.github.com/repos/objective-solutions/taskboard/subscription","commits_url":"https://api.github.com/repos/objective-solutions/taskboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/objective-solutions/taskboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/objective-solutions/taskboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/objective-solutions/taskboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/objective-solutions/taskboard/contents/{+path}","compare_url":"https://api.github.com/repos/objective-solutions/taskboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/objective-solutions/taskboard/merges","archive_url":"https://api.github.com/repos/objective-solutions/taskboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/objective-solutions/taskboard/downloads","issues_url":"https://api.github.com/repos/objective-solutions/taskboard/issues{/number}","pulls_url":"https://api.github.com/repos/objective-solutions/taskboard/pulls{/number}","milestones_url":"https://api.github.com/repos/objective-solutions/taskboard/milestones{/number}","notifications_url":"https://api.github.com/repos/objective-solutions/taskboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/objective-solutions/taskboard/labels{/name}","releases_url":"https://api.github.com/repos/objective-solutions/taskboard/releases{/id}","deployments_url":"https://api.github.com/repos/objective-solutions/taskboard/deployments","created_at":"2016-10-21T12:53:27Z","updated_at":"2017-01-06T17:03:03Z","pushed_at":"2017-08-08T13:43:03Z","git_url":"git://github.com/objective-solutions/taskboard.git","ssh_url":"git@github.com:objective-solutions/taskboard.git","clone_url":"https://github.com/objective-solutions/taskboard.git","svn_url":"https://github.com/objective-solutions/taskboard","homepage":null,"size":7418,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107"},"html":{"href":"https://github.com/objective-solutions/taskboard/pull/107"},"issue":{"href":"https://api.github.com/repos/objective-solutions/taskboard/issues/107"},"comments":{"href":"https://api.github.com/repos/objective-solutions/taskboard/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/objective-solutions/taskboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/objective-solutions/taskboard/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/objective-solutions/taskboard/statuses/aff159ae79b6a64d9a8acdbdfe16cb015f945009"}}}}
{"actor":{"display_login":"jytakano"}}