wordpress-mobile / wordpress-mobile/WordPress-Android

Posting/Editing: posts created and edited in the app then edited on the web are published with the wrong date

Open
#15,244 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

[Pri] High [Type] Bug Posting/Editing
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Expected behavior

I expect the current date and time to be used when I click the Publish button on a draft regardless of where it was edited.

Actual behavior

If a draft created in the app is edited using the app and then edited using the Calypso editor, the final publish date will be the last edit date from the app.

Steps to reproduce the behavior
  1. In the app, create a new post.
  2. Add a title.
  3. Add a line noting the current time.
  4. Save the post as a draft.
  5. Wait 2+ minutes.
  6. In the app, close and re-open the same post.
  7. Add a line noting the current time.
  8. Save the post as a draft again.
  9. Wait 2+ minutes again.
  10. On the web, re-open the same post using the Calypso editor.
  11. Observe what it says next to “Publish” under Settings (gear icon at top right) > Post > Status & visibility > Publish.
  12. You can either publish the post from the app or the web now and the result will be the same.

Results: if a revision is saved by the Android app and the post is edited using the Calypso editor after that, the post publish date will be set to the date and time it was last edited in the app and not the date and time the post is actually published.

Note: you can hover over the publish date in the Posts list on the web to see the exact date of publish (screenshot).

Tested on Pixel 3, Android 11, WPAndroid 18.1-rc-1.

/hat tip @elibud for the bug report and @startuptester for help confirming the steps to reproduce.

/cc @malinajirka because I know you worked on post-saving in the past and you may have some tips about how to solve the problem.

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 by reproducing the workflow across the Android app and the Calypso editor, comparing the saved draft metadata with the value shown under Publish in Post > Status & visibility. The fix is complete when publishing after edits in both clients records and displays the actual publication date and time, and the reported reproduction no longer shows the app's last edit time.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.