justicenation / slashclock

/clock concept as a new Slack app
GNU General Public License v3.0
0 stars 0 forks source link

Ugly error: Duration cannot be shorter than the sum of all time slices #51

Open martyychang opened 6 years ago

martyychang commented 6 years ago

When using /clock slice to add tags to chunks of time, an invalid slice duration will cause an ugly error to be returned to the user.

Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Duration cannot be shorter than the sum of all time slices: [EndTime__c]

Something nicer and potentially easier to understand would make for better UX.

martyychang commented 6 years ago

This is actually a bigger bug... in that I cannot slice 100% of an entry into a single tag. Below are steps to reproduce the issue.

  1. /clock in 3:00pm
  2. /clock out 3:30pm
  3. /clock slice 30 minutes qa

At this point the error noted in the first comment will be encountered.