VertNet / webapp

VertNet web application
8 stars 7 forks source link

Data issues posted to Neotoma repo incorrectly #635

Closed dbloom closed 7 years ago

dbloom commented 7 years ago

Two issues have been posted in the last 24 hours to the neotoma-feedack organization. Issue is that Neotoma does not yet have data in VertNet. These issues were posted to the napd repo incorrectly. One is an issue for UCLA and another is for FMNH.

https://github.com/neotoma-feedback/napd/issues

In both cases the Subject for each email includes two organizations: [neotoma-feedback/napd] [FMNH Amphibians and Reptiles 235170] Xenophidion acanthognathus - Incorrect family (#1) and [neotoma-feedback/napd] [UCLA Mammals 2174] Dipodomys ingens - year (#2)

After a quick discussion with @tucotuco it may be wise to begin with the Feedback sender to see if something is amiss there.

@tucotuco please advise if you would like me to notify the data users and to move these issues manually to the correct repos and orgs.

d

tucotuco commented 7 years ago

Figured it out. The Carto call to get the repo and owner names was:

https://github.com/VertNet/webapp/blob/master/vertnet/service/github.py#L40

sql = "SELECT url, split_part(url,'=', 2) as resource, icode, github_reponame as repo, github_orgname as owner FROM resource_staging order by icode, url

The feedback API tried to match the url in the specimen record to a url from Carto. The specimen record did not have a url field, so it was null, and the first entry in Carto that matched it was NAPD.

The best way to match a record to the repo is to use the gbifdatasetid. I implemented the change to use do so in commit be4982f6027baeb0b88eae13436c6e089182ee60.