{"action":"opened","issue":{"url":"https://api.github.com/repos/SalesforceFoundation/Cumulus/issues/1318","labels_url":"https://api.github.com/repos/SalesforceFoundation/Cumulus/issues/1318/labels{/name}","comments_url":"https://api.github.com/repos/SalesforceFoundation/Cumulus/issues/1318/comments","events_url":"https://api.github.com/repos/SalesforceFoundation/Cumulus/issues/1318/events","html_url":"https://github.com/SalesforceFoundation/Cumulus/issues/1318","id":55689045,"number":1318,"title":"As a user, I do not want an address record to be created if no address information is entered in an account, but State and Country picklists are enabled and a default Country value is selected","user":{"login":"ceiroa","id":1894238,"avatar_url":"https://avatars.githubusercontent.com/u/1894238?v=3","gravatar_id":"","url":"https://api.github.com/users/ceiroa","html_url":"https://github.com/ceiroa","followers_url":"https://api.github.com/users/ceiroa/followers","following_url":"https://api.github.com/users/ceiroa/following{/other_user}","gists_url":"https://api.github.com/users/ceiroa/gists{/gist_id}","starred_url":"https://api.github.com/users/ceiroa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceiroa/subscriptions","organizations_url":"https://api.github.com/users/ceiroa/orgs","repos_url":"https://api.github.com/users/ceiroa/repos","events_url":"https://api.github.com/users/ceiroa/events{/privacy}","received_events_url":"https://api.github.com/users/ceiroa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-27T23:07:47Z","updated_at":"2015-01-27T23:07:47Z","closed_at":null,"body":"With state and country picklists enabled and a default country value selected, the tests newAddrForOrgAccounts and updateOrgAccounts in ADDR_Addresses_TEST currently fail.\r\n\r\nTaking the example of updateOrgAccounts, if picklists are enabled it fails because address records are created when the accounts are created. This happens because of the default value automatically given to the account country. \r\n\r\nSetting ADDR_Addresses_TDTM.hasRunAddrTrigger to false before doing the account update should not be necessary, because no address records should have been created on insert. If we to set it, then we get an error because twice the number of address records get created (1 per account insert, and 1 per account update).\r\n\r\nWe should consider whether a new address record should actually be created if the only address information in the existing record is the country. Maybe we should update the existing record instead, specially if the country does not change."}}