{"action":"created","comment":{"url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/comments/83889731","pull_request_review_id":4701232,"id":83889731,"diff_hunk":"@@ -0,0 +1,29 @@\n+package seedu.task.logic.commands;\n+\n+import java.util.logging.Logger;\n+import seedu.task.commons.exceptions.UndoableException;\n+import seedu.task.logic.LogicManager;\n+import seedu.taskcommons.core.LogsCenter;\n+\n+\n+/**\n+ * Undoes the most recent modification to the TaskBook\n+ * @author xuchen\n+ *\n+ */\n+public class UndoCommand extends Command{\n+\tprivate final Logger logger = LogsCenter.getLogger(UndoCommand.class);\n+\t\n+\tpublic static final String MESSAGE_UNDO_FAILURE = \"There is no more operation can be undone.\";","path":"src/main/java/seedu/task/logic/commands/UndoCommand.java","position":17,"original_position":17,"commit_id":"79777a9d0b8115f45b72b79973c2092cde491af1","original_commit_id":"79777a9d0b8115f45b72b79973c2092cde491af1","user":{"login":"daredevil999","id":21190600,"avatar_url":"https://avatars.githubusercontent.com/u/21190600?v=3","gravatar_id":"","url":"https://api.github.com/users/daredevil999","html_url":"https://github.com/daredevil999","followers_url":"https://api.github.com/users/daredevil999/followers","following_url":"https://api.github.com/users/daredevil999/following{/other_user}","gists_url":"https://api.github.com/users/daredevil999/gists{/gist_id}","starred_url":"https://api.github.com/users/daredevil999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daredevil999/subscriptions","organizations_url":"https://api.github.com/users/daredevil999/orgs","repos_url":"https://api.github.com/users/daredevil999/repos","events_url":"https://api.github.com/users/daredevil999/events{/privacy}","received_events_url":"https://api.github.com/users/daredevil999/received_events","type":"User","site_admin":false},"body":"Minor grammar mistake. Can change this to \"No more operations to undo\" or \"There are no more operations which can be undone. \"","created_at":"2016-10-18T16:03:37Z","updated_at":"2016-10-18T16:13:01Z","html_url":"https://github.com/CS2103AUG2016-F09-C4/Main/pull/68#discussion_r83889731","pull_request_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/comments/83889731"},"html":{"href":"https://github.com/CS2103AUG2016-F09-C4/Main/pull/68#discussion_r83889731"},"pull_request":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68","id":89766680,"html_url":"https://github.com/CS2103AUG2016-F09-C4/Main/pull/68","diff_url":"https://github.com/CS2103AUG2016-F09-C4/Main/pull/68.diff","patch_url":"https://github.com/CS2103AUG2016-F09-C4/Main/pull/68.patch","issue_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/68","number":68,"state":"open","locked":false,"title":"Implement Undo for tasks and events add & delete","user":{"login":"githubxxcc","id":11676094,"avatar_url":"https://avatars.githubusercontent.com/u/11676094?v=3","gravatar_id":"","url":"https://api.github.com/users/githubxxcc","html_url":"https://github.com/githubxxcc","followers_url":"https://api.github.com/users/githubxxcc/followers","following_url":"https://api.github.com/users/githubxxcc/following{/other_user}","gists_url":"https://api.github.com/users/githubxxcc/gists{/gist_id}","starred_url":"https://api.github.com/users/githubxxcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubxxcc/subscriptions","organizations_url":"https://api.github.com/users/githubxxcc/orgs","repos_url":"https://api.github.com/users/githubxxcc/repos","events_url":"https://api.github.com/users/githubxxcc/events{/privacy}","received_events_url":"https://api.github.com/users/githubxxcc/received_events","type":"User","site_admin":false},"body":"### Context\r\n\r\n#### What is done:\r\n\r\n- undo delete, undo add, undo mark\r\n- sorting both events and tasks. \r\n  - tasks are sorted: floating tasks always on top, and the rest from earliest to latest\r\n  - events are sorted: by their starting time. \r\n\r\n#### What to take note:\r\n\r\n- Notice the change in Command class, as well as the UndoableCommand abstract class.\r\n- There are some minor changes to the AddTask/Event, DeleteTask/EventCommand, and MarkCommand, please verify those. \r\n- Take note of some test cases may behaviour differently with the sorting function. \r\n  - More specifically, when a task or event is deleted and undo, it may appear at a different position in the filtered list. It is because of the sorting only takes into account deadline and duration, also because it is not adding into an absolute index (which can be implemented, but it may result in me changing many or ur codes.) @daredevil999 if you are to implement AddCommand with index, it is then possible. \r\n\r\n### Links\r\n#55 \r\n\r\n### Reviewers\r\n@CS2103AUG2016-F09-C4/developers ","created_at":"2016-10-18T08:18:33Z","updated_at":"2016-10-18T16:13:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db253a626d21982a615ccd56938f4714808aa8ce","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/milestones/4","html_url":"https://github.com/CS2103AUG2016-F09-C4/Main/milestones/v0.3%20Alpha%20Release","labels_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/milestones/4/labels","id":2069437,"number":4,"title":"v0.3 Alpha Release","description":"V0.3 Product\r\n\r\nThis version should be a more functional version than V0.2 and should contain at least a basic version of features you intend to release in the final version.\r\n\r\nIdeally, V0.3 should be good enough for dog fooding.\r\n\r\nSubmission: Release using GitHub's release mechanism.\r\n\r\nGrading: To pass this checkpoint, your product should be noticeably better than an MVP.\r\n\r\n\r\nV0.3 Documentation\r\n\r\nFollow the documentation in the sample project in terms or organization, level of details, etc.\r\n\r\nUpdate User Guide to match what you plan to deliver at V0.5\r\nUpdate Developer Guide to match your current design or the design you plan to have at V0.5\r\nSubmission: Must be included in the version tagged V0.3.\r\n\r\nGrading: To pass this checkpoint, your documentation should have been updated to match your project.\r\n\r\n\r\nV0.3 Demo\r\n\r\nSubmission: Demo to the tutor during the tutorial.\r\n\r\nGrading: Must use the version tagged V0.3.","creator":{"login":"daredevil999","id":21190600,"avatar_url":"https://avatars.githubusercontent.com/u/21190600?v=3","gravatar_id":"","url":"https://api.github.com/users/daredevil999","html_url":"https://github.com/daredevil999","followers_url":"https://api.github.com/users/daredevil999/followers","following_url":"https://api.github.com/users/daredevil999/following{/other_user}","gists_url":"https://api.github.com/users/daredevil999/gists{/gist_id}","starred_url":"https://api.github.com/users/daredevil999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daredevil999/subscriptions","organizations_url":"https://api.github.com/users/daredevil999/orgs","repos_url":"https://api.github.com/users/daredevil999/repos","events_url":"https://api.github.com/users/daredevil999/events{/privacy}","received_events_url":"https://api.github.com/users/daredevil999/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":11,"state":"open","created_at":"2016-10-14T06:25:56Z","updated_at":"2016-10-18T15:29:18Z","due_on":"2016-10-21T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68/commits","review_comments_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68/comments","review_comment_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/68/comments","statuses_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/statuses/79777a9d0b8115f45b72b79973c2092cde491af1","head":{"label":"CS2103AUG2016-F09-C4:undo","ref":"undo","sha":"79777a9d0b8115f45b72b79973c2092cde491af1","user":{"login":"CS2103AUG2016-F09-C4","id":22314455,"avatar_url":"https://avatars.githubusercontent.com/u/22314455?v=3","gravatar_id":"","url":"https://api.github.com/users/CS2103AUG2016-F09-C4","html_url":"https://github.com/CS2103AUG2016-F09-C4","followers_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/followers","following_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/following{/other_user}","gists_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/gists{/gist_id}","starred_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/subscriptions","organizations_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/orgs","repos_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/repos","events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/events{/privacy}","received_events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/received_events","type":"Organization","site_admin":false},"repo":{"id":69621491,"name":"Main","full_name":"CS2103AUG2016-F09-C4/Main","owner":{"login":"CS2103AUG2016-F09-C4","id":22314455,"avatar_url":"https://avatars.githubusercontent.com/u/22314455?v=3","gravatar_id":"","url":"https://api.github.com/users/CS2103AUG2016-F09-C4","html_url":"https://github.com/CS2103AUG2016-F09-C4","followers_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/followers","following_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/following{/other_user}","gists_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/gists{/gist_id}","starred_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/subscriptions","organizations_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/orgs","repos_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/repos","events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/events{/privacy}","received_events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CS2103AUG2016-F09-C4/Main","description":"Task Manager App","fork":true,"url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main","forks_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/forks","keys_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/teams","hooks_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/hooks","issue_events_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/events{/number}","events_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/events","assignees_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/assignees{/user}","branches_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/branches{/branch}","tags_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/tags","blobs_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/refs{/sha}","trees_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/statuses/{sha}","languages_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/languages","stargazers_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/stargazers","contributors_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/contributors","subscribers_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/subscribers","subscription_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/subscription","commits_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/commits{/sha}","git_commits_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/commits{/sha}","comments_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/comments{/number}","issue_comment_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/comments{/number}","contents_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/contents/{+path}","compare_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/merges","archive_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/downloads","issues_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues{/number}","pulls_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls{/number}","milestones_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/milestones{/number}","notifications_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/labels{/name}","releases_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/releases{/id}","deployments_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/deployments","created_at":"2016-09-30T01:15:11Z","updated_at":"2016-10-04T07:38:35Z","pushed_at":"2016-10-18T15:10:29Z","git_url":"git://github.com/CS2103AUG2016-F09-C4/Main.git","ssh_url":"git@github.com:CS2103AUG2016-F09-C4/Main.git","clone_url":"https://github.com/CS2103AUG2016-F09-C4/Main.git","svn_url":"https://github.com/CS2103AUG2016-F09-C4/Main","homepage":"","size":6267,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":0,"default_branch":"master"}},"base":{"label":"CS2103AUG2016-F09-C4:master","ref":"master","sha":"efab7a4180e3806ed614ffcce906b81973682ac4","user":{"login":"CS2103AUG2016-F09-C4","id":22314455,"avatar_url":"https://avatars.githubusercontent.com/u/22314455?v=3","gravatar_id":"","url":"https://api.github.com/users/CS2103AUG2016-F09-C4","html_url":"https://github.com/CS2103AUG2016-F09-C4","followers_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/followers","following_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/following{/other_user}","gists_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/gists{/gist_id}","starred_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/subscriptions","organizations_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/orgs","repos_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/repos","events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/events{/privacy}","received_events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/received_events","type":"Organization","site_admin":false},"repo":{"id":69621491,"name":"Main","full_name":"CS2103AUG2016-F09-C4/Main","owner":{"login":"CS2103AUG2016-F09-C4","id":22314455,"avatar_url":"https://avatars.githubusercontent.com/u/22314455?v=3","gravatar_id":"","url":"https://api.github.com/users/CS2103AUG2016-F09-C4","html_url":"https://github.com/CS2103AUG2016-F09-C4","followers_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/followers","following_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/following{/other_user}","gists_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/gists{/gist_id}","starred_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/subscriptions","organizations_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/orgs","repos_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/repos","events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/events{/privacy}","received_events_url":"https://api.github.com/users/CS2103AUG2016-F09-C4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CS2103AUG2016-F09-C4/Main","description":"Task Manager App","fork":true,"url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main","forks_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/forks","keys_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/teams","hooks_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/hooks","issue_events_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/events{/number}","events_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/events","assignees_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/assignees{/user}","branches_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/branches{/branch}","tags_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/tags","blobs_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/refs{/sha}","trees_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/statuses/{sha}","languages_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/languages","stargazers_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/stargazers","contributors_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/contributors","subscribers_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/subscribers","subscription_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/subscription","commits_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/commits{/sha}","git_commits_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/git/commits{/sha}","comments_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/comments{/number}","issue_comment_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/comments{/number}","contents_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/contents/{+path}","compare_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/merges","archive_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/downloads","issues_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues{/number}","pulls_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls{/number}","milestones_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/milestones{/number}","notifications_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/labels{/name}","releases_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/releases{/id}","deployments_url":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/deployments","created_at":"2016-09-30T01:15:11Z","updated_at":"2016-10-04T07:38:35Z","pushed_at":"2016-10-18T15:10:29Z","git_url":"git://github.com/CS2103AUG2016-F09-C4/Main.git","ssh_url":"git@github.com:CS2103AUG2016-F09-C4/Main.git","clone_url":"https://github.com/CS2103AUG2016-F09-C4/Main.git","svn_url":"https://github.com/CS2103AUG2016-F09-C4/Main","homepage":"","size":6267,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68"},"html":{"href":"https://github.com/CS2103AUG2016-F09-C4/Main/pull/68"},"issue":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/68"},"comments":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/CS2103AUG2016-F09-C4/Main/statuses/79777a9d0b8115f45b72b79973c2092cde491af1"}}}}
{"actor":{"display_login":"daredevil999"}}