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

[C+ Checklist Needs Completion] [$500] Distance - Unable to unselect default category from confirmation page #36139

Closed
6 tasks done
izarutskaya opened this issue Feb 8, 2024 · 27 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 8, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: v.1.4-38.2
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation:

Action Performed:

Precondition:

  • User is an employee of Collect workspace.
  • The Collect workspace has set up default category for Distance request.
  1. Go to workspace chat.
  2. Start distance request flow.
  3. Proceed to confirmation page.
  4. Click Category.
  5. Click on the selected default category.
  6. Note that user cannot unselect the default category.
  7. Create the distance request.
  8. Go to details page of the created distance request.
  9. Click Category.
  10. Click on the selected category.
  11. Now user can unselect the category.

Expected Result:

In Step 4, user should be able to unselect the default distance category.

Actual Result:

In Step 4, user is unable to unselect the default distance category.
Only after the distance request is created, user can unselect it from the request details page.

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6371628_1707391850643.20240208_102412.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0165ec95398a746481
  • Upwork Job ID: 1755567118652162048
  • Last Price Increase: 2024-02-08
  • Automatic offers:
    • situchan | Contributor | 28150761
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 8, 2024
@melvin-bot melvin-bot bot changed the title Distance - Unable to unselect default category from confirmation page [$500] Distance - Unable to unselect default category from confirmation page Feb 8, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0165ec95398a746481

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 8, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

Copy link

melvin-bot bot commented Feb 8, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 8, 2024
Copy link
Contributor

github-actions bot commented Feb 8, 2024

👋 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.

Copy link

melvin-bot bot commented Feb 8, 2024

Triggered auto assignment to @Gonals (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@izarutskaya
Copy link
Author

We think that this bug might be related to #vip-vsb
CC @quinthar

@paultsimura
Copy link
Contributor

paultsimura commented Feb 8, 2024

This is a regression from #33388
cc: @situchan @tienifr

We need to use a ref to check if the default category was set on the page load:

    const defaultCategoryHasBeenSet = useRef(false);
    ...
    useEffect(() => {
        if (requestType !== CONST.IOU.REQUEST_TYPE.DISTANCE || !_.isEmpty(transaction.category) || !!defaultCategoryHasBeenSet.current) {
            return;
        }
        IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory);
        defaultCategoryHasBeenSet.current = true;
    }, [transactionID, transaction.category, requestType, defaultCategory]);

useEffect(() => {
if (requestType !== CONST.IOU.REQUEST_TYPE.DISTANCE || !_.isEmpty(transaction.category)) {
return;
}
IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory);
}, [transactionID, transaction.category, requestType, defaultCategory]);

@situchan
Copy link
Contributor

situchan commented Feb 8, 2024

@tienifr can you raise quick PR?

@situchan
Copy link
Contributor

situchan commented Feb 8, 2024

 useEffect(() => { 
     if (requestType !== CONST.IOU.REQUEST_TYPE.DISTANCE || !_.isEmpty(transaction.category)) { 
         return; 
     } 
     IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); 
- }, [transactionID, transaction.category, requestType, defaultCategory]); 
+ }, [transactionID, requestType, defaultCategory]); 

I think this solution is better

@situchan
Copy link
Contributor

situchan commented Feb 8, 2024

PR is up

@Julesssss Julesssss assigned Julesssss and unassigned Gonals Feb 8, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.38-6 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 2024-02-15. 🎊

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

Copy link

melvin-bot bot commented Feb 8, 2024

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:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Feb 12, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-02-15] [$500] Distance - Unable to unselect default category from confirmation page [HOLD for payment 2024-02-19] [HOLD for payment 2024-02-15] [$500] Distance - Unable to unselect default category from confirmation page Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.39-8 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 2024-02-19. 🎊

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

Copy link

melvin-bot bot commented Feb 12, 2024

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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 15, 2024
@greg-schroeder greg-schroeder changed the title [HOLD for payment 2024-02-19] [HOLD for payment 2024-02-15] [$500] Distance - Unable to unselect default category from confirmation page [HOLD for payment 2024-02-15] [$500] Distance - Unable to unselect default category from confirmation page Feb 16, 2024
@greg-schroeder
Copy link
Contributor

Okay so reviewing this ... this is a regression from #33388. That PR was implemented by @tienifr and reviewed by @situchan. Both were paid $500 - it doesn't seem like there was a regression penalty applied? Not sure.

This issue resulted in a PR that was CP'd to resolve the regression, which was implemented by @situchan and reviewed by @aimane-chnaif.

@rushatgabhane was assigned to this issue as C+ via automation, but I don't think he participated in the review as this was a deploy blocker that was implemented very quickly.


With that said, I think the payments for this issue should just be:

$500 to @aimane-chnaif

Please let me know if I got any of this incorrect.

@melvin-bot melvin-bot bot removed the Overdue label Feb 16, 2024
@greg-schroeder
Copy link
Contributor

Paid. One of the 3 C+ assigned to this can hopefully take care of the checklist. :)

@greg-schroeder greg-schroeder changed the title [HOLD for payment 2024-02-15] [$500] Distance - Unable to unselect default category from confirmation page [C+ Checklist Needs Completion] [$500] Distance - Unable to unselect default category from confirmation page Feb 16, 2024
@greg-schroeder greg-schroeder removed the Awaiting Payment Auto-added when associated PR is deployed to production label Feb 16, 2024
@aimane-chnaif
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Set default category for distance request #34012
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/34012/files#r1493746272
  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A as this was caught in staging by QA
  • Determine if we should create a regression test for this bug.
  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

@rushatgabhane rushatgabhane removed their assignment Feb 20, 2024
@melvin-bot melvin-bot bot added the Overdue label Feb 20, 2024
@Julesssss
Copy link
Contributor

Quiet melvin.

I think we're good now, right @greg-schroeder

@melvin-bot melvin-bot bot removed the Overdue label Feb 20, 2024
@aimane-chnaif
Copy link
Contributor

I think we can close this

Copy link

melvin-bot bot commented Feb 22, 2024

@Julesssss @greg-schroeder @aimane-chnaif @situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Feb 22, 2024
Copy link

melvin-bot bot commented Feb 26, 2024

@Julesssss, @greg-schroeder, @aimane-chnaif, @situchan Huh... This is 4 days overdue. Who can take care of this?

@greg-schroeder
Copy link
Contributor

Oops, sorry, closing and taking care of final steps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants