[wp-trac] [WordPress Trac] #46895: Personal Data Export Report: A way to display the group count

WordPress Trac noreply at wordpress.org
Tue Sep 10 06:12:29 UTC 2019


#46895: Personal Data Export Report: A way to display the group count
-------------------------------------------------+-------------------------
 Reporter:  birgire                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.3
Component:  Privacy                              |     Version:  4.9.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots has-patch has-unit-  |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by garrett-eclipse):

 Thanks @birgire testing this and running the unit tests everything went
 well, the patch still applies cleanly and all the unit tests run properly.

 I also agree with your statement "there's no need to display the group
 count for a single item" and it begs the question if the group_count
 (previously group_display_count) boolean is even necessary here. Can we
 just not display the count if more than one for all groups. I don't
 believe there's a case where a group has multiple items and the count
 wouldn't be useful. And by requiring a boolean set would mean a dev-note
 would be required and the third-party tools that use the exporter will
 need to be aware of the boolean and update their implementation to utilize
 it, by simply adding count when >1 all third-party tools automatically are
 accounted for.

 If there are cases where group count isn't desired on multi-item groups
 another option is a disable boolean which would still require a dev note
 but then third-party tools will get the count unless they opt-out.

 Sidenote - If the boolean makes more sense than just using `count>1` I
 would suggest going back to a more descriptive one like in the initial
 diff when it was `group_display_count` as reading `$group_count = (bool)
 $export_datum['group_count'];` while I was reviewing had me double-check
 as on first glance it seemed like the actual group count of items was
 being cast as a boolean.

 Let me know your thoughts on dropping the boolean, I feel it simplifies
 things and removes the need to educate plugins, etc. via a dev-note.

 All the best

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


More information about the wp-trac mailing list