mattermost-plugin-remind icon indicating copy to clipboard operation
mattermost-plugin-remind copied to clipboard

Cannot snooze a reminder from a recurring schedule

Open Roy-Orbison opened this issue 5 years ago • 3 comments

Summary

The snooze drop-down does nothing if the reminder is a recurring one.

Steps to reproduce

  1. Issue a command such as /remind me FOOBAR every day at <2 minutes from your current time>
  2. Wait for reminder message
  3. Try to select snooze option from message

Expected behaviour

That instance of the reminder should be snoozed

Observed behaviour (that appears unintentional)

Nothing happens, message remains.

Server configuration

Operating system: Debian

Mattermost version: Community 5.18.1

Remind version: 0.4.4

Updated from an older Remind bot version or fresh install: Updated

Mattermost server logs
{"level":"error","ts":1580428486.372024,"caller":"mlog/log.go:174","msg":"Plugin failed to ServeHTTP, RPC call failed","plugin_id":"com.github.scottleedavis.mattermost-plugin-remind","error":"unexpected EOF"}

Additional context

See comments here.

Roy-Orbison avatar Jan 31 '20 00:01 Roy-Orbison

@hanzei Plugin failed to ServeHTTP, RPC call failed...
perhaps handleSnooze https://github.com/scottleedavis/mattermost-plugin-remind/blob/master/server/http.go#L342

scottleedavis avatar May 02 '20 18:05 scottleedavis

Also, if multiple snooze attempts are made to a recurring reminder, the plugin will crash and have to be disabled & re-enabled from the System Console, otherwise it won't respond to any slash commands.

Roy-Orbison avatar May 03 '20 23:05 Roy-Orbison

I thought of a possible solution for this issue. Because snoozing only applies to the current instance of the recurring reminder, but (I'm guessing) the data model doesn't have a record of instances, snoozing could:

  1. clone the original reminder
  2. drop the clone's recurring schedule and set its date & time to the original's + the snooze duration
  3. dismiss the original as if it had been marked as completed

It's a little hackish, but likely easier to implement than something that requires changing the model. A consequence would be that deleting a clone would not delete the original schedule, which I see as a positive. I'd be happy with that over plugin crashes.

Roy-Orbison avatar Aug 14 '20 01:08 Roy-Orbison