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

[HOLD for payment 2023-09-21] [HOLD for payment 2023-09-20] web - Pronouns - Unable to deselect pronouns once it is selected #27235

Closed
5 of 6 tasks
izarutskaya opened this issue Sep 12, 2023 · 34 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 12, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Settings > Profile > Pronouns.
  3. Select a pronouns.
  4. Click on the pronouns again.
  5. Click on the selected pronouns to deselect it.

Expected Result:

The pronouns is now deselected.

Actual Result:

The pronouns remain selected.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.68-12

Reproducible in staging?: Y

Reproducible in production?: N

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug6197327_20230912_161325.mp4

Expensify/Expensify Issue URL:

Issue reported by: @gadhiyamanan

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694495687512659

View all open jobs on GitHub

@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

Triggered auto assignment to @joelbettner (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 12, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Not able to remove the pronoun

What is the root cause of that problem?

It is a regression from #26192 where currentPronouns is a string and we are trying to access keyForList on it. With that even though we click on the already selected pronoun it will again pass that value for the api call instead of empty string.

PersonalDetails.updatePronouns(selectedPronouns.keyForList === currentPronouns.keyForList ? '' : lodashGet(selectedPronouns, 'value', ''));

Earlier we were creating the object initiallyFocusedOption with the fields text & keyForList here.

What changes do you think we should make in order to solve the problem?

We need to correct the condition with selectedPronouns.value === currentPronouns

PersonalDetails.updatePronouns(selectedPronouns.keyForList === currentPronouns.keyForList ? '' : lodashGet(selectedPronouns, 'value', ''));

@Pluto0104
Copy link
Contributor

Pluto0104 commented Sep 12, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

We're currently unable to remove pronouns from the user profile.

What is the root cause of that problem?

This is a regression of #26192. It's crucial to treat this as a deploy blocker since it doesn't occur on NewDot.
The problem lies in how we're using conditions to update pronouns incorrectly.
In this code snippet, currentPronouns.keyForList is undefined because we have made significant changes in this component. Therefore, we need to use the correct currentPronounsKey.

PersonalDetails.updatePronouns(selectedPronouns.keyForList === currentPronouns.keyForList ? '' : lodashGet(selectedPronouns, 'value', ''));

What changes do you think we should make in order to solve the problem?

We need to ensure that we use the correct current pronouns key.

PersonalDetails.updatePronouns(selectedPronouns.keyForList === currentPronounsKey ? '' : lodashGet(selectedPronouns, 'value', ''));

What alternative solutions did you explore? (Optional)

N/A

@situchan
Copy link
Contributor

@Pluto0104's proposal looks good.
Since this is deploy blocker, I did quick review on this one as Santhosh (C+ on offending PR) is OOO for now.
cc: @joelbettner

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 12, 2023

@situchan have you checked my proposal too?

@Pluto0104
Copy link
Contributor

@Pujan92 your solution won't work because currentPronouns is not the same as selectedPronouns.keyForList.

@situchan
Copy link
Contributor

@situchan have you checked my proposal too?

yes, it's not correct solution. It was original logic to use key instead of value.

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 12, 2023

@Pujan92 your solution won't work because currentPronouns is not the same as selectedPronouns.keyForList.

actually, I am suggested to use selectedPronouns.value with currentPronouns so it will work.

yes, it's not correct solution. It was original logic to use key instead of value.

Ok, but I still believe the value is also unique so we can use that also here. AFAIK the key is benefitted for the keyExtractor in the SelectionList but value makes more sense to me.
Thoughts @thiagobrez ?

@thiagobrez
Copy link
Contributor

Both solutions work the same way, just use different keys, I have no preference

@joelbettner @situchan I'm the original PR author, should I take this as a regression?

@situchan
Copy link
Contributor

@joelbettner @situchan I'm the original PR author, should I take this as a regression?

yes, ofc

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Sep 12, 2023
@thiagobrez
Copy link
Contributor

PR is ready to review here: #27256

@situchan
Copy link
Contributor

PR is ready to review here: #27256

Reviewer checklist is done. @joelbettner or any engineer can approve & merge to unblock deploy.

@AndrewGable AndrewGable removed the DeployBlockerCash This issue or pull request should block deployment label Sep 13, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Sep 14, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-09-20] web - Pronouns - Unable to deselect pronouns once it is selected [HOLD for payment 2023-09-21] [HOLD for payment 2023-09-20] web - Pronouns - Unable to deselect pronouns once it is selected Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-09-21. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@abekkala
Copy link
Contributor

PAYMENTS FOR SEPT 21

@joelbettner I don't see any other assignees on here - were there other contributors in need of Upwork payment here?

@joelbettner
Copy link
Contributor

were there other contributors in need of Upwork payment here?

@abekkala I don't think so.

@situchan
Copy link
Contributor

I reviewed PR - #27235 (comment)

@joelbettner
Copy link
Contributor

My bad...yes, @situchan reviewed it, @abekkala.

@abekkala
Copy link
Contributor

PAYMENTS FOR SEPT 21
Issue reported by: @gadhiyamanan [$50]
PR Review: @situchan [$500]

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

@abekkala, @joelbettner Whoops! This issue is 2 days overdue. Let's get this updated quick!

@abekkala
Copy link
Contributor

I'm unable to get Upwork to save a job posting so I can issue payment.
working on it!

@melvin-bot melvin-bot bot removed the Overdue label Sep 25, 2023
@abekkala
Copy link
Contributor

@gadhiyamanan and @situchan
Upwork is back in action and I sent you both payment offers. Once accepted I'll process the payments!

@gadhiyamanan
Copy link
Contributor

@abekkala offer accepted, thanks!

@abekkala
Copy link
Contributor

@gadhiyamanan payment made and contract ended. Thank you! 🎉

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@abekkala
Copy link
Contributor

@situchan can you please accept the payment offer in Upwork so I can process payment to you.

Thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

@abekkala, @joelbettner Whoops! This issue is 2 days overdue. Let's get this updated quick!

@abekkala
Copy link
Contributor

abekkala commented Oct 2, 2023

@situchan payment made and contract ended - thank you! 🎉

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@abekkala
Copy link
Contributor

abekkala commented Oct 2, 2023

payments made - closing

@abekkala abekkala closed this as completed Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests

10 participants