{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/comments/357795772","pull_request_review_id":332068193,"id":357795772,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1Nzc5NTc3Mg==","diff_hunk":"@@ -188,15 +188,20 @@ function register_term_columns() {\n \t */\n \tfunction handle_form_date_range_change() {\n \t\t\n-\t\tif ( !isset( $_POST['ef-story-budget-range-submit'], $_POST['ef-story-budget-number-days'], $_POST['ef-story-budget-start-date'] ) )\n+\t\tif ( !isset( $_POST['ef-story-budget-number-days'], $_POST['ef-story-budget-start-date'] ) &&\n+\t\t     ( !isset( $_POST['ef-story-budget-range-submit'] ) || !isset( $_POST['ef-story-budget-today-submit'] ) ) )\n \t\t\treturn;\n \t\t\t\n \t\tif ( !wp_verify_nonce( $_POST['nonce'], 'change-date' ) )\n \t\t\twp_die( $this->module->messages['nonce-failed'] );\n \t\t\n \t\t$current_user = wp_get_current_user();\n \t\t$user_filters = $this->get_user_meta( $current_user->ID, self::usermeta_key_prefix . 'filters', true );\n-\t\t$user_filters['start_date'] = date( 'Y-m-d', strtotime( $_POST['ef-story-budget-start-date'] ) );\n+\t\tif ( isset( $_POST['ef-story-budget-today-submit'] ) ) {\n+\t\t\t$user_filters['start_date'] = date( 'Y-m-d' );\n+\t\t} else {\n+\t\t\t$user_filters['start_date'] = date( 'Y-m-d', strtotime( $_POST['ef-story-budget-start-date'] ) );","path":"modules/story-budget/story-budget.php","position":18,"original_position":18,"commit_id":"5341ca9188030f2141f4cfa799c4fc5f9484ed7e","original_commit_id":"5341ca9188030f2141f4cfa799c4fc5f9484ed7e","user":{"login":"mjangda","id":86105,"node_id":"MDQ6VXNlcjg2MTA1","avatar_url":"https://avatars1.githubusercontent.com/u/86105?v=4","gravatar_id":"","url":"https://api.github.com/users/mjangda","html_url":"https://github.com/mjangda","followers_url":"https://api.github.com/users/mjangda/followers","following_url":"https://api.github.com/users/mjangda/following{/other_user}","gists_url":"https://api.github.com/users/mjangda/gists{/gist_id}","starred_url":"https://api.github.com/users/mjangda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjangda/subscriptions","organizations_url":"https://api.github.com/users/mjangda/orgs","repos_url":"https://api.github.com/users/mjangda/repos","events_url":"https://api.github.com/users/mjangda/events{/privacy}","received_events_url":"https://api.github.com/users/mjangda/received_events","type":"User","site_admin":false},"body":"For consistent behavior:\r\n\r\n```suggestion\r\n\t\t\t$user_filters['start_date'] = date_i18n( 'Y-m-d', strtotime( $_POST['ef-story-budget-start-date'] ) );\r\n```","created_at":"2019-12-13T19:23:07Z","updated_at":"2019-12-13T19:23:07Z","html_url":"https://github.com/Automattic/Edit-Flow/pull/509#discussion_r357795772","pull_request_url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/comments/357795772"},"html":{"href":"https://github.com/Automattic/Edit-Flow/pull/509#discussion_r357795772"},"pull_request":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509","id":270601599,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcwNjAxNTk5","html_url":"https://github.com/Automattic/Edit-Flow/pull/509","diff_url":"https://github.com/Automattic/Edit-Flow/pull/509.diff","patch_url":"https://github.com/Automattic/Edit-Flow/pull/509.patch","issue_url":"https://api.github.com/repos/Automattic/Edit-Flow/issues/509","number":509,"state":"open","locked":false,"title":"Added a button to the Story Budget date change option","user":{"login":"raduconst","id":6512220,"node_id":"MDQ6VXNlcjY1MTIyMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/6512220?v=4","gravatar_id":"","url":"https://api.github.com/users/raduconst","html_url":"https://github.com/raduconst","followers_url":"https://api.github.com/users/raduconst/followers","following_url":"https://api.github.com/users/raduconst/following{/other_user}","gists_url":"https://api.github.com/users/raduconst/gists{/gist_id}","starred_url":"https://api.github.com/users/raduconst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raduconst/subscriptions","organizations_url":"https://api.github.com/users/raduconst/orgs","repos_url":"https://api.github.com/users/raduconst/repos","events_url":"https://api.github.com/users/raduconst/events{/privacy}","received_events_url":"https://api.github.com/users/raduconst/received_events","type":"User","site_admin":false},"body":"I added the button to let the user go faster to the current day instead of having to use the\r\ncalendar. I tried to keep the same behavior of the Today button from Edit Flow → Calendar → Customizable calendar, where you can go to the current date with just a press of a button. \r\n\r\nP.S. If this PR is accepted, the pot file needs to be generated again because there's a `or` word between the `Change` and `Today` buttons.\r\n\r\nThis is made to fix #176","created_at":"2019-04-15T17:09:49Z","updated_at":"2019-12-13T19:23:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3ee8d16303a6017bc1a3b138e995a86530c0065","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1647990127,"node_id":"MDU6TGFiZWwxNjQ3OTkwMTI3","url":"https://api.github.com/repos/Automattic/Edit-Flow/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"ed110e","default":false,"description":""}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509/commits","review_comments_url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509/comments","review_comment_url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/Edit-Flow/issues/509/comments","statuses_url":"https://api.github.com/repos/Automattic/Edit-Flow/statuses/5341ca9188030f2141f4cfa799c4fc5f9484ed7e","head":{"label":"raduconst:story-budget-today-button","ref":"story-budget-today-button","sha":"5341ca9188030f2141f4cfa799c4fc5f9484ed7e","user":{"login":"raduconst","id":6512220,"node_id":"MDQ6VXNlcjY1MTIyMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/6512220?v=4","gravatar_id":"","url":"https://api.github.com/users/raduconst","html_url":"https://github.com/raduconst","followers_url":"https://api.github.com/users/raduconst/followers","following_url":"https://api.github.com/users/raduconst/following{/other_user}","gists_url":"https://api.github.com/users/raduconst/gists{/gist_id}","starred_url":"https://api.github.com/users/raduconst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raduconst/subscriptions","organizations_url":"https://api.github.com/users/raduconst/orgs","repos_url":"https://api.github.com/users/raduconst/repos","events_url":"https://api.github.com/users/raduconst/events{/privacy}","received_events_url":"https://api.github.com/users/raduconst/received_events","type":"User","site_admin":false},"repo":{"id":173421381,"node_id":"MDEwOlJlcG9zaXRvcnkxNzM0MjEzODE=","name":"Edit-Flow","full_name":"raduconst/Edit-Flow","private":false,"owner":{"login":"raduconst","id":6512220,"node_id":"MDQ6VXNlcjY1MTIyMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/6512220?v=4","gravatar_id":"","url":"https://api.github.com/users/raduconst","html_url":"https://github.com/raduconst","followers_url":"https://api.github.com/users/raduconst/followers","following_url":"https://api.github.com/users/raduconst/following{/other_user}","gists_url":"https://api.github.com/users/raduconst/gists{/gist_id}","starred_url":"https://api.github.com/users/raduconst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raduconst/subscriptions","organizations_url":"https://api.github.com/users/raduconst/orgs","repos_url":"https://api.github.com/users/raduconst/repos","events_url":"https://api.github.com/users/raduconst/events{/privacy}","received_events_url":"https://api.github.com/users/raduconst/received_events","type":"User","site_admin":false},"html_url":"https://github.com/raduconst/Edit-Flow","description":"WordPress plugin to accelerate your editorial workflow","fork":true,"url":"https://api.github.com/repos/raduconst/Edit-Flow","forks_url":"https://api.github.com/repos/raduconst/Edit-Flow/forks","keys_url":"https://api.github.com/repos/raduconst/Edit-Flow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raduconst/Edit-Flow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raduconst/Edit-Flow/teams","hooks_url":"https://api.github.com/repos/raduconst/Edit-Flow/hooks","issue_events_url":"https://api.github.com/repos/raduconst/Edit-Flow/issues/events{/number}","events_url":"https://api.github.com/repos/raduconst/Edit-Flow/events","assignees_url":"https://api.github.com/repos/raduconst/Edit-Flow/assignees{/user}","branches_url":"https://api.github.com/repos/raduconst/Edit-Flow/branches{/branch}","tags_url":"https://api.github.com/repos/raduconst/Edit-Flow/tags","blobs_url":"https://api.github.com/repos/raduconst/Edit-Flow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raduconst/Edit-Flow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raduconst/Edit-Flow/git/refs{/sha}","trees_url":"https://api.github.com/repos/raduconst/Edit-Flow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raduconst/Edit-Flow/statuses/{sha}","languages_url":"https://api.github.com/repos/raduconst/Edit-Flow/languages","stargazers_url":"https://api.github.com/repos/raduconst/Edit-Flow/stargazers","contributors_url":"https://api.github.com/repos/raduconst/Edit-Flow/contributors","subscribers_url":"https://api.github.com/repos/raduconst/Edit-Flow/subscribers","subscription_url":"https://api.github.com/repos/raduconst/Edit-Flow/subscription","commits_url":"https://api.github.com/repos/raduconst/Edit-Flow/commits{/sha}","git_commits_url":"https://api.github.com/repos/raduconst/Edit-Flow/git/commits{/sha}","comments_url":"https://api.github.com/repos/raduconst/Edit-Flow/comments{/number}","issue_comment_url":"https://api.github.com/repos/raduconst/Edit-Flow/issues/comments{/number}","contents_url":"https://api.github.com/repos/raduconst/Edit-Flow/contents/{+path}","compare_url":"https://api.github.com/repos/raduconst/Edit-Flow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raduconst/Edit-Flow/merges","archive_url":"https://api.github.com/repos/raduconst/Edit-Flow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raduconst/Edit-Flow/downloads","issues_url":"https://api.github.com/repos/raduconst/Edit-Flow/issues{/number}","pulls_url":"https://api.github.com/repos/raduconst/Edit-Flow/pulls{/number}","milestones_url":"https://api.github.com/repos/raduconst/Edit-Flow/milestones{/number}","notifications_url":"https://api.github.com/repos/raduconst/Edit-Flow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raduconst/Edit-Flow/labels{/name}","releases_url":"https://api.github.com/repos/raduconst/Edit-Flow/releases{/id}","deployments_url":"https://api.github.com/repos/raduconst/Edit-Flow/deployments","created_at":"2019-03-02T08:10:58Z","updated_at":"2019-03-02T08:11:01Z","pushed_at":"2019-10-31T04:01:58Z","git_url":"git://github.com/raduconst/Edit-Flow.git","ssh_url":"git@github.com:raduconst/Edit-Flow.git","clone_url":"https://github.com/raduconst/Edit-Flow.git","svn_url":"https://github.com/raduconst/Edit-Flow","homepage":"http://editflow.org/","size":5730,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"2ea6d5453074eaf39d0e942f7898c1361b9aac9a","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":956583,"node_id":"MDEwOlJlcG9zaXRvcnk5NTY1ODM=","name":"Edit-Flow","full_name":"Automattic/Edit-Flow","private":false,"owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Automattic/Edit-Flow","description":"WordPress plugin to accelerate your editorial workflow","fork":false,"url":"https://api.github.com/repos/Automattic/Edit-Flow","forks_url":"https://api.github.com/repos/Automattic/Edit-Flow/forks","keys_url":"https://api.github.com/repos/Automattic/Edit-Flow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/Edit-Flow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/Edit-Flow/teams","hooks_url":"https://api.github.com/repos/Automattic/Edit-Flow/hooks","issue_events_url":"https://api.github.com/repos/Automattic/Edit-Flow/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/Edit-Flow/events","assignees_url":"https://api.github.com/repos/Automattic/Edit-Flow/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/Edit-Flow/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/Edit-Flow/tags","blobs_url":"https://api.github.com/repos/Automattic/Edit-Flow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/Edit-Flow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/Edit-Flow/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/Edit-Flow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/Edit-Flow/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/Edit-Flow/languages","stargazers_url":"https://api.github.com/repos/Automattic/Edit-Flow/stargazers","contributors_url":"https://api.github.com/repos/Automattic/Edit-Flow/contributors","subscribers_url":"https://api.github.com/repos/Automattic/Edit-Flow/subscribers","subscription_url":"https://api.github.com/repos/Automattic/Edit-Flow/subscription","commits_url":"https://api.github.com/repos/Automattic/Edit-Flow/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/Edit-Flow/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/Edit-Flow/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/Edit-Flow/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/Edit-Flow/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/Edit-Flow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/Edit-Flow/merges","archive_url":"https://api.github.com/repos/Automattic/Edit-Flow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/Edit-Flow/downloads","issues_url":"https://api.github.com/repos/Automattic/Edit-Flow/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/Edit-Flow/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/Edit-Flow/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/Edit-Flow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/Edit-Flow/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/Edit-Flow/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/Edit-Flow/deployments","created_at":"2010-10-02T14:18:19Z","updated_at":"2019-12-12T22:31:21Z","pushed_at":"2019-12-13T19:08:24Z","git_url":"git://github.com/Automattic/Edit-Flow.git","ssh_url":"git@github.com:Automattic/Edit-Flow.git","clone_url":"https://github.com/Automattic/Edit-Flow.git","svn_url":"https://github.com/Automattic/Edit-Flow","homepage":"http://editflow.org/","size":6247,"stargazers_count":302,"watchers_count":302,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":111,"license":null,"forks":133,"open_issues":111,"watchers":302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509"},"html":{"href":"https://github.com/Automattic/Edit-Flow/pull/509"},"issue":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/issues/509"},"comments":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/issues/509/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/pulls/509/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/Edit-Flow/statuses/5341ca9188030f2141f4cfa799c4fc5f9484ed7e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mjangda"}}