{"action":"created","issue":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6025","repository_url":"https://api.github.com/repos/CenterForOpenScience/osf.io","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6025/labels{/name}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6025/comments","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6025/events","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6025","id":167371825,"number":6025,"title":"[WIP] Lightly refactor registration modal","user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-25T13:55:41Z","updated_at":"2016-08-02T17:38:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6025","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6025","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/6025.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/6025.patch"},"body":"&larr; #5977 ([diff](https://github.com/whit537/osf.io/compare/debug-OSF-6447...refactor-registration-modal)) — #6050 &rarr;\r\n\r\n## Purpose\r\n\r\nI refactored the registration modal while debugging #5977. This PR contains some of the safer refactors.\r\n\r\n## Changes\r\n\r\nSee the commit log on [this diff](https://github.com/whit537/osf.io/compare/debug-OSF-6447...refactor-registration-modal).\r\n\r\n## Side effects\r\n\r\nn/a\r\n\r\n## Ticket\r\n\r\nhttps://openscience.atlassian.net/browse/OSF-6751\r\n\r\n## TODO\r\n\r\n- [ ] Fix Travis.\r\n- [ ] Rebase once #5977 lands."},"comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments/236981729","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6025#issuecomment-236981729","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6025","id":236981729,"user":{"login":"whit537","id":134455,"avatar_url":"https://avatars.githubusercontent.com/u/134455?v=3","gravatar_id":"","url":"https://api.github.com/users/whit537","html_url":"https://github.com/whit537","followers_url":"https://api.github.com/users/whit537/followers","following_url":"https://api.github.com/users/whit537/following{/other_user}","gists_url":"https://api.github.com/users/whit537/gists{/gist_id}","starred_url":"https://api.github.com/users/whit537/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whit537/subscriptions","organizations_url":"https://api.github.com/users/whit537/orgs","repos_url":"https://api.github.com/users/whit537/repos","events_url":"https://api.github.com/users/whit537/events{/privacy}","received_events_url":"https://api.github.com/users/whit537/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T17:38:36Z","updated_at":"2016-08-02T17:38:36Z","body":"Right, so the code is confused here, on the edge case. For the `todayMaximum` check we accept a moment _exactly_ four years out as short enough, but strictly speaking the max check prior to refactoring considered a `maxEmbargoMoment` that was four years out to _not_ pass the test. In harmonizing the refactored condition with the `todayMaximum` condition, I broke the expected behavior. I think the best fix here is to preserve the discrepancy with an asymmetric condition; the `todayMaximum` side is on the chopping block in #6050 anyway."}}
{"actor":{"display_login":"whit537"}}