jac-uk / admin

The Vue SPA for managing applications and applicants
https://admin.judicialappointments.digital
MIT License
4 stars 2 forks source link

SPIKE: Export to google sheets #770

Closed warrensearle closed 4 years ago

warrensearle commented 4 years ago

When a qualifying test is completed admins will need to process the results data. For now this will be done outside of the admin tool. To facilitate this we will offer an 'Export to google sheets' function.

First we should investigate and decide whether to do this client-side or via a back-end cloud function.

see

  • Add 'Export to Excel' button to QT responses admin #801
  • Add 'Export to Google Sheets' button to QT responses. See ticket admin #802
  • Add 'Export to Google Sheets' cloud function See ticket digital-platform #64
tomlovesgithub commented 4 years ago

Looking into solving this ive found a few solutions and backup plans. The ideal solution would materialise as a UI button which would trigger a cloud function to export data from firebase to a google sheet document. There is questions still to be answered about where to best securely store this file, and still allow it to be safely accessible by teams. Assuming we store a single document per test and use that file to show all test results, the best solution would be to create this sheet server-side with the google sheets API Quickstart Create sheet Then populate this with data from firestore, perhaps running the function when the time window for a QT closes, then providing a link via the UI button.

Other less preferable solutions, include a few out of the box sheet/firebase syncing tools. one firebase-own solution however these aren't ideal as they are syncing tools which will update a sheet as results change, which could be a useful tool for further requirements on QT's or a separate feature.

Equally its worth investigating and testing all solutions, as if we did want synchronised behaviour we wouldn't want the sheet changing the DB

warrensearle commented 4 years ago

This is really useful research @tomlovesgithub. Let's move forward with the following tickets:

warrensearle commented 4 years ago

Closing as the spike is done and follow up work has been ticketed, as above