wordpress-mobile / wordpress-mobile/WordPress-Android

Blogging Reminders are not received until the following week

Open
#16,596 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Pri] Low [Type] Bug Blogging Reminders
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Expected behavior

After setting a Blogging Reminder to a time a few minutes in the future, I expect to get a reminder after those few minutes have elapsed.

Actual behavior

I don't get a reminder after five minutes.

Steps to reproduce the behavior
  1. Open the app to manage a site
  2. (For easier testing) ensure the site timezone is set to your local timezone
  3. Go to My Site tab → Menu tab → Blogging Reminders
  4. Schedule a blogging reminder for the current day, a few minutes in the future
  5. Wait five minutes
  6. Check the system-wide notification screen and notice no notification was received
Tested on Samsung Galaxy S10, Android 12, WPAndroid 19.8
Additional context
  • Blogging Reminders on Android was implemented so that the reminder will arrive on the chosen day, but on the following week. Here are some examples: on the selected days, but excluding today.
    • If all days are selected, it will fire everyday from tomorrow onward.
    • If today is Wednesday and only Friday is selected, it won't fire the-day-after-tomorrow but instead on Friday of next week it will fire Friday.
    • If today is Wednesday and Wednesday is selected – and the time of day selected is after the current time – it will fire next Wednesday, not this Wednesday.
  • Blogging Reminders on iOS behaves differently (as I would expect); the notification is sent for any reminder scheduled in the future.
  • @ravishanker shared that Java's TemporalAdjuster.next is used to calculate the days to fire the notification. This is the relevant file of the app code that uses TemporalAdjuster.next.
  • One possible solution might be to swap .next with .nextOrSame, which includes the current day.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with WordPress/src/main/java/org/wordpress/android/workers/reminder/ReminderConfig.kt and inspect how TemporalAdjuster.next calculates reminder days. Verify the behavior against the reproduction steps and the selected-day examples. Done means a reminder scheduled a few minutes ahead can fire today, while future selected days continue to be scheduled correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.