legiongis / hmsf-md

Arches project for the Heritage Monitoring Scouts program, maintained by Florida Public Archaeology Network
https://hms.fpan.us
1 stars 0 forks source link

The "Copy Resource" option in the Scout Report resource isn't functioning correctly #196

Closed kkemp85 closed 3 years ago

kkemp85 commented 3 years ago

I noticed an issue with a few users overwriting Resource Instances for certain sites (i.e. a form existed for 4-15-2020 and instead of making a new resource instance for a more recent visit, they overwrote the 2020 resource insance for one from May 2021). I thought this was just user error (they were accidentally doing this) but it happened with multiple instances. After some trial and error, I think I've figured out the issue! It's the "Copy Resource" function. image

What seems to be happening is this:

  1. After clicking on "Copy Resource", the system makes a copy of the resource instance and it's in the system, but it doesn't open up a window or anything.
  2. The person inputting info thinks that the new copy has opened in the window they are currently in and starts making changes (dates, details, etc.).
  3. This is not the case and they have now edited and saved over the original resource instance they tried to copy.
  4. The copied resource shows up in the "Related Resources" web map for that site, but the original resource instance (which is now overwritten with new data) has somehow become disconnected from that web map and does not show up there. This in itself is not good, we need all resource instances to be relationally connected to the site in that related resources tab. But it also makes getting back to that instance difficult. It does come up in a time filter search for that date but again it isn't connected to anything. I can get to the original resource instance by clicking on it on the "Recent Edits" page but that's it. So if the user goes back in to see how many resource instances are filled out for a particular site, that original instance (that was overwritten) doesn't show up there.
  5. It seems that if any photos are copied over to the new "copy" resource instance, and you delete the original instance, it deletes the photos out of the copy resource instance also. This means that even though the copy and the original resource instance should be separate from each other, they are still connected in some way.
  6. It also seems that if you make two copies of the same resource, the more recent one overwrites the other copy also. Which is not good either image

So three things stand out to me as needing to be fixed if possible.

  1. When a person clicks on "Copy Resource", the system should have a pop-up window with the new copy so they are editing the new copy, not the original document. This can really mess with the edit history of a resource since the copy now dates back to the day it was created (even though it's of old data) and the original resource instance (now overwritten with new data) has the edit history of the original resource instance dating to months or years before the new data even existed.
  2. Both the copy and the original document need to stay connected to the site in the "Related Resources" tab. To users, it will look like that data is missing if not.
  3. Users should be able to make multiple copies of a resource without them overwriting each other.

Since this isn't an issue the land managers can really fix now, I've just been going in and creating a new report to replace the disconnected one and deleting it. But this isn't sustainable since I may not always be here to fix things like this and it does remove the edit history from that original report which I don't like either.

mradamcox commented 3 years ago

Closing this as @kkemp85 has put the same ticket in the core Arches repo: https://github.com/archesproject/arches/issues/7533