Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta data lost when recipient restores a file #22594

Closed
nickvergessen opened this issue Feb 23, 2016 · 21 comments
Closed

Meta data lost when recipient restores a file #22594

nickvergessen opened this issue Feb 23, 2016 · 21 comments

Comments

@nickvergessen
Copy link
Contributor

nickvergessen commented Feb 23, 2016

Steps to reproduce

  1. Create a file in a folder
  2. Comment and tag that file
  3. Share the folder
  4. As recipient delete the file
  5. As recipient restore the file

Expected behaviour

Comments and tags should still be there

Actual behaviour

Comments and tags are missing, because the file ID changes, when the item is restored by a recipient instead of the owner

Server configuration

ownCloud version: 9.0 beta 2

List of activated apps:

  • Comments
  • Tags
  • Trashbin
  • Sharing

@PVince81 @schiesbn

@nickvergessen
Copy link
Contributor Author

Possible Solution

  1. We should try to restore the file of the owner instead of the recipient, when the item is still shared and the owner didn't delete the file and ...

Since this solution is rather complicated with the conditions that can happen (unshare of parent, delete, etc.) it might be needed to copy meta data on copy?

For 9.0 we should at least consider to copy the tags, to make sure the work of the autotagging app is still as desired.

cc @DeepDiver1975

@DeepDiver1975
Copy link
Member

deleting a share file means unshare - so restore should then be a 'simple' un-unshare.

what am I missing?

@PVince81
Copy link
Contributor

@DeepDiver1975 this is not about single file shares.

Share a folder and have the recipient delete a file inside that shared folder.
The default logic will move the file to trash for both the owner and recipient.
Only the owner keeps the fileid.

@MorrisJobke
Copy link
Contributor

Only the owner keeps the fileid.

...and the recipient gets a copy of those files to be able to restore them. (but this will result in a new fileid)

@DeepDiver1975
Copy link
Member

Share that file

so step 3 is wrong - should be - share the folder containing the file

@DeepDiver1975
Copy link
Member

The default logic will move the file to trash for both the owner and recipient.

so this duplication of data requires duplication of tags and comments as well ... bääh

@PVince81
Copy link
Contributor

bääh

you got it

@nickvergessen
Copy link
Contributor Author

so step 3 is wrong - should be - share the folder containing the file

Right, sorry fixed the steps

@DeepDiver1975
Copy link
Member

Right, sorry fixed the steps

np - thx

@DeepDiver1975
Copy link
Member

For 9.0 we should at least consider to copy the tags, to make sure the work of the autotagging app is still as desired.

I tend to agree on that ... what about creating a copy of a file? Does this cause copy of tags and comments?

@nickvergessen
Copy link
Contributor Author

what about creating a copy of a file? Does this cause copy of tags and comments?

Currently it does not

@DeepDiver1975
Copy link
Member

Currently it does not

we should consider this ... any file can be copied via webdav

@nickvergessen
Copy link
Contributor Author

the problem is, when you copy a folder, you need to recursivly do all that...

@DeepDiver1975
Copy link
Member

the problem is, when you copy a folder, you need to recursivly do all that...

true :puke:

@PVince81
Copy link
Contributor

No topic for 9.1, this is a conceptual issue in the trashbin and might need a redesign

@PVince81 PVince81 modified the milestones: 9.2-next, 9.1-current Jun 24, 2016
@PVince81 PVince81 modified the milestones: backlog, 10.0 Jan 13, 2017
@PVince81
Copy link
Contributor

Note, to clarify the title: the metadata is already lost at the time we create a copy of the files for the recipients. Only the owner has access to the old metadata.

So far a proposal was to have a special link so that when the recipient triggers a restore of the file, it will actually trigger a restore from the owner's perspective. This is fine for this one scenario.

However there will likely be another scenario for #24053 when moving out a file out of a share would also create a copy in the owner's trashbin. In this case we can't keep a link in the same way. Maybe we need to copy the metadata.

But looking at copying metadata would mean copying all the following:

  • system tags
  • favorite info (might be tricky because it's specific for every user)
  • comments
  • activities ?
  • link share info ? (if both owner and recipient restore the file then the link share would exist twice ?)

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@PVince81 PVince81 reopened this Jan 15, 2018
@felixboehm felixboehm added the p2-high Escalation, on top of current planning, release blocker label Jan 24, 2018
@felixboehm
Copy link
Contributor

also direct links get lost

@felixboehm felixboehm modified the milestones: backlog, planned Jan 24, 2018
@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@PVince81 PVince81 reopened this Mar 5, 2018
@PVince81 PVince81 modified the milestones: development, triage Apr 23, 2018
@PVince81 PVince81 added p3-medium Normal priority and removed p2-high Escalation, on top of current planning, release blocker labels Apr 23, 2018
@PVince81 PVince81 removed their assignment Apr 23, 2018
@PVince81
Copy link
Contributor

moving to triage.

this would need a redesign of trashbin and/or the storage architecture to allow for linking files (symlinks or virtual files) to allow multiple trashbins to contain the same file entries with the same file id

estimate for coming up with multiple possible concepts: 1-2md.
implementation estimate unknown but likely more than 5md

@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants