Making WordPress.org

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2796 closed defect (bug) (fixed)

Plugin Directory Admin: Limit State Switching for Plugin Statuses

Reported by: ipstenu's profile Ipstenu Owned by: otto42's profile Otto42
Milestone: Plugin Directory v3.0 Priority: normal
Component: Plugin Directory Keywords: has-patch has-screenshots
Cc:

Description

There are a lot of states for Plugins.

  • new - Pending Initial Review
  • pending - Reviewed and pending dev feedback
  • approved - Plugin is approved but nothing's uploaded yet
  • rejected - Plugin is rejected
  • published - Plugin is live and everyone can use it
  • disabled - Plugin is closed but still pushes updates
  • closed - Plugin has ceased to be

The flow goes like this:

  • New -> [pending|approved|rejected]
  • Pending -> [approved|rejected]
  • Approved -> Published (automated by committing code)
  • Published -> [disabled|closed]

This flow should be one-direction. I should be able to go from New to Approved and Approved to Published, but I SHOULD NOT be able to go from Published to Pending. This is a problem because 'pending' is a default WordPress state for a post, and as far as WP cares, Pending is totally something you can go from Published back to.

The only exception to the one-way rule is Published/Disabled/Closed which is okay to circle through. But basically if a plugin is approved, NO ONE should be able to manually publish it (it must be done via SVN), and similarly if a plugin is Published, we should never be able to set it back to pending.

That said it brings up a thought about how to handle rejections. Previously it was a one-way street. If we could 'recover' rejections, it would save a submission. Not show how I feel about that.... If we did it, Rejections should be only movable back to Pending.

Attachments (4)

2796.patch (5.9 KB) - added by SergeyBiryukov 7 years ago.
2796.2.patch (8.3 KB) - added by SergeyBiryukov 7 years ago.
2796.3.patch (11.5 KB) - added by SergeyBiryukov 7 years ago.
2796.3.PNG (9.2 KB) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (15)

This ticket was mentioned in Slack in #meta by ipstenu. View the logs.


7 years ago

@SergeyBiryukov
7 years ago

#2 @SergeyBiryukov
7 years ago

  • Keywords has-patch added

2796.patch implements the described flow, including Rejected → Pending.

This first pass only works on Edit Plugin page, and doesn't cover the Status dropdown in Quick Edit (haven't found a non-hacky way to replace it yet). Maybe Quick Edit should be disabled for plugins altogether?

#3 @Ipstenu
7 years ago

Maybe Quick Edit should be disabled for plugins altogether?

That's fine. We don't use it and while I wish we could sometimes, since we've managed to mitigate the whole double-submission dance, it's not a requirement at all.

tl;dr We can totally disable quick-edit for plugins.

#4 @SergeyBiryukov
7 years ago

  • Milestone set to Plugin Directory v3.0

Just realized the patch doesn't allow for plugins to be moved to Trash :) Is that something admins should be able to do (e.g. for spam submissions), or Rejected status would be sufficient?

#5 @Ipstenu
7 years ago

We should never be trashing plugins. It's not necessary for us.

#6 @SergeyBiryukov
7 years ago

2796.2.patch is a second pass that includes disabling Quick/Bulk Edit for plugins, which is almost useless anyway. A more helpful one could be implemented in the future if needed.

Should be good to go.

This ticket was mentioned in Slack in #meta by sergey. View the logs.


7 years ago

#8 @SergeyBiryukov
7 years ago

2796.3.patch is an updated patch per discussion with @Ipstenu:

  • Approved plugins can be closed or disabled.
  • Rejections cannot be recovered.
  • Approve/Reject displays an "Are you sure?" window.
  • The status dropdown is replaced with buttons.

@SergeyBiryukov
7 years ago

#9 @SergeyBiryukov
7 years ago

  • Keywords has-screenshots added

Screenshot: 2796.3.PNG

#10 @Otto42
7 years ago

  • Owner set to Otto42
  • Resolution set to fixed
  • Status changed from new to closed

In 5573:

Plugin Directory: Change edit actions dropdown to buttons with specific states. props @SergeyBiryukov. Fixes #2796

#11 @coffee2code
7 years ago

In 5709:

Plugin Directory: Remove 'Trash' action.

Permissions already prevent plugins from being trashed.

Props SergeyBiryukov.
See #2796.
Fixes #2983.

Note: See TracTickets for help on using tickets.