unepwcmc/SAPI — pull request #194 by simaob (2014-02-05 17:36:33+00:00)
Title: Update shipments import to import trade names shipments

This Pull Request follows this one: https://github.com/unepwcmc/SAPI/pull/193

It adds a new task to import shipments associated with Trade Names. This new task uses a method that is very similar to the existing shipments import method but instead of using the mapping table uses the legacy_trade_code column on the newly added trade names. I have also added this method on the already existing shipments import task, so that when we do the final import we don't need to run as separate methods.

To test this PR you should run:

rake import:shipments_for_trade_names[lib/files/shipments_details_data_table.csv]

NOTE: I'm started to think that we might forget all the tasks that we will need to run for the final import, so here they are for my memory sake:

Import Missing Geo Entities (rake import:unusual_geo_entities)
Import mapping table between Trade Taxons and Species Plus Taxon Concepts ( rake import:trade_species_mapping )
Importing Trade Names (rake import:trade_names)
Import Shipments (rake import:shipments[file])
Import Permits (rake import:trade_permits)

Further to this we need to remember to run the End date task for EU Regulations (when we merge with master and deploy to Production)