ericyd / gdrive-copy

Web app to copy a Google Drive folder
https://script.google.com/macros/s/AKfycbxbGNGajrxv-HbX2sVY2OTu7yj9VvxlOMOeQblZFuq7rYm7uyo/exec
MIT License
1.58k stars 343 forks source link

Leaves a copy of my google form in the source folder #41

Open johnanson opened 6 years ago

johnanson commented 6 years ago

Are you requesting a feature or reporting a bug?

Bug

If reporting a bug, is there already an issue open for this same bug?

I didn't see one.

What is the current behavior?

Each time I copy a folder containing a google form and the response spreadsheet, a "Copy of [form file name]" is left in the source folder

What is the expected behavior?

Changes made in the source folder

How would you reproduce the current behavior (if this is a bug)?

Copy a folder containing a google form and the response spreadsheet

Specify your

ericyd commented 6 years ago

I'm not able to reproduce this issue, could I get a few more details?

  1. Does this happen every time you try to copy a folder with Google forms or intermittently?
  2. Does the folder contain other types of files? If so, are the other files in the folder copied correctly?
  3. Are you selecting Yes for the Copy Permissions option in the app?
johnanson commented 6 years ago

Hi Eric

  1. Does this happen every time you try to copy a folder with Google forms or intermittently?
    • It seems to be happening every time.
    • I've just run it a couple of times and it consistently made a "Copy of" the Google Form.
  2. Does the folder contain other types of files? If so, are the other files in the folder copied correctly?
    • The folder contains one form and it's associated spreadsheet, and 5 more spreadsheets
  3. Are you selecting Yes for the Copy Permissions option in the app?
    • No

I watched a copy folder log and kept refreshing the folder in Google Drive:

I've attached a screenshot of the folder in case that helps visualise what I describe above.

Thanks for your excellent utility.

Regards, John

On 3 April 2018 at 10:13, Eric Yancey Dauenhauer notifications@github.com wrote:

I'm not able to reproduce this issue, could I get a few more details?

  1. Does this happen every time you try to copy a folder with Google forms or intermittently?
  2. Does the folder contain other types of files? If so, are the other files in the folder copied correctly?
  3. Are you selecting Yes for the Copy Permissions option in the app?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ericyd/gdrive-copy/issues/41#issuecomment-378062967, or mute the thread https://github.com/notifications/unsubscribe-auth/AXnykdhtxzjDSM5MRWpYIrkPIj0TiXPpks5tkqJ6gaJpZM4S5mg5 .

ericyd commented 6 years ago

Thank you for the extra info. I'm able to reproduce this through the app but not through the Drive API explorer. It also only happens when there is an associated spreadsheet. I'm not sure at this point what a good solution is.

johnanson commented 6 years ago

Maybe

  1. When you copy a spreadsheet with an associated form (I presume this can be queried)
    1. Get the ID of the associated form before the copy
    2. After the copy, if the new-spreadsheet-copy has an associated form with a different ID, then move it into the destination folder.
      1. You could confirm that the new form ID didn't exist before the copy started (creation time? List of file IDs originally under the source directory?)

This would work in our simple use case.

On 4 April 2018 at 11:16, Eric Yancey Dauenhauer notifications@github.com wrote:

Thank you for the extra info. I'm able to reproduce this through the app but not through the Drive API explorer. It also only happens when there is an associated spreadsheet. I'm not sure at this point what a good solution is.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ericyd/gdrive-copy/issues/41#issuecomment-378429187, or mute the thread https://github.com/notifications/unsubscribe-auth/AXnykQMHTESSzuKGVY3hBGWHsJqIcQlAks5tlALcgaJpZM4S5mg5 .