Deleting 1 encounter deleted all others related to it

In which Wildbook did the issue occur? ACW

What operating system were you using? Win 10

What web browser were you using? Chrome Version 88.0.4324.104

What is your role on the site? admin

What happened?
There’s an encounter record that has 2 cheetahs in it but too blurred to be identifiable. My intent was to add annotations around each cheetah, mark each as “unidentifiable” and then delete the original, unannotated encounter. Here’s what happened:

  1. I selected this encounter: https://africancarnivore.wildbook.org/encounters/encounter.jsp?number=1348be2b-fc75-46b5-9e2d-52a9b9c36a9b
  2. I clicked on “add annotation”, added the 1st annotation
  3. I clicked on “add annotation”, added the 2nd annotation
  4. Clicked on the links for each new encounter created to open those encounters - marked each as “unidentifiable”
  5. Went back to the tab with the original encounter, selected “delete encounter”
  6. Went to one of the new encounter records and it was now showing this:
    image
  7. Went to the 2nd new encounter tab and clicked on the arrows on the (yellow) annotation for the other encounter record that had just disappeared per #6 above and the tab refreshed to show this:
    image

So now all 3 encounters are gone.

What did you expect to happen?
2 new encounters with new annotations would not be deleted when I deleted the original, unannotated encounter.

What are some steps we could take to reproduce the issue?

Here’s the info from post deletion of the original encounter record:
Success: I have removed encounter 1348be2b-fc75-46b5-9e2d-52a9b9c36a9b from the database. If you have deleted this encounter in error, please contact the webmaster and reference encounter 1348be2b-fc75-46b5-9e2d-52a9b9c36a9b to have it restored.

Thanks
Maureen

I’ve just had this happen again so I believe “delete encounter” is somehow broken.

Steps I just took:
Opened an encounter record that was this hind view of Aspen:

There were 3 annotations, so 1 extra, for the body. I opened that encounter and deleted it. Now all 3 encounters have been deleted.

I logged out and back in again and now that encounter has the hind view, with just the 2 annotations on it. So confused!
https://africancarnivore.wildbook.org/encounters/encounter.jsp?number=74ba34f3-5874-4da4-9468-bdfba6dfd5db

Hi ACW Admin,

I double checked our EncounterDelete code, and it can only accept one Encounter number to delete at a time. There should not be a cascading way for multiple Encounters to be deleted.

Would you be able to set up some test data for us to try this with? Your data example looks like real data that I don’t want to delete during testing.

Thanks,
Jason

Hi @jason - I should be able to upload some data you can use to test with. In the meantime, is it possible to recover that deleted encounter record? I can re-create the additional ones as I was trying to do initially once it’s restored, if the heads go undetected again.

Meanwhile, I’ll prep some test data to upload and will let you know once it’s ready for your testing.

thanks
Maureen

Hi @jason, I’ve just uploaded a sighting of 12 pics under occID: WMtest_GB061_SimonVegter, under my userid. You can use these for testing and I will delete them once you’re done. thanks

1 Like

Hi @jason - additional examples have come up. I had asked our researchers to not delete annotations since last week but yesterday, I suggested to our strongest user that she could go ahead with deleting annotations but to open and check the remaining encounters didn’t themselves also get deleted. She deleted 4 encounters separately and in 2 instances, this issue of all related encounters being deleted happened. (So I’m not crazy - phew!)

Example 1: (researcher’s description of the process below)
I ran matches on the sightings of Jens Muller.
Her 2nd sighting consisted of 2 images of 1 cheetah in tall grass. One image had an annotation and the other nothing. I then manually added the annotation and removed the image which had no annotation - making sure to keep all tabs open in case it deletes everything as you have mentioned. As luck would have it (or not) it did delete the newly annotated encounter. Here is the details needed to restore:

Example 2:

Example 3 (where the problem didn’t occur - i.e. no extra encounters got deleted):

I deleted two other encounters and added 1 annotation to that CH00038 which was in a tree behind a big branch. (I did the same - deleted the 2 encounters and made 1, kept tabs open and refreshed pages). This time, the new annotations was still there and the others deleted, but I figured I’d keep and send the “successful deletion” info anyways:


The process where we’re seeing this is specific to what we need right now, which is correcting/adding annotations. Could be a coincidence but could also be related? We’re not also just deleting encounters without that prior step involving the annotations so I can’t say if this would be a random occurrence with a plain delete encounter. I thought it was worth mentioning.

I hope this helps with the investigation.

best,
Maureen

Hi Maureen,

Thanks for the test data! That helps a lot.

I sent a link for an unlisted YouTube video attempting to reproduce the issue (I could not). Please let me know if I need to change the tested scenario.

Thanks,
Jason

Hi Jason, per my reply in email - Your video followed the steps correctly, as far as I can tell. I suspect additional specific conditions are needed to re-create the issue because the issue doesn’t happen every time we delete an encounter after adding new annotations; it only happens sometimes. So I think it’ll take multiple iterations of doing this to see it happen again.

thanks
Maureen

Hi @jason, I think at least one of the additional conditions that create this issue is that the original encounter record’s media asset has no annotations on it. I’ve discovered that when new annotations are added in that scenario, one of them is applied to the original encounter record’s thumbnail image. So when we add annotation, then save, then open the “newly” created encounter record with the new annotation on it, it’s actually the same encounter record as the original. I’ve sent you some examples via email where we haven’t yet tried to delete the original encounter record.

This doesn’t explain, when more than one annotation is added to a media asset with no annotations on it, and then the original encounter record is deleted, why the other newly created encounter records also get deleted but hopefully this helps narrow down the diagnostics of this issue?

Also, I have recently begun receiving notifications in email of when encounters are being deleted in the system. When a new issue arises, related to and around the same time as, changed functionality, I always wonder if the 2 are related.

thanks
Maureen

Hi Maureen,

I sent an unlisted video link and could not reproduce this.

Did I miss any steps in the video?

Thanks,
Jason