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

CPT: Enable restoring posts from post actions #6723

Merged
merged 2 commits into from
Jul 18, 2016
Merged

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Jul 12, 2016

Related: #6454

This pull request seeks to implement the behaviors related to restoring trashed posts from the custom post types list screen.

Restore

Testing instructions:

Verify that you can restore a trashed post.

  1. Navigate to the custom post types list screen
  2. If you don't already have a trashed post, trash one via the action dropdown
  3. Change to the Trashed filter
  4. For a trashed post, select Restore under the action menu
  5. Note that...
    • The post disappears from the trashed list
    • The Trashed post count in the filter bar decrements by one
    • After the restore completes, the post count of the original status increments by one (we can't know until the response is received which status it was originally) and a notice is shown

Follow-up Tasks:

Test live: https://calypso.live/?branch=update/cpt-restore-post

@aduth aduth added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Custom Post Types (CPT) labels Jul 12, 2016
@codebykat
Copy link
Member

This is working for me 👍

One quirk I noticed - if you Trash a published item, then restore it, it gets restored as a draft. I guess that's the API and/or core's fault though.

@codebykat
Copy link
Member

The same sequence of events in wp-admin correctly restores the item as published. So I guess it's the API's fault...

@aduth aduth added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jul 18, 2016
@aduth aduth merged commit 150f191 into master Jul 18, 2016
@aduth aduth deleted the update/cpt-restore-post branch July 18, 2016 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants