Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restored Draft Posts, when Published, Disregard Publish Date Setting #12121

Closed
thehenrybyrd opened this issue Jul 14, 2019 · 3 comments
Closed

Comments

@thehenrybyrd
Copy link
Contributor

Expected behavior

When I restore a post from the Trash, it will maintain its original publish date settings.

Actual behavior

When I restore a post which was originally a draft, publish date settings are maintained. However, when I then publish that draft, publish date settings are ignored and it states that I published the post today.

Steps to reproduce the behavior

  1. Restore a draft post from the trash - keep note of its original publish date.
  2. Open the draft, and check in Post Settings for the publish date. It should be the same as the original.
  3. Now, publish the post.
  4. Check the Post Settings again for the publish date, and note that it’s changed to today.

Reported in #2175316-zen.

Here's a gif from my testing process:
restoreddraft

Tested on iPhone SE, (iOS 12.2) running WPiOS 12.8 (beta)

@illusaen
Copy link
Contributor

illusaen commented Mar 31, 2021

So currently, deleting a draft sets the publish date to when you deleted it. Restoring the draft and then publishing it then uses that deleted date. If that's intended then we're good now.

If we mean to keep the date that the draft was written (not deleted), then there's still a bug although perhaps a different one.

Tested on iPhone 12 Mini, iOS 14.4.1, WPiOS 17.0

@thehenrybyrd
Copy link
Contributor Author

@illusaen Thanks for checking in on this!

The current behavior on WordPress.com is that restoring a deleted draft retains the date the draft was last edited.

For example:
I found an old draft. The "Last Modified" date was August 13, 2019.
I trashed it, then restored it, without making any changes. The "Last Modified" date remains August 13, 2019.
Publishing it retains that date as the publish date.

However, in WPiOS, deleting a draft changes the "Last Modified" date to the time of deletion.

For example:
I found an old draft. The "Last Modified" date was February 19, 2021.
I trashed it. Looking in "trashed" shows it was last modified "seconds ago".
Restoring the post does the same again, so it was again modified "seconds ago", however the "publish date" is set to when it was trashed, as you mention.
That "trashed" date is then used as the publish date when the post is actually published.

On Android, the "trashed" date is also used for the publish date. However, the "Last Modified" date doesn't change when the post is restored.

So, if we want to have parity with WordPress.com, we should keep the original "Last Modified" date. However, that behavior seems strange to me, and in addition is not aligned with WPAndroid.

@startuptester Would you weigh in on this? My instinct is to close the issue, given it that:

  1. The behavior originally described is no longer in action
  2. This doesn't seem to be causing trouble to users at this point

@kean
Copy link
Contributor

kean commented May 1, 2024

No longer applies because "Publish Date" field is no longer displayed for Drafts and you have to change it right before publishing if you need to.

@kean kean closed this as completed May 1, 2024
@kean kean added this to the 24.9 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants