Hi. Collection projects that have a rule that requires observations to be from specific members seem to all be missing links back from those observations to the projects to which they belong, even though those observations otherwise show up on the project page and can be located by using a project filter on the search form. Details below.
Our Discord member observations
Associated with the Discord server we have some iNat Projects which are collection projects that specify among the rules that observations must be from a selected list of users (i.e. members of the Discord server). These have recently stopped showing their links back to the projects that the observations belong to on the observation pages themselves, even though the project pages continue to show all observations that match the rules for collection. Here are two of these projects in which we first noticed the issue:
-
https://www.inaturalist.org/projects/discord-inaturalist-yearlisting-2019
- the project_id is 33276
-
https://www.inaturalist.org/projects/inaturalist-discord-server
- the project_id is 48611
Any random observation selected from either of these projects is expected to have the badge and link back to the project that contains it, but those are missing, e.g. this recent observation is in both projects:
and this much older observation is not in the yearlist project but is in the other project:
Neither observation has a link back to the Discord projects to which they belong.
Other projects than ours are affected
I thought at first that all collection projects were broken, but quickly discovered that many other collection projects do not have this issue. Then I traced it to the kind of collection project that we have, that I believe is relatively uncommon: most collection projects don’t specify that the observations must be made by specific user_ids. I then searched for projects with “member” in the name and randomly selected this one for comparison:
It exhibits the same bug. Clicking any observation in this project will show that the observation itself does not link back to this collection project, e.g.
Interference with ongoing code development
The timing of the problem is unfortunate, as I was in the process of rolling out features in the Discord bot we’ve been developing that made use of project_ids, and specifically, our own Discord project_ids. Because I was looking closely at the JSON data returned by the /v1/observations API call, and that was an unfamiliar way of looking at the data vs. just looking at the observation page itself on the web, I missed the forest for the trees. I thought somehow project_ids for collection projects were by design treated differently than for traditional projects!
For example, if you look at this record, you’ll note that project_ids
is empty (i.e. []
):
https://api.inaturalist.org/v1/observations/35052020
even though this record can be located within the project, e.g. by this search:
Once I got independent confirmation from other users around the same time that they started noticing the missing link back to the project from their observations, I finally clued in that we had a bug here, and not merely an API limitation.
Meanwhile, I can focus development efforts on another area of the code while we wait for the issue to be fixed.
Conclusion
I hope you can find the cause of and fix this issue soon.
Thanks, on behalf of all of us on the unofficial Discord iNat server.