This is my best guess from what I can find in the record:
- iterate over all the IDs & find the last id by the user
- compare their last
taxon.idwith the communitytaxon.id - is the observer’s
taxon.idinident_taxon_idsand equal or lower in the ancestry than the communitytaxon.id? if so, it counts towards the id, so:- add 1 to the identifications_count, the right-hand number
- add 1 to the num_identification_agreements, the left-hand number
- otherwise it falls into one of two categories:
-
it did not conflict with the community
taxon.id(i.e. was one ofident_taxon_ids) but doesn’t count towards the ID (because it was higher in rank than the ID):- nothing is added or subtracted
-
it did conflict with the community taxon_id (i.e. was not in
ident_taxon_ids), so must be counted as an ID (maverick):- add 1 to identifications_count, the right-hand-number
-
it did not conflict with the community
I think everything that is needed for that is in the record, but it seems like an awful lot of extra work, so I just wanted to check if I had missed something simpler.