wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.97k stars 1.32k forks source link

Scheduled posts not updated to published #8601

Closed 0nko closed 5 years ago

0nko commented 5 years ago

Expected behavior

When a scheduled post's date has passed and a post list is refreshed, the post's status should be updated to Published.

Actual behavior

The post's status stays as Scheduled even after a REST API request. Only when a particular site is visited on the web (logged out or in Calypso), the scheduled publish is triggered. After this the post's status is correctly loaded as Published in the app, as well.

The gist of the problem seems to be that the RESP API call does not trigger a cron/scheduled publish job, only a web visit does.

Steps to reproduce the behavior

  1. Open the Blog posts screen
  2. Create a post and schedule it in the future
  3. Wait for the schedule date to pass
  4. Refresh the post list in the app
  5. Notice the post's status stays as Scheduled
  6. Visit the site on the web
  7. Notice the post's status is updated to Published
  8. Refresh the post list in the app
  9. Notice the post's status is now updated to Published, as well
Tested on [device], Android [version]

Emulator, physical devices, Android 8.1, 9, WP.COM REST API

rachelmcr commented 5 years ago

It would be great if visiting the post list in the app triggered a scheduled post to be published, but even without that expectation I'm seeing a bug with scheduled posts not updating. In my case, even when the post is published it still shows as scheduled in the app post list.

I'm following the same steps as above, but at step 9 the post's status is not updated — it retains the Scheduled label.

After seeing the published post on the web I also confirmed that I see a notification in the app that my scheduled post was published:

screenshot_20181115-105017

But even after refreshing the post list in the app the Scheduled label remains on the post:

screenshot_20181115-105025

Tested on moto e5 play, Android 8.1.0, WPAndroid alpha-136

This also matches the description of the issue seen by an end user (internal ref: 1556410-zen).

SiobhyB commented 5 years ago

We received another report of this issue in 1603054-z.

megsfulton commented 5 years ago

Another report in 1661064-z.

rachelmcr commented 5 years ago

This was also reported recently in https://github.com/wordpress-mobile/WordPress-Android/issues/9018. That issue is assigned and has some discussion about the underlying problems and possible fixes, so I'm closing this report.