Skip to content

Using To-do List

Create a to-do

  1. Open TodoList > Todos in the admin area.
  2. Click the create button above the list.
  3. Fill in the form and save. You return to the list.
Field Required Default Notes
Title Yes Up to 255 characters.
Description No Free text.
Priority Yes Medium Low, Medium or High. Sets the colour of the Discord reminder.
Status Yes Pending Pending, In Progress or Completed.
Due Date No Date and time. Shown in the list and in the reminder. Nothing happens automatically when it passes.
Reminder Date No Date and time from which the Discord reminder is sent. Leave it empty for a to-do without a reminder.
Reminder Already Sent Off Whether the reminder for this to-do has gone out. The extension switches it on after sending. See Send a reminder again.

Due Date and Reminder Date are independent. A to-do with a due date but no reminder date never triggers a reminder.

The list

The list shows the columns Title (cut off after 50 characters), Priority, Status, Due Date, Reminder and Reminded. Reminded shows whether the reminder has been sent. The list is sorted by due date, earliest first. You can sort by every column except Reminded and search by title.

Each row has three actions:

  • Complete asks for confirmation and sets the status to Completed. It is only shown for to-dos that are not completed yet.
  • The edit action opens the form. After saving you return to the list.
  • The delete action removes the to-do. You can also delete from the edit page, or select several rows and delete them together.

The Priority filter limits the list to one priority.

Warning

The list only shows to-dos that are not completed. A to-do disappears from it as soon as its status is Completed, whether through the Complete button or the form, and stays in the database. The Show Completed filter does not bring completed to-dos back in the current code: Show all still lists only open to-dos, and Only completed lists nothing.

What the customer sees

Nothing. The extension has no pages, routes or output outside the admin area.

How reminders are triggered

There is no scheduled command and no queue job. The reminder check is part of the extension's start-up code, which Paymenter calls for every enabled extension each time the application starts. That means the check runs:

  • on every web request to Paymenter, not only in the admin area: shop pages, the client area, the admin area and API calls all count,
  • on every php artisan command, including the schedule:run call from Paymenter's cron entry.

If Paymenter's scheduler cron runs every minute, as Paymenter requires for its own tasks, due reminders therefore go out within about a minute. Without the cron, a reminder goes out with the next page view by anyone.

On each check the extension:

  1. Reads Discord Webhook URL. If it is empty, the check stops here.
  2. Selects every to-do where Reminder Date is set and is now or in the past, Reminder Already Sent is off and the status is not Completed.
  3. For each of them, posts the reminder to the webhook and then switches Reminder Already Sent on.

Each to-do gets one reminder. There are no repeat reminders and no separate reminder for the due date.

A to-do that is Completed when its reminder date arrives gets no reminder. If you set it back to Pending or In Progress later and the reminder was never sent, the reminder goes out on the next check.

Warning

The extension marks a reminder as sent without looking at Discord's answer. If the webhook URL is wrong, the webhook was deleted or Discord cannot be reached, the reminder is lost and is not retried. See Send a reminder again.

The message is sent during the request or command that triggered the check, so that one request waits for Discord to answer.

What the Discord message contains

The reminder is a single embed posted by the webhook:

Part Content
Title "Todo Reminder", with a pin emoji in front
Text The to-do's Title
Colour Green for Low, yellow for Medium, red for High
Description The to-do's description, or "No description"
Priority Low, Medium or High
Status Pending or In progress, with an emoji in front
Due Date The due date as YYYY-MM-DD HH:MM, or "Not set"
Footer "Paymenter TodoList Extension" and the time the message was sent

The message does not mention a user or role and contains no link back to Paymenter.

Send a reminder again

Changing Reminder Date on a to-do whose reminder has already gone out does not schedule a new one, because Reminder Already Sent stays on. To get another reminder:

  1. Edit the to-do.
  2. Set Reminder Date to the new time.
  3. Switch Reminder Already Sent off and save.

If you leave Reminder Date in the past and switch Reminder Already Sent off, the reminder is sent on the next check.

To create a to-do with a reminder date but without a Discord message, switch Reminder Already Sent on in the form.