{"action":"closed","number":5680,"pull_request":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/5680","id":40975471,"html_url":"https://github.com/HabitRPG/habitrpg/pull/5680","diff_url":"https://github.com/HabitRPG/habitrpg/pull/5680.diff","patch_url":"https://github.com/HabitRPG/habitrpg/pull/5680.patch","issue_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/5680","number":5680,"state":"closed","locked":false,"title":"make cron count multiple missed days as one missed day","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"body":"fixes https://github.com/HabitRPG/habitrpg/issues/4630\r\n\r\n**DO NOT MERGE**. Seeking advice (see notes I'll add in the diffs). Needs tests (I will write them). Code contains test lines that will be removed by me before merging.\r\n\r\nThis PR causes cron to behave as if only one day has been missed when the user has not logged in for two or more days.\r\n\r\n* **Habits**: No change (they already don't have code for handling multiple missed days).\r\n* **Dailies**: \r\n   * If a Daily was due at any time in the user's absence, it will be counted as missed but only once (only one day's worth of damage to the player and party will be done) and checklist items will be unticked. For Rogues, only one Stealth point will be used up by that Daily.\r\n   * If the Daily was not due at all during the user's absence, checklist items will not be unticked (and no damage of course).\r\n* **To-Dos**: Their values will be changed by only one's days worth of reddening. It could be said that this is a disadvantage because redder To-Dos are more valuable, but some users find red To-Dos demotivating, especially after an absence (all your yellow To-Dos now being bright red is startling and scary). Also, since we're removing most of the punishment from multiple days of missed Dailies, it seems fair that we also remove most of the rewards from multiple days of reddened To-Dos.\r\n\r\nThe code change has been done in a way that lets us easily go back to counting multiple missed days. For example, if we implement site-wide difficulty settings, we could have a setting to make cron NOT ignore multiple missed days.","created_at":"2015-07-28T05:01:01Z","updated_at":"2015-08-03T17:07:41Z","closed_at":"2015-08-03T17:07:40Z","merged_at":null,"merge_commit_sha":"866a1642cd00e8748ccdcd6d4c788833b631309d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/5680/commits","review_comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/5680/comments","review_comment_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/5680/comments","statuses_url":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/d4ed243d216f29a9c371a1c3ed0b26df29aa7250","head":{"label":"Alys:cron-missed-days-ignore-multiple-2015-07-21","ref":"cron-missed-days-ignore-multiple-2015-07-21","sha":"d4ed243d216f29a9c371a1c3ed0b26df29aa7250","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"repo":{"id":15664777,"name":"habitrpg","full_name":"Alys/habitrpg","owner":{"login":"Alys","id":1495809,"avatar_url":"https://avatars.githubusercontent.com/u/1495809?v=3","gravatar_id":"","url":"https://api.github.com/users/Alys","html_url":"https://github.com/Alys","followers_url":"https://api.github.com/users/Alys/followers","following_url":"https://api.github.com/users/Alys/following{/other_user}","gists_url":"https://api.github.com/users/Alys/gists{/gist_id}","starred_url":"https://api.github.com/users/Alys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alys/subscriptions","organizations_url":"https://api.github.com/users/Alys/orgs","repos_url":"https://api.github.com/users/Alys/repos","events_url":"https://api.github.com/users/Alys/events{/privacy}","received_events_url":"https://api.github.com/users/Alys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Alys/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":true,"url":"https://api.github.com/repos/Alys/habitrpg","forks_url":"https://api.github.com/repos/Alys/habitrpg/forks","keys_url":"https://api.github.com/repos/Alys/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alys/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alys/habitrpg/teams","hooks_url":"https://api.github.com/repos/Alys/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/Alys/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/Alys/habitrpg/events","assignees_url":"https://api.github.com/repos/Alys/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/Alys/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/Alys/habitrpg/tags","blobs_url":"https://api.github.com/repos/Alys/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alys/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alys/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alys/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alys/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/Alys/habitrpg/languages","stargazers_url":"https://api.github.com/repos/Alys/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/Alys/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/Alys/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/Alys/habitrpg/subscription","commits_url":"https://api.github.com/repos/Alys/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alys/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alys/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alys/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alys/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/Alys/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alys/habitrpg/merges","archive_url":"https://api.github.com/repos/Alys/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alys/habitrpg/downloads","issues_url":"https://api.github.com/repos/Alys/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/Alys/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/Alys/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/Alys/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alys/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/Alys/habitrpg/releases{/id}","created_at":"2014-01-06T04:04:30Z","updated_at":"2014-07-24T09:13:49Z","pushed_at":"2015-07-28T04:40:45Z","git_url":"git://github.com/Alys/habitrpg.git","ssh_url":"git@github.com:Alys/habitrpg.git","clone_url":"https://github.com/Alys/habitrpg.git","svn_url":"https://github.com/Alys/habitrpg","homepage":"habitrpg.com","size":228069,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"HabitRPG:develop","ref":"develop","sha":"08a4e30b8ef9a5fe614cbffef0e0218d39826798","user":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"repo":{"id":4578898,"name":"habitrpg","full_name":"HabitRPG/habitrpg","owner":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HabitRPG/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":false,"url":"https://api.github.com/repos/HabitRPG/habitrpg","forks_url":"https://api.github.com/repos/HabitRPG/habitrpg/forks","keys_url":"https://api.github.com/repos/HabitRPG/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HabitRPG/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HabitRPG/habitrpg/teams","hooks_url":"https://api.github.com/repos/HabitRPG/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/HabitRPG/habitrpg/events","assignees_url":"https://api.github.com/repos/HabitRPG/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/HabitRPG/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/HabitRPG/habitrpg/tags","blobs_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/HabitRPG/habitrpg/languages","stargazers_url":"https://api.github.com/repos/HabitRPG/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/HabitRPG/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/HabitRPG/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/HabitRPG/habitrpg/subscription","commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/HabitRPG/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/HabitRPG/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HabitRPG/habitrpg/merges","archive_url":"https://api.github.com/repos/HabitRPG/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HabitRPG/habitrpg/downloads","issues_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/HabitRPG/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/HabitRPG/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/HabitRPG/habitrpg/releases{/id}","created_at":"2012-06-06T22:49:48Z","updated_at":"2015-08-02T15:53:45Z","pushed_at":"2015-08-03T16:41:44Z","git_url":"git://github.com/HabitRPG/habitrpg.git","ssh_url":"git@github.com:HabitRPG/habitrpg.git","clone_url":"https://github.com/HabitRPG/habitrpg.git","svn_url":"https://github.com/HabitRPG/habitrpg","homepage":"habitrpg.com","size":261649,"stargazers_count":2963,"watchers_count":2963,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1166,"mirror_url":null,"open_issues_count":420,"forks":1166,"open_issues":420,"watchers":2963,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/5680"},"html":{"href":"https://github.com/HabitRPG/habitrpg/pull/5680"},"issue":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/issues/5680"},"comments":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/issues/5680/comments"},"review_comments":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/5680/comments"},"review_comment":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/5680/commits"},"statuses":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/d4ed243d216f29a9c371a1c3ed0b26df29aa7250"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":10,"commits":1,"additions":31,"deletions":10,"changed_files":3}}