NERC-CEH / irecord-app

📱iRecord mobile application
https://irecord.org.uk/app/
GNU General Public License v3.0
6 stars 7 forks source link

App records making inconsistent links to activities #282

Open kitenetter opened 6 months ago

kitenetter commented 6 months ago

HI @kazlauskis I'm not sure if this is a problem at the app end of things or the warehouse, but I'm starting with the app. Mike Prince recently added a set of records using the app while it was linked to activity ID 2786. There are 32 occurrences all under the same parent_sample_id but only two of these occurrences have ended up with a link to the activity. Do you know why this has happened?

Occurrence data: missing group id.csv

kazlauskis commented 6 months ago

@kitenetter I looked into this and can't see why some subsamples are not linked to activities. For some reason, the warehouse logs for the day this record was created don't open through the warehouse web interface, so I can't see what the app has sent. You should ask one of the web developers to check the records in the database.

The app sets the group_id to both samples and subsamples, but this can get complex because activities have an expiry date and other involved logic. It would help if group_id was inherited by subsamples as we do now for some other core attributes here.