BiologicalRecordsCentre / SPRING

Repository for tracking issues for the SPRING (EU Pollinator Monitoring) project
GNU General Public License v3.0
0 stars 0 forks source link

Multiple users reporting for same moth trap #114

Open larspett opened 9 months ago

larspett commented 9 months ago

Similar to how butterfly transects are unique, there is a need to implement standardised, unique trap sites for moth traps within ButterflyCount. This would allow moth trap sites to be handled by more than one person. We are a team taking care of the two Ecology Building moth traps and would want to allow multiple persons to upload data from these two traps. Not having this option will flood the system with multiple sites that are really the same ones once the system starts to be used for systematic moth monitoring (which will happen next year, most likely).

kazlauskis commented 9 months ago

@larspett could these traps be public or do you want to restrict who can see a shared trap?

@johnvanbreda the app uses /services/rest/locations?location_type_id=18879 endpoint to fetch user moth trap locations. Could we enable shared/public locations? I think there was a public=true request param, no? Or maybe I could use an anonymous user token to fetch locations that are public.

johnvanbreda commented 9 months ago

@kazlauskis the request generates the following SQL in the WHERE part of the query:

WHERE t1.deleted=false 
AND ((t2.website_id=2 AND t1.created_by_id=3) OR t1.public=true) 
AND t1.location_type_id=18879

So the logic is currently to fetch all location of that type if they are public or if they are created by the logged in user and linked to the website.

kazlauskis commented 9 months ago

In that case, is it a matter of setting public=true when creating a moth trap location? I assume the public is a system attribute that can be set.

larspett commented 9 months ago

I will check with present Swedish moth recorders during the weeken to hear their preferences for the site selection and the multiple trapping days options.

13 okt. 2023 kl. 16:04 skrev Karolis Kazlauskis @.***>:



In that case, is it a matter of setting public=true when creating a moth trap location? I assume the public is a system attribute that can be set.

— Reply to this email directly, view it on GitHubhttps://github.com/BiologicalRecordsCentre/SPRING/issues/114#issuecomment-1761579035, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEVQXZGHPDTD34RQMEAK3LLX7FC7HANCNFSM6AAAAAA53RSGFI. You are receiving this because you were mentioned.Message ID: @.***>