[wp-trac] [WordPress Trac] #33216: Users.php post count is not accurate as it does not include drafts.

WordPress Trac noreply at wordpress.org
Fri Jul 31 11:44:51 UTC 2015


#33216: Users.php post count is not accurate as it does not include drafts.
----------------------------+-----------------------------
 Reporter:  emirpprime      |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 On Users.php, the post count for users does not include Draft posts.
 However if you click on the number to view the Users' posts, the view
 presented does include drafts. I consider this a UX bug.
 More seriously when, for example, deleting unused users, this number
 indicates a user has no posts when in fact they may have Draft posts. This
 can lead to posts being deleted when the users is deleted in the belief
 they have no (post) content. This is a much more serious UX problem as it
 can result in loss of content.


 I have attached a patch to add another variable to
 get_posts_by_author_sql() and count_many_users_posts() /
 count_user_posts() to allow the inclusion of drafts. The variable is set
 to false by default so it does not effect any existing use of the
 functions.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33216>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list