| Issue 70: | Country list should be redefined and repopulated | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Here I will not post a patch as I don't have sure what is better or more correct, but I found some errors in the country list, and as I understood its not populated exactly with countries but with "Fedex destinations" In first place I think its a little difficult to define what a country is, a good resource is wikipedia, http://en.wikipedia.org/wiki/List_of_countries Some problems found: Records: Azores is not a country. What is Ascension? U.S.S.R, no comments :) British Forces Post Office? Czech Republic two times. A lot of destinations with the number_of_orders already filled where it should be zero. Some of these are not visible because the code filters records that doesn't have a "fedex_code". Table structure: Theres no such a thing as "fedex_code", these are IATA country codes. What is a ufsi_code? Anyway I think it should be discussed before be fixed. Regards.
Mar 30, 2008
#1
edmundo...@gmail.com
Apr 9, 2008
:) 'ufsi_code' was originally used to interface with a fulfillment house. This can be dropped. I'm all for moving towards the ISO country code list. Patch away and I'll get it rolling.
Status:
Accepted
Labels: -Priority-Medium Priority-Low
Apr 9, 2008
ok. But this one I will need to make a migration, I will see how the rest of the issues behaves before change this.
Apr 20, 2008
Here it goes, a patch to the country list. I don't like the way _address.rhtml is being used by more than one controller, normally those partials go into the shared folder. Anyway I didn't changed its place. Take a look how it was done. I added a rank column to be able to put desired countries at the top of the select list, I added a boolean is_obsolete column too to distinguish obsolete contries. The checkout action will use the list without the obsolete values, so it doens't allow those values to be chosen. But those values can be associated with old orders or even the home country, so the preferences and orders actions from the administrative interface uses a complete list including obsolete values. To new deployed systems the two lists will be the same, anyway I think really should exist the possibility to obsolete some things and hold them to have history, a good example is exactly the country list, it will ever change. Removed the columns ufsi_code and number_of_orders that aren't used (number_of_orders is calculated using a select count statement, its not maintained in this column). Follows a migration too.
Aug 11, 2008
Patch looks good in the code, but running it I get a "malformed patch" error. Anyone know how to fix this, or perhaps can you reapply your changes to the trunk?
Labels:
-Priority-Low Priority-Medium
Aug 14, 2008
The only problem that I found is that I patched the fixture file including a number_of_orders field (but this field, the rake task delete), I get rid of those lines in the attached file. (Then the same thing must be done with the fixture used in tests), then it depends if you have already patched issue 8 or not, just get rif of the "number_of_orders: 0" lines. For me the patch apply clean in r116.
Aug 14, 2008
Here goes another patch for a little problem visible using tests, I missed a place referencing the old fedex_code field.
Aug 15, 2008
Thanks, fixed in r120 Had to manually patch the test fixture a little, but no big deal.
Status:
Fixed
|