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-11-22] [$500] [Wave 6: Tags] IOU-No result found message is not shown in tag search in Workspace #30166

Closed
5 of 6 tasks
izarutskaya opened this issue Oct 23, 2023 · 36 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

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 23, 2023

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.3.88-3

Reproducible in staging?: Y

Reproducible in production?: Y

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:

Pre-Condition: 1 Enable tags in admin account in old dot by visiting policy settings----tags
2.Give a custom name for tag eg shahrukh khan
3.Create few tags

  1. Launch app
  2. Tap on a workspace chat as employee
  3. Tap plus icon----request money ---manual
  4. Enter an amount
  5. Tap next
  6. Tap show more
  7. Tap tag and search the term "rabbit"

Expected Result:

In tag search, if there is no result for the term we entered, it must show "no results found" message.

Actual Result:

In tag search, if there is no result for the term we entered, it's not showing "no results found" or any message.

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

Android: Native
Bug6247197_1698057889937.no_result.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b19b081253474e07
  • Upwork Job ID: 1716411075943825408
  • Last Price Increase: 2023-11-06
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 27646675
    • c3024 | Contributor | 27646678
@izarutskaya izarutskaya added 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 Oct 23, 2023
@melvin-bot melvin-bot bot changed the title IOU-No result found message is not shown in tag search in Workspace [$500] IOU-No result found message is not shown in tag search in Workspace Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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

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

melvin-bot bot commented Oct 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 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

@c3024
Copy link
Contributor

c3024 commented Oct 23, 2023

Proposal

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

No header message in tag search when there are no tag results for a search term

What is the root cause of that problem?

Here in the TagPicker

const headerMessage = OptionsListUtils.getHeaderMessageForNonUserList(lodashGet(sections, '[0].data.length', 0) > 0, '');

