wordpress-mobile / wordpress-mobile/WordPress-Android
Blogging Reminders are not received until the following week
Nobody has claimed this yet.
- 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
- Open the app to manage a site
- (For easier testing) ensure the site timezone is set to your local timezone
- Go to My Site tab → Menu tab → Blogging Reminders
- Schedule a blogging reminder for the current day, a few minutes in the future
- Wait five minutes
- 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 weekit 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.nextis used to calculate the days to fire the notification. This is the relevant file of the app code that usesTemporalAdjuster.next. - One possible solution might be to swap
.nextwith.nextOrSame, which includes the current day.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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