{"action":"created","issue":{"url":"https://api.github.com/repos/HabitRPG/habitica/issues/8721","repository_url":"https://api.github.com/repos/HabitRPG/habitica","labels_url":"https://api.github.com/repos/HabitRPG/habitica/issues/8721/labels{/name}","comments_url":"https://api.github.com/repos/HabitRPG/habitica/issues/8721/comments","events_url":"https://api.github.com/repos/HabitRPG/habitica/issues/8721/events","html_url":"https://github.com/HabitRPG/habitica/issues/8721","id":227296177,"number":8721,"title":"clicking cancel subscription button twice causes subscription to terminate too early","user":{"login":"Alys","id":1495809,"avatar_url":"https://avatars0.githubusercontent.com/u/1495809?v=4","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},"labels":[{"id":23570460,"url":"https://api.github.com/repos/HabitRPG/habitica/labels/priority:%20important","name":"priority: important","color":"d93f0b","default":false},{"id":428242731,"url":"https://api.github.com/repos/HabitRPG/habitica/labels/status:%20issue:%20in%20progress","name":"status: issue: in progress","color":"fbca04","default":false},{"id":509888360,"url":"https://api.github.com/repos/HabitRPG/habitica/labels/type:%20medium%20level%20coding","name":"type: medium level coding","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-09T09:00:46Z","updated_at":"2017-10-20T22:14:42Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If you have a multi-month recurring subscription (3, 6, or 12 months) and **you click the cancel button twice instead of once**, the subscription terminates in one month instead of terminating at the end of the period you have paid for.\r\n\r\nSteps to reproduce **correct** behaviour:\r\n\r\n1. Create a 12 month subscription\r\n2. Go to Settings > Subscription\r\n3. Click the cancel button and click the \"ok\" button on the connfirmation popup\r\n4. Wait for the website to reload\r\n5. Confirm that your subscription ends 12 months from today (correct behaviour)\r\n\r\n\r\nSteps to reproduce **buggy** behaviour:\r\n\r\n1. Create a 12 month subscription\r\n2. Go to Settings > Subscription\r\n3. Click the cancel button and click the \"ok\" button on the connfirmation popup\r\n4. **Immediately** click the cancel button again and click \"ok\" again (i.e., **before** the website has reloaded)\r\n5. Wait for the website to reload\r\n6. Confirm that your subscription ends only 1 month from today (bug)\r\n\r\nThis could occur if the website is slow to reload and the user thinks that their first cancellation has not been successful.\r\n\r\n<strike>One solution would be to disable the button after it has been clicked once. The disable has to last just until the page is reloaded because after the reload is finished it will be obvious that the subscription has been cancelled.</strike> EDIT: a better idea is below.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/HabitRPG/habitica/issues/comments/338334756","html_url":"https://github.com/HabitRPG/habitica/issues/8721#issuecomment-338334756","issue_url":"https://api.github.com/repos/HabitRPG/habitica/issues/8721","id":338334756,"user":{"login":"MathWhiz","id":12386291,"avatar_url":"https://avatars3.githubusercontent.com/u/12386291?v=4","gravatar_id":"","url":"https://api.github.com/users/MathWhiz","html_url":"https://github.com/MathWhiz","followers_url":"https://api.github.com/users/MathWhiz/followers","following_url":"https://api.github.com/users/MathWhiz/following{/other_user}","gists_url":"https://api.github.com/users/MathWhiz/gists{/gist_id}","starred_url":"https://api.github.com/users/MathWhiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MathWhiz/subscriptions","organizations_url":"https://api.github.com/users/MathWhiz/orgs","repos_url":"https://api.github.com/users/MathWhiz/repos","events_url":"https://api.github.com/users/MathWhiz/events{/privacy}","received_events_url":"https://api.github.com/users/MathWhiz/received_events","type":"User","site_admin":false},"created_at":"2017-10-20T22:14:42Z","updated_at":"2017-10-20T22:14:42Z","author_association":"CONTRIBUTOR","body":"@ru-lai Are you still working on this?"}}
{"actor":{"display_login":"MathWhiz"}}