{"action":"created","issue":{"url":"https://api.github.com/repos/codinguser/gnucash-android/issues/467","repository_url":"https://api.github.com/repos/codinguser/gnucash-android","labels_url":"https://api.github.com/repos/codinguser/gnucash-android/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/codinguser/gnucash-android/issues/467/comments","events_url":"https://api.github.com/repos/codinguser/gnucash-android/issues/467/events","html_url":"https://github.com/codinguser/gnucash-android/issues/467","id":126016644,"number":467,"title":"Export Transactions: previously imported transactions are exported forever","user":{"login":"alceurneto","id":5398143,"avatar_url":"https://avatars.githubusercontent.com/u/5398143?v=3","gravatar_id":"","url":"https://api.github.com/users/alceurneto","html_url":"https://github.com/alceurneto","followers_url":"https://api.github.com/users/alceurneto/followers","following_url":"https://api.github.com/users/alceurneto/following{/other_user}","gists_url":"https://api.github.com/users/alceurneto/gists{/gist_id}","starred_url":"https://api.github.com/users/alceurneto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alceurneto/subscriptions","organizations_url":"https://api.github.com/users/alceurneto/orgs","repos_url":"https://api.github.com/users/alceurneto/repos","events_url":"https://api.github.com/users/alceurneto/events{/privacy}","received_events_url":"https://api.github.com/users/alceurneto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/codinguser/gnucash-android/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2016-01-11T19:20:28Z","updated_at":"2016-02-05T09:40:47Z","closed_at":null,"body":"**How to reproduce**\r\n1. Import a XML file with transactions (I attached a zip file with sample files);\r\n2. Enter some additional transaction;\r\n3. Select Export (pay attention to suggested time, you may have the issue #464);\r\n4. The generated QIF file will have all transactions even the one previously imported.\r\n\r\nIf we enter another transaction in GCA and export it again the generated QIF file will have the same previously imported transactions plus the new one.\r\n\r\nP.S: We cannot import the QIF file in GnuCash desktop as stated at #466\r\n\r\n**Additional information**\r\n- I've installed GCA 2.0.5 on my Nexus 5 running Android 6.0.1\r\n\r\n**Sample files**\r\n[sample-files.zip](https://github.com/codinguser/gnucash-android/files/86239/sample-files.zip)"},"comment":{"url":"https://api.github.com/repos/codinguser/gnucash-android/issues/comments/180274294","html_url":"https://github.com/codinguser/gnucash-android/issues/467#issuecomment-180274294","issue_url":"https://api.github.com/repos/codinguser/gnucash-android/issues/467","id":180274294,"user":{"login":"alceurneto","id":5398143,"avatar_url":"https://avatars.githubusercontent.com/u/5398143?v=3","gravatar_id":"","url":"https://api.github.com/users/alceurneto","html_url":"https://github.com/alceurneto","followers_url":"https://api.github.com/users/alceurneto/followers","following_url":"https://api.github.com/users/alceurneto/following{/other_user}","gists_url":"https://api.github.com/users/alceurneto/gists{/gist_id}","starred_url":"https://api.github.com/users/alceurneto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alceurneto/subscriptions","organizations_url":"https://api.github.com/users/alceurneto/orgs","repos_url":"https://api.github.com/users/alceurneto/repos","events_url":"https://api.github.com/users/alceurneto/events{/privacy}","received_events_url":"https://api.github.com/users/alceurneto/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T09:40:47Z","updated_at":"2016-02-05T09:40:47Z","body":"Hi guys!\r\n\r\nI have almost finished and I'm working now to set last-export-time to UTC - N for everyone. I'm coding `MigrationHelper.upgradeDbToVersion12(SQLiteDatabase db)` and all the magic will happen there.\r\n\r\nAll is OK but I need a `Context` in order to save the updated `last-export-time` in Android Preferences. I've a work around with static fields but it's very ugly. A better approach would be changing the signature of `MigrationHelper.upgradeDbToVersionXX` to receive both `SQLiteDatabase` and `Context`.\r\n\r\nI've seen that this method is called by reflection and I'll make the changes with care if you agree.\r\n\r\nThanks in advance."}}