{"action":"created","issue":{"url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/1541","repository_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex","labels_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/1541/labels{/name}","comments_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/1541/comments","events_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/1541/events","html_url":"https://github.com/moneymanagerex/moneymanagerex/issues/1541","id":312902743,"number":1541,"title":"Remove BASECONVRATE from CURRENCYFORMATS table","user":{"login":"slodki","id":3155552,"avatar_url":"https://avatars3.githubusercontent.com/u/3155552?v=4","gravatar_id":"","url":"https://api.github.com/users/slodki","html_url":"https://github.com/slodki","followers_url":"https://api.github.com/users/slodki/followers","following_url":"https://api.github.com/users/slodki/following{/other_user}","gists_url":"https://api.github.com/users/slodki/gists{/gist_id}","starred_url":"https://api.github.com/users/slodki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slodki/subscriptions","organizations_url":"https://api.github.com/users/slodki/orgs","repos_url":"https://api.github.com/users/slodki/repos","events_url":"https://api.github.com/users/slodki/events{/privacy}","received_events_url":"https://api.github.com/users/slodki/received_events","type":"User","site_admin":false},"labels":[{"id":101822865,"url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/milestones/7","html_url":"https://github.com/moneymanagerex/moneymanagerex/milestone/7","labels_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/milestones/7/labels","id":2350460,"number":7,"title":"v1.4.x","description":"Json lib upgrade, docs re-org and code tuning","creator":{"login":"vomikan","id":6836805,"avatar_url":"https://avatars1.githubusercontent.com/u/6836805?v=4","gravatar_id":"","url":"https://api.github.com/users/vomikan","html_url":"https://github.com/vomikan","followers_url":"https://api.github.com/users/vomikan/followers","following_url":"https://api.github.com/users/vomikan/following{/other_user}","gists_url":"https://api.github.com/users/vomikan/gists{/gist_id}","starred_url":"https://api.github.com/users/vomikan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vomikan/subscriptions","organizations_url":"https://api.github.com/users/vomikan/orgs","repos_url":"https://api.github.com/users/vomikan/repos","events_url":"https://api.github.com/users/vomikan/events{/privacy}","received_events_url":"https://api.github.com/users/vomikan/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":5,"state":"open","created_at":"2017-02-27T15:45:32Z","updated_at":"2018-04-20T18:45:43Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2018-04-10T12:34:41Z","updated_at":"2018-04-22T07:25:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Now we have 2 overlapping implementations of currency rates: one simple inside CURRENCYFORMATS and more sophisticated in dedicated CURRENCYHISTORY table.\r\n\r\nMy proposal:\r\n* use only CURRENCYHISTORY records\r\n* remove BASECONVRATE field from CURRENCYFORMATS\r\n* do not store meaningless \"1\" default value in database\r\n* implement following logic to maintain compatibility with current assumptions:\r\n```c\r\ndouble find_currency_rate_for_given_date(currency curr, date d) {\r\n  if (currencyhistory(curr) is empty || d<oldest in currencyhistory(curr))\r\n    return 1 /* no conversion done if rate is unknown */\r\n  else iterate through currencyhistory(curr) records...\r\n}\r\n```\r\n\r\nThis should help with #1158, #1183, #1537, improve data model design (removes redundancy) and improve UX.\r\n\r\nProblems:\r\n1. Migration from old model for currencies with no CURRENCYHISTORY and with BASECONVRATE <> 1 - there is not enough details available to migrate to new structure. Proposals: a) migrate user's value adding \"1900-01-01\" date to it b) not migrate BASECONVRATE value to CURRENCYHISTORY\r\n2. Migration from old model BASECONVRATE not matching CURRENCYHISTORY values. Proposals: same as above."},"comment":{"url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/comments/383361323","html_url":"https://github.com/moneymanagerex/moneymanagerex/issues/1541#issuecomment-383361323","issue_url":"https://api.github.com/repos/moneymanagerex/moneymanagerex/issues/1541","id":383361323,"user":{"login":"gabriele-v","id":7106290,"avatar_url":"https://avatars0.githubusercontent.com/u/7106290?v=4","gravatar_id":"","url":"https://api.github.com/users/gabriele-v","html_url":"https://github.com/gabriele-v","followers_url":"https://api.github.com/users/gabriele-v/followers","following_url":"https://api.github.com/users/gabriele-v/following{/other_user}","gists_url":"https://api.github.com/users/gabriele-v/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriele-v/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriele-v/subscriptions","organizations_url":"https://api.github.com/users/gabriele-v/orgs","repos_url":"https://api.github.com/users/gabriele-v/repos","events_url":"https://api.github.com/users/gabriele-v/events{/privacy}","received_events_url":"https://api.github.com/users/gabriele-v/received_events","type":"User","site_admin":false},"created_at":"2018-04-22T07:25:15Z","updated_at":"2018-04-22T07:25:15Z","author_association":"CONTRIBUTOR","body":"Hi @slodki , two implementations are not overlapping:\r\n- baseconvrate if user doesn't wont to take care of currencyhistory (IE download changes every time etc..) and just want a fixed change rate\r\n- currencyhistory if user wants daily change rates\r\n\r\nUp to me we could keep both, but better specifying with a tooltip (and maybe renaming to something like \"fixedrate\") baseconvrate."}}
{"actor":{"display_login":"gabriele-v"}}