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

Split survey document into multiple documents and collections #1536

Closed
6 tasks
Tracked by #1762
gino-m opened this issue Feb 29, 2024 · 1 comment
Closed
6 tasks
Tracked by #1762

Split survey document into multiple documents and collections #1536

gino-m opened this issue Feb 29, 2024 · 1 comment
Assignees
Labels
type: code health Improvements to readability or robustness of codebase

Comments

@gino-m
Copy link
Collaborator

gino-m commented Feb 29, 2024

Motivation

  • The full set of ACLs should only be visible to survey organizers and owners, not everyone
  • When listing available surveys, we only want to fetch the title and description, not the entire survey definition
  • Property generator integrations like WHISP want to know which jobs they're enabled for without downloading the entire survey.

Proposed structure

  • Documents in /surveys/{surveyId} contain only basic info shown in survey list (title, description, audit info, acls)
  • Job definitions move to /surveys/{surveyId}/jobs/{jobId}

Changes required

  • Update Android client to read from new structure
  • Update web client to read from and write to new structure
  • Update import/export Cloud Functions to read from new structure
  • Update Cloud Function "survey change" trigger to also trigger on metadata changes
  • Update Firestore rules to read from new structure, make ACLs readable only by survey organizers / owners
  • Update Storage rules to read from new structure

@rfontanarosa @sufyanAbbasi @scolsen @shobhitagarwal1612 @amysorto Wdyt?

@gino-m gino-m added the type: code health Improvements to readability or robustness of codebase label Feb 29, 2024
@gino-m gino-m added this to Ground Feb 29, 2024
@gino-m gino-m changed the title Refactor survey document into multiple documents and collections Split survey document into multiple documents and collections Feb 29, 2024
@gino-m gino-m self-assigned this May 13, 2024
@jcqli jcqli moved this to In Progress in Ground Jun 14, 2024
@gino-m
Copy link
Collaborator Author

gino-m commented Jul 30, 2024

Being done as part of #1758.

@gino-m gino-m closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Ground Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code health Improvements to readability or robustness of codebase
Projects
Status: Done
Development

No branches or pull requests

3 participants