Different designs with the same filename have the same discussions in Design Management

Summary

In Design Management app, if we upload a new design, create a few discussions on it and delete it, after uploading a new file with the same filename we can see all the discussions added to this new file.

Steps to reproduce

  • Open Designs tab and upload an image (let's say it's twitter.png)
  • Open the design and add a few discussions to it Screen_Shot_2019-11-20_at_18.02.38
  • Delete the design
  • Upload the same file one more time. You will see discussions on the new design Screen_Shot_2019-11-20_at_18.03.23

And a bit more complex case:

  • Delete the design again
  • Take a different image and rename it to twitter.png
  • Upload this image

You will see all the discussions added to 'previous' image are now added to the new image

Screen_Shot_2019-11-20_at_18.06.06 Screen_Shot_2019-11-20_at_18.06.11

If you open the design, you can check discussions haven't changed:

Screen_Shot_2019-11-20_at_18.06.21

I am not sure whether we should trait the behavior with deleting/uploading the same image as a bug, but the same behavior with different image definitely feels incorrect to me.

What is the current bug behavior?

Discussions are attached to design with the same filename even if the design was deleted and if we added a different image with the same filename.

What is the expected correct behavior?

Discussions should be reset on deletion? Or maybe discussions should be reset on uploading the new image with the same filename? I am not sure what is the correct behavior here.

Proposal from @jareko

  • If a design is "deleted", it should permanently be removed, along with all of its discussions, from all versions.
  • If a design is "archived", it will be removed from the latest version of the collection, but discussions will remain (our current form of "deletion" will essentially become "archiving").
  • If you upload a design that contains the same name as a design that was "archived" or "deleted", that design is considered a NEW design, with a new discussion thread.

^This recommendation is based on how we currently handle designs overwriting by the same filename.

Edited by Jarek Ostrowski