-
Notifications
You must be signed in to change notification settings - Fork 846
Change responses export columns #28678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run to get started. More details: p9dueE-5Nn-p2 |
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
|
Nice Christian! Two things I noticed, and we might want to address this in a different PR if useful: Date columns vs. Date PickerIf you look at the screenshots below, I am using two different forms on two different posts. The order of the columns of the "middle category"
|
I think this is a known issue and, sadly, not the goal of this change to fix it. The are some resolutions on backend to "guess" what is a comment and in what order the fields are turned into columns. There's another "guess" as to how to make some of those fields, through different forms, match on the same column. These all deserves a separate PR to try and fix it. |
…extra data. Add dictionary with translations for them
…ps and order achieved
e30d82b to
72bd228
Compare
projects/packages/forms/src/contact-form/class-contact-form-plugin.php
Outdated
Show resolved
Hide resolved
| $md['-6_source'] .= $parsed['path']; | ||
| } | ||
| if ( $parsed && ! empty( $parsed['query'] ) ) { | ||
| $md['-6_source'] .= '?' . $parsed['query']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we need to sanitize this to avoid issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm... might be, it's something we set internally with esc_url( get_permalink( get_the_ID() ) ). I'd say it's safe enough, but maybe it's worth cleansing the parsed parts?
| */ | ||
| $renamed_field = preg_replace( '/^(\d{1,2}_)/', '', $single_field_name ); | ||
| $renamed_field = preg_replace( '/^(-?\d{1,2}_)/', '', $renamed_field ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should expand the comment a bit, for our future selves? to explain why we need to care about a possible - here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more explanation on how/why prefixes could be negative values and a reference to the sorting function. Hope that's enough
Co-authored-by: Jeremy Herve <[email protected]>
2b8c60e
jeherve
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. I ran into the same ordering issues with the csv, but since this is already already tracked it should be good to merge.
…9448) Co-authored-by: oskosk <[email protected]>
…9448) Co-authored-by: oskosk <[email protected]>



Second iteration on responses export functionality: reorder and prioritize columns.
Fixes #28677
Proposed changes:
Used backend column naming to group and translate. The column order should now be as described here: pcsBup-K4-p2
Other information:
Jetpack product discussion
pcsBup-K4-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Use a site with some responses or create one, publish a post with a form and fill it a couple of times. Use multiple/different forms for fully testing the behavior.
Go to "Feedback" menu on wp-admin and use the "Export" button. Both CSV or exporting to Google Sheets should show columns: