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

[Wave 6: Categories] Category/Tag Selector Show up in DM Money Requests #27556

Closed
6 tasks done
yuwenmemon opened this issue Sep 15, 2023 · 20 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@yuwenmemon
Copy link
Contributor

yuwenmemon commented Sep 15, 2023

Action Performed:

  1. Create a new account
  2. Create a money request from another user
  3. On the confirmation step, observe that the category and tag selectors show for the money request:
    https://github.com/Expensify/App/assets/4741899/16a59421-b77a-42da-a35b-0a0e49d25822

Expected Result:

  • The Category and Tag selectors should not show for a DM Money Request because that chat report does not belong to a policy (They belong to the policy _FAKE_)

Actual Result:

  • The Category/Tag selector is visible for the Money Request on the confirmation page.

Workaround:

  • This feature is under a beta so real-life users can't see it yet.

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: N/A
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): N/A
Logs: N/A
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL: N/A
Issue reported by: @rezkiy37
Slack conversation: https://expensify.slack.com/archives/C02MW39LT9N/p1694793499639819

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019f9ca0cd0d1a9a22
  • Upwork Job ID: 1702759634044727296
  • Last Price Increase: 2023-09-15
  • Automatic offers:
    • situchan | Reviewer | 26699580
@yuwenmemon yuwenmemon added Engineering Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 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

@yuwenmemon yuwenmemon added the External Added to denote the issue can be worked on by a contributor label Sep 15, 2023
@melvin-bot melvin-bot bot changed the title Category/Tag Selector Show up in DM Money Requests [$500] Category/Tag Selector Show up in DM Money Requests Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019f9ca0cd0d1a9a22

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@yuwenmemon yuwenmemon added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Help Wanted Apply this label when an issue is open to proposals by contributors Engineering labels Sep 15, 2023
@neonbhai
Copy link
Contributor

neonbhai commented Sep 15, 2023

Proposal

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

Category/Tag Selector Show up in DM Money Requests

What is the root cause of that problem?

For Tags:

We don't check if the report is a policyExpenseChat when use set value of canUseTags here:

const canUseTags = Permissions.canUseTags(props.betas);

For Category:

🤔 Cannot see Category on latest main, which checks out, as we check for props.policyCategories here:

const shouldCategoryBeEditable = !_.isEmpty(props.policyCategories) && Permissions.canUseCategories(props.betas);

Since if chat is not a policy, policy chat will not be populated. So shouldCategoryBeEditable will be false and the Category menuItem will not be rendered:

{shouldCategoryBeEditable && (
<MenuItemWithTopDescription

Although I feel the name is misleading, as it feels like shouldCategoryBeEditable being false will disable the component, instead of not showing it altogether. It should be changed to shouldShowCategory

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

We should add

ReportUtils.isPolicyExpenseChat(ReportUtils.getReport(props.reportID));

to canUseTags to check if report is a policy Chat.

And change shouldCategoryBeEditable here to shouldShowCategory to better reflect its purpose in code.

Result
Tags.webm

What alternative solutions did you explore? (Optional)

xx

@rezkiy37
Copy link
Contributor

Hello, I am Mykhailo from Callstack. I would like to work on this issue.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@rezkiy37
Copy link
Contributor

Working on the issue.

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@rezkiy37
Copy link
Contributor

@yuwenmemon, I am going to fix it in a scope of #24464 (#27459). Because I need a few same new helpers there. Are we okay with it?

@yuwenmemon
Copy link
Contributor Author

Yep sounds good to me!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 19, 2023
@rezkiy37
Copy link
Contributor

The PR - #27459 - has been merged.

@puneetlath
Copy link
Contributor

@situchan I see you assigned to the issue, but it doesn't look like you were involved in the PR review, is that correct?

@situchan
Copy link
Contributor

@situchan I see you assigned to the issue, but it doesn't look like you were involved in the PR review, is that correct?

correct. I wasn't aware that linked PR was in progress.
Seems like #27459 wasn't reviewed by any C+.

@rezkiy37 in the future, please link issues like this so that automation would work correctly

Wrong:

$ https://github.com/Expensify/App/issues/24464, https://github.com/Expensify/App/issues/27556

Correct:

$ https://github.com/Expensify/App/issues/24464
$ https://github.com/Expensify/App/issues/27556

@puneetlath
Copy link
Contributor

Ok, thanks for confirming @situchan. We're good to close this out in that case once the PR is deployed to production.

@puneetlath puneetlath changed the title [$500] Category/Tag Selector Show up in DM Money Requests [Wave 6: Categories] Category/Tag Selector Show up in DM Money Requests Sep 22, 2023
@rezkiy37
Copy link
Contributor

@situchan I see you assigned to the issue, but it doesn't look like you were involved in the PR review, is that correct?

correct. I wasn't aware that linked PR was in progress. Seems like #27459 wasn't reviewed by any C+.

@rezkiy37 in the future, please link issues like this so that automation would work correctly

Wrong:

$ https://github.com/Expensify/App/issues/24464, https://github.com/Expensify/App/issues/27556

Correct:

$ https://github.com/Expensify/App/issues/24464
$ https://github.com/Expensify/App/issues/27556

Sorry, my bad 😅

@rezkiy37
Copy link
Contributor

The issue (#24464), in which scope I fixed the bug, already closed.

@puneetlath
Copy link
Contributor

@rezkiy37 just to clarify, you're saying this bug has been fixed and we can close this issue, is that correct?

@rezkiy37
Copy link
Contributor

@rezkiy37 just to clarify, you're saying this bug has been fixed and we can close this issue, is that correct?

Yes, it is correct.

@puneetlath
Copy link
Contributor

Great!

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Development

No branches or pull requests

6 participants