Skip to content

Conversation

@CGastrell
Copy link
Contributor

A bug was found when exporting form responses. The bug was introduced on #28678 and/or #28425 in the spirit of making column names look better by removing the order prefix. This led to wrong data merging upon the export process.

Fixes #29429

Proposed changes:

This PR rolls back the rename/cleanup of field names (columns) to leave them as they were before the mentioned PRs. This doesn't mean we're completely reverting those changes, as all the other improvements remain.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Does this pull request change what data or activity we track or use?

No

Testing instructions:

Follow instructions on #29429

Exported data should now reflect the collected data more faithfully, even if that means that the same 2 fields are treated as different ones after inverting their order. This has always behaved that way and we plan to improve it on further iterations.

@CGastrell CGastrell added [Status] Needs Team Review Obsolete. Use Needs Review instead. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Package] Forms labels Mar 13, 2023
@CGastrell CGastrell self-assigned this Mar 13, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2023

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: April 4, 2023.
  • Scheduled code freeze: March 28, 2023.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2023

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run

bin/jetpack-downloader test jetpack fix/forms-export-bug-29429

to get started. More details: p9dueE-5Nn-p2

@CGastrell CGastrell requested a review from ice9js March 13, 2023 22:49
@oskosk
Copy link
Contributor

oskosk commented Mar 14, 2023

Pushed abe9896 with a rebase, 5623af5 with a changelog entry for Jetpack, and 2409443 with versions bump

@oskosk
Copy link
Contributor

oskosk commented Mar 14, 2023

Tests need to be updated

image

@oskosk
Copy link
Contributor

oskosk commented Mar 14, 2023

Pushed 3d80139 with update to tests in package and module

@oskosk oskosk changed the title Fix export bug: missing data/columns Fix export bug: missing data/columns (Revert) Mar 14, 2023
@oskosk oskosk changed the title Fix export bug: missing data/columns (Revert) Fix export bug: missing data/columns (A sort of Revert) Mar 14, 2023
@oskosk oskosk changed the title Fix export bug: missing data/columns (A sort of Revert) Fix export bug: missing data/columns (A sort of Revert of #28678 and #28425 ) Mar 14, 2023
Copy link
Contributor

@oskosk oskosk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests well with instructions from #29429

CSV export looks like this

image

@oskosk oskosk changed the title Fix export bug: missing data/columns (A sort of Revert of #28678 and #28425 ) Fix export bug: missing data/columns (A sort of Revert of #28678) Mar 14, 2023
@sdixon194 sdixon194 merged commit 3f18cbb into trunk Mar 14, 2023
@sdixon194 sdixon194 deleted the fix/forms-export-bug-29429 branch March 14, 2023 14:43
@github-actions github-actions bot removed the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Mar 14, 2023
@github-actions github-actions bot added this to the jetpack/12.0 milestone Mar 14, 2023
@sdixon194
Copy link
Contributor

This has been cherry picked to the release branch and a special package v0.6.0.2 has been cut to be included in 11.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export assigns data to wrong row when fields reordered

5 participants