MapofLife / vernacular-names

A framework for managing vernacular names in a database, along with scripts to make sense of the data
0 stars 1 forks source link

Add a button to delete common names #71

Closed villanueval closed 10 years ago

villanueval commented 10 years ago

There doesn't seem to be a way to delete common names from species, only editing or adding more.

I've done it by deleting the row in the table directly. I've found some errors that were cumbersome to clean. There should be a button to delete a selected name.

For example, Bombus occidentalis had two wrong names, so I had to do the delete manually:

DELETE FROM vernacular_names WHERE cartodb_id=1331593
DELETE FROM vernacular_names WHERE cartodb_id=1329547
gaurav commented 10 years ago

Hi Luis! The idea behind not having a straightforward delete method was that newer names entered into NomDB always override existing names in NomDB, so if you add a common name to Bombus occidentalis, it should override the existing names. That way, if you mess up, the old name is still around and we have an audit trail on who changed which name and where, and -- with the "source" field -- a record of where the incorrect names came from, in case we later want to complain to that source. It also means the wrong name stays in the system, so users will be less likely to reimport the wrong name in the future.

There is a short-term deletion functionality on the recent changes page (http://names.mol-api.appspot.com/recent), but currently the recent changes page only displays the last 100 changes. This is mainly intended for if you mess up something up while fixing names.

So: if the override-old-name system doesn't work for you, I could extend the list of recent changes so that you can go back to any change and delete it from there. However, I think the override system is the best way of keeping incorrect names around so they don't get reused, so I'd like to leave them as is. If you click on "Add another" from http://names.mol-api.appspot.com/?lookup=Bombus%20occidentalis, it should always replace the existing name with your new name.

villanueval commented 10 years ago

OK, if the idea is to keep the old ones, this works.