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 2024-02-26] [$500] Expense - "Recent" and "All" appear in report field selection list when there is no result #35832

Closed
6 tasks done
lanitochka17 opened this issue Feb 5, 2024 · 29 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 External Added to denote the issue can be worked on by a contributor Monthly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 5, 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: .1.4-36.1
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
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 dropdown field set up in "Report and Invoice Fields" on Old Dot
  1. Go to workspace chat
  2. Create a request
  3. Go to expense report
  4. Click on the report field with the selection list set up from Old Dot
  5. Search for an invalid term
    Note that "Recent" and "All" appear when there are no relevant results

Expected Result:

In Step 4, when there is no recent item, "Recent" will not appear in the list
In Step 5, when there is no search result, "Recent" and "All" will not appear in the list

Actual Result:

In Step 4, when there is no recent item, "Recent" appears in the list
In Step 5, when there is no search result, "Recent" and "All" also appear in the list

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

Bug6367962_1707149161081.bandicam_2024-02-05_21-13-05-298__1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d9bb73088604e957
  • Upwork Job ID: 1754584397767528448
  • Last Price Increase: 2024-02-05
  • Automatic offers:
    • Amarparab2024 | Contributor | 0
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Feb 5, 2024
Copy link
Contributor

github-actions bot commented Feb 5, 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 5, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave6
CC @greg-schroeder

@aeioual
Copy link
Contributor

aeioual commented Feb 5, 2024

Proposal

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

"Recent" and "All" appear in report field selection list when there is no result

What is the root cause of that problem?

We have a condition to always show the recents regardless of the list being empty

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

Update the function to only show the recents if the list is not empty

shouldShow: !_.isEmpty(recentlyUsedOptions)

We already do that at other places

shouldShow: !_.isEmpty(newChatOptions.recentReports),

Same approach will be followed for All list

What alternative solutions did you explore? (Optional)

N/A

@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 5, 2024
@mountiny
Copy link
Contributor

mountiny commented Feb 5, 2024

Not a blocker, this is behind beta cc @thienlnam @allroundexperts

@NikkiWines NikkiWines added the External Added to denote the issue can be worked on by a contributor label Feb 5, 2024
@melvin-bot melvin-bot bot changed the title Expense - "Recent" and "All" appear in report field selection list when there is no result [$500] Expense - "Recent" and "All" appear in report field selection list when there is no result Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01d9bb73088604e957

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

melvin-bot bot commented Feb 5, 2024

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

@NikkiWines NikkiWines added the Bug Something is broken. Auto assigns a BugZero manager. label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

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

@jayeshmangwani
Copy link
Contributor

Proposal

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

Recent and All text is visible when there is no data for the respective sections.

What is the root cause of that problem?

we are using the EditReportFieldDropdownPage component to display the edit report field page here,

if (reportField.type === 'dropdown') {
return (
<EditReportFieldDropdownPage
policyID={report.policyID ?? ''}
fieldID={reportField.fieldID}
fieldName={Str.UCFirst(reportField.name)}
fieldValue={fieldValue}
fieldOptions={reportField.values}
onSubmit={handleReportFieldChange}
/>
);
}
}

beneat the EditReportFieldPage we are showing the Recents and All section here,

return [
{
title: translate('common.recents'),
shouldShow: true,
data: filteredRecentOptions.map((option) => ({
text: option,
keyForList: option,
searchText: option,
tooltipText: option,
})),
},
{
title: translate('common.all'),
shouldShow: true,
data: filteredRestOfOptions.map((option) => ({
text: option,
keyForList: option,
searchText: option,
tooltipText: option,
})),
},
];

above we can see the shouldShow is hard coded true, show it doesnt matter the length of the all or recent data we always show the All and Recent text, thats the cause of the issue

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

We have to add the check here for the respective option

  1. For the Recents we have to check of the filteredRecentOptions's length greater than 0 then shoudShow will be true or false
    title: translate('common.recents'),
    shouldShow: true,
shouldShow: filteredRecentOptions.length > 0,
  1. For the All we have to check of the filteredRestOfOptions's length greater than 0 then shoudShow will be true or false

title: translate('common.all'),
shouldShow: true,

shouldShow: filteredRestOfOptions.length > 0,
Result
recent-and-all-text-hide-on-empty.mov

What alternative solutions did you explore? (Optional)

none

@aeioual
Copy link
Contributor

aeioual commented Feb 5, 2024

Just making my proposal noticeable as i posted it before the help wanted tag 😅😁

@melvin-bot melvin-bot bot added the Overdue label Feb 8, 2024
@NikkiWines
Copy link
Contributor

@allroundexperts can you give the proposals here a review? 🙇

@melvin-bot melvin-bot bot removed the Overdue label Feb 8, 2024
@allroundexperts
Copy link
Contributor

@Amarparab2024's proposal looks good to me. @jayeshmangwani your proposal seems to be a duplicate.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 8, 2024

Current assignee @NikkiWines is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@jayeshmangwani
Copy link
Contributor

@allroundexperts Sorry, can you which part do you think is duplicate ?
selected proposal does not have the include the condition for the all contacts part.

@jayeshmangwani
Copy link
Contributor

jayeshmangwani commented Feb 8, 2024

Hi @Amarparab2024 , Yes I know the rule, but can you check your root cause where you have include only the part of the recent option, you didn't mentioned the "All" contacts part, and it should be included, it is in the description.

We have a condition to always show the recents regardless of the list being empty

@allroundexperts
Copy link
Contributor

I think this was a fairly simple to fix bug and the first proposal is conveying the RCA correctly as well. Elaborating it further doesn't seem to make your proposal any better. I would still go with the first proposal, but lets wait on the assigned internal engineer 😄

@aeioual
Copy link
Contributor

aeioual commented Feb 8, 2024

Thanks you so much @allroundexperts :)

@NikkiWines
Copy link
Contributor

Yeah, agreed with @allroundexperts here. For such a simple bug, @Amarparab2024's proposal is totally sufficient. @jayeshmangwani, your proposal is also good, but in this scenario, there's not significant enough of a difference between the proposals to warrant choosing the later one.

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

melvin-bot bot commented Feb 9, 2024

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@aeioual
Copy link
Contributor

aeioual commented Feb 11, 2024

PR #36304 ready for review :) @allroundexperts

@aeioual
Copy link
Contributor

aeioual commented Feb 19, 2024

The PR was deployed to staging 5 days back, did the automation fail, or do we need to wait until it is deployed to production ? @slafortune @NikkiWines 🤔

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 19, 2024
@melvin-bot melvin-bot bot changed the title [$500] Expense - "Recent" and "All" appear in report field selection list when there is no result [HOLD for payment 2024-02-26] [$500] Expense - "Recent" and "All" appear in report field selection list when there is no result Feb 19, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

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

Copy link

melvin-bot bot commented Feb 19, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.42-5 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-26. 🎊

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

Copy link

melvin-bot bot commented Feb 19, 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:

  • [@allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts] 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:
  • [@allroundexperts] 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:
  • [@allroundexperts] Determine if we should create a regression test for this bug.
  • [@allroundexperts] 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.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Monthly KSv2 and removed Weekly KSv2 labels Feb 26, 2024
@slafortune
Copy link
Contributor

Waiting on @allroundexperts to complete checklist -

@allroundexperts requires payment through NewDot Manual Requests - $500
@Amarparab2024 Pay $500 via Upworks - PAID

@allroundexperts
Copy link
Contributor

Checklist

  1. feat: Add report field picker components #34157
  2. https://github.com/Expensify/App/pull/34157/files#r1505391575
  3. N/A
  4. This is really minor so a regression test might not be needed. However, if we decide on adding it, then the steps in the OP look good enough.

@slafortune
Copy link
Contributor

Thanks @allroundexperts !

@allroundexperts requires payment through NewDot Manual Requests - $500
@Amarparab2024 Pay $500 via Upworks - PAID

@JmillsExpensify
Copy link

$500 approved for @allroundexperts based on summary above.

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 External Added to denote the issue can be worked on by a contributor Monthly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants