{"action":"closed","issue":{"url":"https://api.github.com/repos/sussol/mobile/issues/530","repository_url":"https://api.github.com/repos/sussol/mobile","labels_url":"https://api.github.com/repos/sussol/mobile/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/sussol/mobile/issues/530/comments","events_url":"https://api.github.com/repos/sussol/mobile/issues/530/events","html_url":"https://github.com/sussol/mobile/issues/530","id":261153236,"number":530,"title":"After upgrade to v2 some mobile sites are stuck on push","user":{"login":"andreievg","id":26194949,"avatar_url":"https://avatars3.githubusercontent.com/u/26194949?v=4","gravatar_id":"","url":"https://api.github.com/users/andreievg","html_url":"https://github.com/andreievg","followers_url":"https://api.github.com/users/andreievg/followers","following_url":"https://api.github.com/users/andreievg/following{/other_user}","gists_url":"https://api.github.com/users/andreievg/gists{/gist_id}","starred_url":"https://api.github.com/users/andreievg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreievg/subscriptions","organizations_url":"https://api.github.com/users/andreievg/orgs","repos_url":"https://api.github.com/users/andreievg/repos","events_url":"https://api.github.com/users/andreievg/events{/privacy}","received_events_url":"https://api.github.com/users/andreievg/received_events","type":"User","site_admin":false},"labels":[{"id":571665956,"url":"https://api.github.com/repos/sussol/mobile/labels/Bug","name":"Bug","color":"d93f0b","default":false},{"id":407765175,"url":"https://api.github.com/repos/sussol/mobile/labels/Priority:%20High","name":"Priority: High","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-27T23:58:21Z","updated_at":"2017-10-09T03:21:48Z","closed_at":"2017-10-09T03:21:48Z","author_association":"CONTRIBUTOR","body":"Jack from Kiribati has been in contact with Nicole about this. We've investigated the break:\r\n\r\n[Symptoms]\r\n\r\nAfter upgrading to Mobile v2, there is a breaks during push, sync error: `undefined is not an object record.otherStoreName.id`\r\n\r\n[Explanation]\r\n\r\nIn mobile v2 a new field was added to requisition, `otherStoreName` which holds a reference to `Name` record. In outgoingSyncUtils, when translating from Realm to sync JSON, for requisition we do this: `name_ID: record.otherStoreName.id` and sync out fails because otherStoreName reference is undefined.. \r\nThere is migration code for all `type: 'request'` requisitions (the only requisitions should exist on old mobile and only requisition that should be synced out) that adjust old requisitions to have otherStoreName = supplying store name.\r\nHowever, in Kiribati, some mobile sites had `'type :'imprest'` requisitions (must have been synced to mobile site on initial sync), and they are not migrated to have `otherStoreName`, and that should have been fine if they didn't end up on the sync queue, but there was an addition to v2 migration code that puts all finalised requisitions on the sync out queue.\r\n\r\n[Solutions]\r\n* Re-sync troubled mobile site (not a good solution, loosing data + time consuming)\r\n* 2.0.2 APK with a fix\r\n\r\nFrom record_browser in Kiribati data file (same requisitions were shown in realm browser and were in the outgoing sync queue) \r\n<img width=\"675\" alt=\"screen shot 2017-09-28 at 12 57 09 pm\" src=\"https://user-images.githubusercontent.com/26194949/30943295-9ebcebb6-a44c-11e7-9fcf-2f93241dd195.png\">\r\n\r\n"}}
{"actor":{"display_login":"andreievg"}}