[wp-trac] [WordPress Trac] #43960: Support for sorting columns in WP_Privacy_Requests_Table

WordPress Trac noreply at wordpress.org
Mon Jan 14 18:49:40 UTC 2019


#43960: Support for sorting columns in WP_Privacy_Requests_Table
-------------------------------------------------+-------------------------
 Reporter:  birgire                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.1
Component:  Privacy                              |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  needs-refresh                                  |  administration
-------------------------------------------------+-------------------------

Comment (by birgire):

 @garrett-eclipse I bumped the {{{@since}}} to {{{5.1.0}}} in
 [attachment:"43960-9.diff"].

 @desrosj The unit tests run successfully for [attachment:"43960-9.diff"]
 on my install. Also tested for the {{{@privacy}}} group.

 Here are the manual tests I did on my test install:

 - The default sorting is by {{{Requested}}} with {{{post_date DESC}}} (no
 sorting arrow) (Expected)
   Request: {{{/wp-admin/tools.php?page=export_personal_data}}}

 - First click on {{{Requested}}} gives {{{post_date ASC}}}. (sorting arrow
 up) (Expected because of the default sort)
  Request: {{{/wp-
 admin/tools.php?page=export_personal_data&orderby=requested&order=asc}}}

 - Second click on {{{Requested}}} gives {{{post_date DESC}}}. (sorting
 arrow down) (Expected)
  Request: {{{/wp-
 admin/tools.php?page=export_personal_data&orderby=requested&order=desc}}}

 - First click on {{{Requester}}} gives {{{post_title ASC}}}. (sorting
 arrow up) (Expected)
  Request: {{{/wp-
 admin/tools.php?page=export_personal_data&orderby=requester&order=asc}}}

 - Second click on {{{Requester}}} gives {{{post_title DESC}}}. (sorting
 arrow down) (Expected)
  Request: {{{/wp-
 admin/tools.php?page=export_personal_data&orderby=requester&order=desc}}}

 - When {{{Requester}}} sorting is active, and we click on {{{Requested}}}
 it gives {{{post_date DESC}}} (sorting arrow down) (Expected compared to
 default)
  Request: {{{/wp-
 admin/tools.php?page=export_personal_data&orderby=requested&order=desc}}}

 - When {{{Requested}}} sorting is active, and we click on {{{Requester}}}
 it gives {{{post_title ASC}}} (sorting arrow up) (Expected)
  Request: {{{/wp-
 admin/tools.php?page=export_personal_data&orderby=requester&order=asc}}}

 - When searching ({{{s=foo}}}) it respects the search-sorting-by-relevance
 when no arrow shows up (Expected):
  Request: {{{/wp-admin/tools.php?s=foo&page=export_personal_data&filter-
 status&orderby&order}}}

 - When searching ({{{s=foo}}}): The first click on {{{Requester}}}, sorts
 by {{{post_title ASC}}} (sorting arrow up) (Expected)
  Request: {{{/wp-admin/tools.php?s=foo&page=export_personal_data&filter-
 status&orderby=requester&order=asc}}}

 - When searching ({{{s=foo}}}): The next click on {{{Requester}}}, sorts
 by {{{post_title DESC}}}. (sorting arrow down) (Expected)
  Request: {{{/wp-admin/tools.php?s=foo&page=export_personal_data&filter-
 status&orderby=requester&order=desc}}}

 - When searching ({{{s=foo}}}): The first click on {{{Requested}}}, sorts
 by {{{post_date DESC}}}. (sorting arrow down) (Expected)
  Request: {{{/wp-admin/tools.php?s=foo&page=export_personal_data&filter-
 status&orderby=requested&order=desc}}}

 - When searching ({{{s=foo}}}): The next click on {{{Requested}}}, sorts
 by {{{post_date ASC}}}. (sorting arrow up) (Expected)
  Request: {{{/wp-admin/tools.php?s=foo&page=export_personal_data&filter-
 status&orderby=requested&order=asc}}}

 So this looks good to me, where the date field sorting defaults to DESC,
 but title field sorting defaults to ASC.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43960#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list