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

Just in case #69

Closed
wants to merge 0 commits into from
Closed

Just in case #69

wants to merge 0 commits into from

Conversation

dckc
Copy link
Owner

@dckc dckc commented Jun 13, 2024

going on a trip; just in case we don't get back, this code adds a trigger to share info with our survivors

@dckc
Copy link
Owner Author

dckc commented Jul 7, 2024

Trigger Sheet

The main user interface is a spreadsheet table that looks like...

image

The text in the table is...

status deadline folder viewersToAdd viewers note triggeredAt
TRUE 7-Jul-2024 16:55 Just In Case test [email protected], [email protected] [email protected] Pending  

and in the folder column, Just In Case test is linked to a folder in Google Drive.

Share Just In Case menu item

Among the menu items added by this sync26 package is a Share Just In Case item:

image

When selected, a script clears any triggers installed earlier and then evaluates each row:

  • if there's no link in the folder column, skip to the next row
    • otherwise, set viewers to the current viewers of the folder
  • if status is FALSE, note is set to Disabled
  • if deadline is in the past, note is set to Ready; else Pending

If the results include any Pending rows, a Trigger at its deadline to run onSharingTrigger is created.

onSharingTrigger

Rows are evaluated much like above. For each Ready row, the *viewersToAdd are added to the linked folder.
The viewers column is updated.
The note is set to Shared, and the triggeredAt column is set to the time measured in the trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant