Skip to content

Add task lock expiry reminder emails#1250

Closed
CollinBeczak wants to merge 3 commits into
mainfrom
feature/task-lock-expiry-reminder
Closed

Add task lock expiry reminder emails#1250
CollinBeczak wants to merge 3 commits into
mainfrom
feature/task-lock-expiry-reminder

Conversation

@CollinBeczak

Copy link
Copy Markdown
Contributor

Emails users with an opt-in subscription shortly before one of their locked tasks is about to be auto-unlocked by the cleanLocks job. The reminder window is configurable (default 10 minutes) and the scheduled job is itself opt-in: omit osm.scheduler.notifications.taskLockExpiryReminder.interval to leave it unscheduled.

  • Adds NOTIFICATION_TYPE_TASK_UNLOCK_WARNING (16) and a taskUnlockWarning field on NotificationSubscriptions, defaulting to NOTIFICATION_EMAIL_NONE.
  • Adds the sendTaskLockExpiryReminders SchedulerActor job, which uses an atomic UPDATE...RETURNING on the locked table so overlapping runs cannot double-send.
  • Evolution 119 adds reminder_sent_at to locked and task_unlock_warning to user_notification_subscriptions.

Emails users with an opt-in subscription shortly before one of their
locked tasks is about to be auto-unlocked by the cleanLocks job. The
reminder window is configurable (default 10 minutes) and the scheduled
job is itself opt-in: omit `osm.scheduler.notifications.taskLockExpiryReminder.interval`
to leave it unscheduled.

- Adds NOTIFICATION_TYPE_TASK_UNLOCK_WARNING (16) and a `taskUnlockWarning`
  field on NotificationSubscriptions, defaulting to NOTIFICATION_EMAIL_NONE.
- Adds the `sendTaskLockExpiryReminders` SchedulerActor job, which uses
  an atomic UPDATE...RETURNING on the `locked` table so overlapping runs
  cannot double-send.
- Evolution 119 adds `reminder_sent_at` to `locked` and
  `task_unlock_warning` to `user_notification_subscriptions`.
Comment thread conf/evolutions/default/119.sql Outdated
@sonarqubecloud

Copy link
Copy Markdown

@CollinBeczak CollinBeczak marked this pull request as ready for review July 10, 2026 00:56
@jake-low

Copy link
Copy Markdown
Contributor

A task lock expiring and being automatically released is a routine and nondestructive action; is there really a benefit to emailing users when it occurs? I'm worried about the volume of email this has the potential to generate (for us, as a sender). Have we considered other options, like showing a timer in the UI while a task is locked?

@CollinBeczak

Copy link
Copy Markdown
Contributor Author

Yeah, we can start with that. The goal was to give users some visibility on the lock status when they are in an external editor and not looking at the maproulette ui. But adding a timer in the ui and a modal that allows the user to reset or extend the lock would be a good start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants