{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/607","repository_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/607/labels{/name}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/607/comments","events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/607/events","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/issues/607","id":248723127,"number":607,"title":"AMT_CG_rt is pinned to CG_rt","user":{"login":"hdoupe","id":9206065,"avatar_url":"https://avatars1.githubusercontent.com/u/9206065?v=4","gravatar_id":"","url":"https://api.github.com/users/hdoupe","html_url":"https://github.com/hdoupe","followers_url":"https://api.github.com/users/hdoupe/followers","following_url":"https://api.github.com/users/hdoupe/following{/other_user}","gists_url":"https://api.github.com/users/hdoupe/gists{/gist_id}","starred_url":"https://api.github.com/users/hdoupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdoupe/subscriptions","organizations_url":"https://api.github.com/users/hdoupe/orgs","repos_url":"https://api.github.com/users/hdoupe/repos","events_url":"https://api.github.com/users/hdoupe/events{/privacy}","received_events_url":"https://api.github.com/users/hdoupe/received_events","type":"User","site_admin":false},"labels":[{"id":238901395,"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-08T13:54:28Z","updated_at":"2017-08-08T16:13:38Z","closed_at":null,"body":"I am creating a separate issue for the bug found in #606.\r\n\r\n_AMT_CG_rt{1,2,3} -- If _CG_rt{i} is altered, then the corresponding rate _AMT_CG_rt{i} is pinned to the former rate, i = 1, 2, and 3. But _AMT_CG_rt4 is not affected. If _CG_rt{1,2,3} are not altered then _AMT_CG_rt{1,2,3} are correctly set to the specified values. See http://ospc-taxes7.herokuapp.com/taxbrain/edit/1406/?start_year=2017 and http://ospc-taxes7.herokuapp.com/taxbrain/edit/1407/?start_year=2017\r\n\r\nThis is probably a bug and not a feature.  @martinholmer found the relevant issues and PRs: \r\n\r\n> First, look at [item 4 in Tax-Calculator issue 1074](https://github.com/open-source-economics/Tax-Calculator/issues/1074) and [item 4 in Tax-Calculator pull request 1109](https://github.com/open-source-economics/Tax-Calculator/pull/1109), which was merged on December 22, 2016.\r\n>\r\n> Then look at TaxBrain pull request #448 (merged on January 12, 2017), which was supposed to be the fix on the TaxBrain side. However, the #448 TaxBrain changes did not eliminate the AMT_fixup logic in views.py, which had been added earlier on September 26, 2016, in pull request #342.\r\n> \r\n> So, maybe I'm reading too fast, but it seems as if the behavior you've found was once considered a \"feature\", then became to be viewed as a \"bug\", but was never removed from TaxBrain. You're doing a great job on this TaxBrain debugging, so I'll leave it to you to read these issues and pull requests more carefully than I have to see what the intention was. Only then will you be able to determine if this behavior is a \"feature\" or a \"bug\".\r\n\r\nI will open a PR with a test exposing this bug shortly.\r\n\r\n@brittainhard @PeterDSteinberg "},"comment":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/comments/321005256","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/issues/607#issuecomment-321005256","issue_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/607","id":321005256,"user":{"login":"hdoupe","id":9206065,"avatar_url":"https://avatars1.githubusercontent.com/u/9206065?v=4","gravatar_id":"","url":"https://api.github.com/users/hdoupe","html_url":"https://github.com/hdoupe","followers_url":"https://api.github.com/users/hdoupe/followers","following_url":"https://api.github.com/users/hdoupe/following{/other_user}","gists_url":"https://api.github.com/users/hdoupe/gists{/gist_id}","starred_url":"https://api.github.com/users/hdoupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdoupe/subscriptions","organizations_url":"https://api.github.com/users/hdoupe/orgs","repos_url":"https://api.github.com/users/hdoupe/repos","events_url":"https://api.github.com/users/hdoupe/events{/privacy}","received_events_url":"https://api.github.com/users/hdoupe/received_events","type":"User","site_admin":false},"created_at":"2017-08-08T16:13:38Z","updated_at":"2017-08-08T16:13:38Z","body":"@talumbau I'm pretty sure that it is still in the TaxBrain GUI interface.\r\n\r\nhttps://www.ospc.org/taxbrain/\r\n![screen shot 2017-08-08 at 11 53 59 am](https://user-images.githubusercontent.com/9206065/29081373-67743fb8-7c30-11e7-9a83-aaf9c88e8ffa.png)\r\n\r\nAnd the corresponding entry in `taxcalc/current_law_policy.json`\r\n\r\n```\r\n    \"_AMT_CG_rt1\": {\r\n        \"long_name\": \"Long term capital gain and qualified dividends (AMT) rate 1\",\r\n        \"description\": \"Capital gain and qualified dividends (stacked on top of regular income) below threshold 1 are taxed at this rate. \",\r\n        \"section_1\": \"Capital Gains And Dividends\",\r\n        \"section_2\": \"AMT - Long Term Capital Gains And Qualified Dividends\",\r\n        \"irs_ref\": \"Form 6251, line 47, in-line. \",\r\n        \"notes\": \"\",\r\n        \"row_var\": \"FLPDYR\",\r\n        \"row_label\": [\"2013\"],\r\n        \"start_year\": 2013,\r\n        \"cpi_inflated\": false,\r\n        \"col_var\": \"\",\r\n        \"col_label\": \"\",\r\n        \"value\": [0.0]\r\n    },\r\n```\r\n\r\nI see that you removed AMT capital gains in #342 but I'm having trouble figuring out where it was added back in or why it is still in the TaxBrain GUI\r\n\r\nI can maybe see the value in pinning `AMT_CG_rt` to `CG_rt` when `AMT_CG_rt` is not modified but `CG_rt` is.  But, if `AMT_CG_rt` is modified, then I don't think that it should be changed.  Perhaps, `amt_fixup` should be:\r\n\r\n```\r\ndef amt_fixup(request, reform, model):\r\n    \"\"\"\r\n    Take the regular tax captial gains parameters from the user reform\r\n    and set them as the equivalent Alternative Minimum Tax capital\r\n    gains parameters\r\n    \"\"\"\r\n    cap_gains_params = [\"CG_rt1\", \"CG_thd1_0\", \"CG_thd1_1\",\r\n                        \"CG_thd1_2\", \"CG_thd1_3\", \"CG_thd1_cpi\",\r\n                        \"CG_rt2\", \"CG_thd2_0\", \"CG_thd2_1\",\r\n                        \"CG_thd2_2\", \"CG_thd2_3\", \"CG_thd2_cpi\",\r\n                        \"CG_rt3\"]\r\n\r\n    for cgparam in cap_gains_params:\r\n        if cgparam in reform and 'AMT_' + cgparam not in reform:\r\n            reform['AMT_' + cgparam] = reform[cgparam]\r\n            if cgparam.endswith(\"_cpi\"):\r\n                setattr(model, 'AMT_' + cgparam, reform[cgparam])\r\n            else:\r\n                setattr(model, 'AMT_' + cgparam, reform[cgparam][0])\r\n```\r\n\r\n@martinholmer "}}
{"actor":{"display_login":"hdoupe"}}