astoria-tech / volunteer-dispatch

Slackbot to coordinate errand volunteering
MIT License
24 stars 9 forks source link

Manual entry #48

Closed ashryanbeats closed 4 years ago

ashryanbeats commented 4 years ago

Context

The issue

Currently on prod, if someone manually enters a new data row in Airtable (as opposed to using the form), the manual entry turns into a race against the bot, where the user gets a maximum of 20 seconds to enter in all the required data. This is because the code is written assuming that data is entered via the form (and not manually), expecting that data is present for all required fields as soon as the row is created.

In some circumstances, incomplete (or in-progress) manual data would result in the bot continually posting to slack.

The approach

As we discussed on slack, for now, the idea is to patch the issue by preventing repeat message sends.

There were 2 approaches discussed:

  1. Don't send a slack message until all required fields are entered.
    • UX issues with this approach:
      • There's no indication as to what fields are required when manually entering data in Airtable
      • This would result in the bot feeling unreliable ("Why are the data rows I manually enter only sometimes being sent to slack?")
  2. Send a message on the regular bot schedule and make sure the bot doesn't produce any unexpected behavior due to incomplete data (post only once, show human readable strings if any given data field isn't available, don't crash).
    • UX issues with this approach:
      • The message sends almost immediately after row creation, with a lot of data yet to be entered
      • This would result in most manually entered rows sending in "junk" messages, where dispatchers get a single slack message with incomplete info per manually entered row

We collectively opted for number 2; this pull request represents that approach.

Given that this issue is extremely disruptive when it occurs, it was a good first step to solve the technical issue first.

But the UX issue remains.

Communicating with the users

For now, there are 2 things we can suggest to those entering data:

  1. It's better to use the form than manually enter data
  2. If you must manually enter data, you can manually trigger the bot to resend when all of your data entry is complete (we need to show them how)

Next steps

A few ideas that could be useful, depending on if this issue is important enough to pursue:

I'd love to hear if there are other ideas.