we are not passing the searchValue as the second param.
We are passing empty string as searchValue and this here
function getHeaderMessageForNonUserList(hasSelectableOptions, searchValue) {
if (searchValue && !hasSelectableOptions) {
return Localize.translate(preferredLocale, 'common.noResultsFound');
}
return '';

returns empty string.

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

We should change the above line to

const headerMessage = OptionsListUtils.getHeaderMessageForNonUserList(lodashGet(sections, '[0].data.length', 0) > 0, searchValue);

The other proposal suggests this scenario: we search with a term returning no results -> then the admin deletes some tags from another account so that the number of tags go below threshold -> pusher sends these reduced number of tags. -> search input disappears.
But presently pusher does not send these updated tags. They get updated only when we refresh and when we refresh the search term goes away so there is no such issue as suggested in the other proposal.

If we are to face such issue, it is better to solve it by removing the threshold altogether and show the search always instead of adding pieces of code unnecessarily complicating the component to address such unlikely cases.

What alternative solutions did you explore? (Optional)

At many places we pass the trimmed search value to the function getting header message. We can pass the trimmed search value to the function above as well.

Result Screenshot 2023-10-23 at 5 19 38 PM

@cooldev900
Copy link
Contributor

cooldev900 commented Oct 23, 2023

Proposal

from: @cooldev900

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

In tag search, if there is no result for the term we entered, it's not showing "no results found" or any message.

What is the root cause of that problem?

The root cause is that headerMessage is always empty because we always send empty search value here.

const headerMessage = OptionsListUtils.getHeaderMessageForNonUserList(lodashGet(sections, '[0].data.length', 0) > 0, '');

function getHeaderMessageForNonUserList(hasSelectableOptions, searchValue) {
if (searchValue && !hasSelectableOptions) {
return Localize.translate(preferredLocale, 'common.noResultsFound');
}
return '';
}

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

We need to send search value so that it return correct error message.

const headerMessage = OptionsListUtils.getHeaderMessageForNonUserList(lodashGet(sections, '[0].data.length', 0) > 0, searchValue);

What alternative solutions did you explore? (Optional)

N/A

@tienifr
Copy link
Contributor

tienifr commented Oct 23, 2023

Proposal

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

In tag search, if there is no result for the term we entered, it's not showing "no results found" or any message.

What is the root cause of that problem?

We're not setting the searchValue in here, so it always returns empty string.

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

We need to pass searchValue to this line

 const headerMessage = OptionsListUtils.getHeaderMessageForNonUserList(lodashGet(sections, '[0].data.length', 0) > 0, searchValue);

After this, we have another problem, if our search result returns not found, and the policy tags list is updated via pusher such that the tag count goes below the threshold (see the logic here), we'll be stuck in the screen with our newly added No result found message, because all the options are not showing and the search bar will also disappear.

To fix this, we need to reset the searchValue if the shouldShowTextInput becomes false

useEffect(() => {
    if (!shouldShowTextInput) {
        setSearchValue('');
    }
}, [shouldShowTextInput]);

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Oct 25, 2023
@mallenexpensify
Copy link
Contributor

Not sure if we're working on tag-related issues/bugs
Checking internally
https://expensify.slack.com/archives/C02MW39LT9N/p1698240952313149

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 25, 2023
@abdulrahuman5196
Copy link
Contributor

@mallenexpensify is checking internally

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mallenexpensify
Copy link
Contributor

We are working on tags, it's in beta and contributors should be able to set them locally. @abdulrahuman5196 please review the proposals above. Thx

@abdulrahuman5196
Copy link
Contributor

Thank you. Taking a look

@abdulrahuman5196
Copy link
Contributor

Requesting for tags beta, since i am unable to see tags itself - https://expensify.slack.com/archives/C01GTK53T8Q/p1698841253711199

@melvin-bot melvin-bot bot added the Overdue label Nov 3, 2023
@mallenexpensify
Copy link
Contributor

mallenexpensify commented Nov 3, 2023

@abdulrahuman5196 just got access to the tags beta, if anyone else needs, please share your email address here or in the Slack thread above

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 3, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

@mallenexpensify @abdulrahuman5196 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!

Copy link

melvin-bot bot commented Nov 6, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Nov 13, 2023

Triggered auto assignment to @nkuoch, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Nov 13, 2023

📣 @abdulrahuman5196 🎉 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

Copy link

melvin-bot bot commented Nov 13, 2023

📣 @c3024 🎉 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 📖

@tienifr
Copy link
Contributor

tienifr commented Nov 13, 2023

I think the mentioned extra case of pusher is kind of PR level change

@abdulrahuman5196 I'm sure it's not something obvious that can be discovered during PR process, could you kindly evaluate again?

It's a very hard to reproduce case that takes a lot of effort to get right. It's the only proposal that fixes all case of the issues so I don't think we can say "all other proposals are same" here

cc @nkuoch

Copy link

melvin-bot bot commented Nov 13, 2023

@nkuoch @mallenexpensify @abdulrahuman5196 @c3024 this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Nov 13, 2023
@melvin-bot melvin-bot bot changed the title [$500] [Wave 6: Tags] IOU-No result found message is not shown in tag search in Workspace [HOLD for payment 2023-11-22] [$500] [Wave 6: Tags] IOU-No result found message is not shown in tag search in Workspace Nov 15, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 15, 2023
Copy link

melvin-bot bot commented Nov 15, 2023

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

Copy link

melvin-bot bot commented Nov 15, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.99-0 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-11-22. 🎊

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:

Copy link

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

  • [@abdulrahuman5196] The PR that introduced the bug has been identified. Link to the PR:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] Determine if we should create a regression test for this bug.
  • [@abdulrahuman5196] 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.
  • [@mallenexpensify] 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 Overdue and removed Weekly KSv2 labels Nov 22, 2023
Copy link

melvin-bot bot commented Nov 27, 2023

@nkuoch, @mallenexpensify, @abdulrahuman5196, @c3024 Huh... This is 4 days overdue. Who can take care of this?

@mallenexpensify
Copy link
Contributor

Contributor: @c3024 paid $500 via Upwork
Contributor+: @abdulrahuman5196 paid $500 via Upwork.

@abdulrahuman5196 can you please fill out the checklist above? Thx

@melvin-bot melvin-bot bot removed the Overdue label Nov 28, 2023
@abdulrahuman5196
Copy link
Contributor

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

Not a regression. Seems to be implementation miss.

Determine if we should create a regression test for this bug.

Yes.

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.

  1. Go to a workspace chat where the user is an employee
  2. Click on 'Request money'
  3. Select 'Manual'
  4. Enter an amount
  5. Click 'Next'
  6. Click 'Show more'
  7. Click on 'Tag'
  8. Enter a text in search till no results are found
  9. Verify that 'No results found' message is shown

@mallenexpensify

@mallenexpensify
Copy link
Contributor

Thanks @abdulrahuman5196 , TestRail update GH created

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
Projects
No open projects
Development

No branches or pull requests

7 participants