Skip to content
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

Connection: fixing the bug with connect button not appearing for secondary users #21450

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

sergeymitr
Copy link
Contributor

Changes proposed in this Pull Request:

Fix the bug with connection not appearing for secondary users after disconnect.
After secondary user gets disconnected, connection status in the state doesn't get properly updated. This PR fixes it by updating the state properly.

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

No.

Testing instructions:

We'll start with reproducing the bug to make sure we're actually fixing it.

  1. Checkout the master branch, connect Jetpack.
  2. Log in as secondary user (admin or non-admin), connect to WP.com
  3. Go to Jetpack Dashboard, click "Disconnect your WordPress.com account".
  4. The link to "Connect your WordPress.com account" should appear, click it.
  5. The connection screen should appear, confirm that the "Connect your user account" button is not there.
  6. Checkout the branch for this PR, reload Jetpack Dashboard, connect the user.
  7. Repeat steps 3-5, confirm that the "Connect your user account" button appears this time.

@sergeymitr sergeymitr added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Cherry-Pick RNA labels Oct 18, 2021
@sergeymitr sergeymitr added this to the jetpack/10.2.1 milestone Oct 18, 2021
@sergeymitr sergeymitr requested a review from jeherve October 18, 2021 21:18
@sergeymitr sergeymitr self-assigned this Oct 18, 2021
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Admin Page React-powered dashboard under the Jetpack menu labels Oct 18, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2021

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: November 2, 2021.
  • Scheduled code freeze: October 25, 2021.

@sergeymitr sergeymitr added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Oct 18, 2021
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Oct 19, 2021
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This works for me, good catch!

@jeherve jeherve enabled auto-merge (squash) October 19, 2021 08:17
@jeherve jeherve merged commit c3b6f4b into master Oct 19, 2021
@jeherve jeherve deleted the fix/secondary-user-connect-button branch October 19, 2021 08:17
jeherve pushed a commit that referenced this pull request Oct 19, 2021
@jeherve
Copy link
Member

jeherve commented Oct 19, 2021

Cherry-picked to jetpack/branch-10.2 in af653aa

@jeherve jeherve removed [Status] Ready to Merge Go ahead, you can push that green button! [Status] Needs Cherry-Pick labels Oct 19, 2021
davidlonjon added a commit that referenced this pull request Oct 19, 2021
* master:
  Releases: start 10.3-a.4 cycle (#21454)
  Atomic Release: prepare changelogs for today's release (#21453)
  Connection: fixing the bug with connect button not appearing for secondary users (#21450)
  CLI: Add readme to 'jetpack release' (#21418)
  Update handling and setting CCPA related cookies (#21337)
  Publicize: do not disable toggle connection control when RePublicize is enabled (#21373)
  External Media: Add bottom padding to Google Photos modal (#21201)
  Blog Subscription Widget: deprecate widget and transform to block (#21184)
davidlonjon added a commit that referenced this pull request Oct 19, 2021
# By Jeremy Herve (2) and others
# Via GitHub
* master:
  Releases: start 10.3-a.4 cycle (#21454)
  Atomic Release: prepare changelogs for today's release (#21453)
  Connection: fixing the bug with connect button not appearing for secondary users (#21450)
  CLI: Add readme to 'jetpack release' (#21418)
  Update handling and setting CCPA related cookies (#21337)
  Publicize: do not disable toggle connection control when RePublicize is enabled (#21373)
  External Media: Add bottom padding to Google Photos modal (#21201)
  Blog Subscription Widget: deprecate widget and transform to block (#21184)

# Conflicts:
#	projects/plugins/boost/tests/e2e/package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants