WHOIGit / ooicgsn-roundabout

CGSN Roundabout Asset Tracking system
Other
4 stars 4 forks source link

Bulk Export Vessels with Empty Active and R2R fields Exports Nothing #264

Closed joannekoch closed 3 years ago

joannekoch commented 3 years ago

If a Vessel has empty Active and R2R fields, the Vessel is not exported in the Bulk Export File.

sbatchelder commented 3 years ago

@joannekoch What do you mean by an empty field here? Is this via csv upload?

I tried to reproduce the error but the primary means I know of is via the Cruise > Vessel List > Add Vessel route, and that form only has Yes/No options for Active and R2R. A test where a vessel had both as "No" showed up fine in the download list.

image

joannekoch commented 3 years ago

Issue #210 References empty Active and R2R fields.

Try to import https://github.com/oceanobservatories/asset-management/blob/master/vessel/shiplist.csv The Dauntless and Matthew Hughes have empty fields in this file. When you import, these Vessels are created but they are not exported.

sbatchelder commented 3 years ago

Okay this is a bit dumb but where is the upload interface? I tried going to <localhost>/ooi_ci_tools/import/vessels/upload/ which i think is the right path but that's clearly not it. Where is the upload interface accessed from?

joannekoch commented 3 years ago

Yea, I had to clone it to my desktop... Here's my file. Just rename it: shiplist-import.csv.

shiplist-import.txt

sbatchelder commented 3 years ago

Err, what I mean is, I don't know where "bulk upload" for vessels/in-general is found on the RDB interface.

and fyi you can download a single file off a git repo without cloning the whole thing using the Raw button towards the top-right of the file :)

image

joannekoch commented 3 years ago

Click on the "Wheel" icon. Choose "Upload Github CSVs".

Thanks for the tip!

sbatchelder commented 3 years ago

Ah well there's the issue, I don't have the wheel/gear icon on my interface. Turns out my user is not Admin. I can probably find a way to change that. Thanks!

cahearn commented 3 years ago

Looks Great! Tested on Staging, with repeated imports of fictitious R/V Bosun. Also, the Dauntless and Matthew Hughes show up in export. Nice work!