Skip to content

Conversation

@GaryJones
Copy link
Contributor

@GaryJones GaryJones commented Dec 22, 2025

Summary

Adds tools to migrate posts between statuses, addressing the long-standing issue of posts becoming inaccessible when Edit Flow is deactivated while posts have custom statuses.

  • New Migrate tab in Custom Status settings with UI to select source and target statuses
  • Shows post counts for each status to help users understand the scope of migration
  • WP-CLI commands for programmatic/scripted migrations:
    • wp edit-flow custom-status list - list all custom statuses with post counts
    • wp edit-flow custom-status migrate --from=pitch --to=draft - migrate posts between statuses
    • wp edit-flow custom-status counts - show post counts per status for a post type

Background

When Edit Flow is deactivated, posts with custom statuses (like "pitch", "assigned") remain in the database with those status values, but WordPress no longer recognizes them, making the posts inaccessible.

This adds "service-oriented" tools that allow users to migrate posts to core statuses before deactivating, or to re-enable Edit Flow, migrate posts, and then deactivate again.
Screenshot 2025-12-22 at 17 21 41

Screenshot 2025-12-22 at 17 21 49

Test plan

  • Migrate tab displays correctly with status dropdowns
  • Post counts display correctly for each status
  • Migration form submits and migrates posts
  • WP-CLI list command shows all statuses
  • WP-CLI migrate command migrates posts
  • WP-CLI migrate --dry-run previews without changes
  • WP-CLI counts command shows post counts
  • All 10 integration tests pass

Closes #230

🤖 Generated with Claude Code

Adds tools to migrate posts between statuses, addressing the issue
of posts becoming inaccessible when Edit Flow is deactivated while
posts have custom statuses.

Features:
- New "Migrate" tab in Custom Status settings with UI to select
  source and target statuses, showing post counts for each
- WP-CLI commands:
  - `wp edit-flow custom-status list` - list all statuses
  - `wp edit-flow custom-status migrate --from=X --to=Y` - migrate posts
  - `wp edit-flow custom-status counts` - show post counts per status
- Supports --dry-run flag for preview and --post-type filter

Closes #230

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@GaryJones GaryJones requested a review from a team as a code owner December 22, 2025 17:19
@GaryJones GaryJones self-assigned this Dec 22, 2025
@GaryJones GaryJones added this to the Next (minor) milestone Dec 22, 2025
@GaryJones GaryJones added the type: enhancement New feature or request label Dec 22, 2025
@GaryJones GaryJones merged commit 4f13ec9 into develop Dec 22, 2025
18 of 24 checks passed
@GaryJones GaryJones deleted the feature/230-status-migration-tool branch December 22, 2025 17:34
@GaryJones GaryJones mentioned this pull request Jan 4, 2026
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.

When disabling Edit Flow, posts with custom statuses are no longer accessible

2 participants