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-05-23] [$1000] DEV: Search items show weird undefined texts #18860

Closed
6 tasks done
kavimuru opened this issue May 12, 2023 · 32 comments
Closed
6 tasks done
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kavimuru
Copy link

kavimuru commented May 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. Open search page
  2. Click on the items

Expected Result:

Search item should show display name and alternate text correctly

Actual Result:

Empty display name and undefined alternate text, IOU reports disappear once opened

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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: DEV only
Reproducible in staging?: n/a
Reproducible in production?: n/a
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

web.mov
iouReport.mov
bug.mov

Expensify/Expensify Issue URL:
Issue reported by: @aimane-chnaif
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683816514449429

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b54ea2f8c5c60bc1
  • Upwork Job ID: 1658052636709498880
  • Last Price Increase: 2023-05-15
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Current assignees @JmillsExpensify and @trjExpensify are eligible for the Bug assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 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

@kavimuru kavimuru added the Needs Reproduction Reproducible steps needed label May 12, 2023
@trjExpensify trjExpensify added Needs Reproduction Reproducible steps needed and removed Needs Reproduction Reproducible steps needed labels May 12, 2023
@trjExpensify
Copy link
Contributor

@aimane-chnaif do you have a deeper idea of what's going on here? Also, is this something you want to take on? If we're opening this up external, I think we need to improve these steps. Presumably you need some iou/expenseReports etc?

  1. Open search page
  2. Click on the items

@melvin-bot
Copy link

melvin-bot bot commented May 14, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@dhairyasenjaliya
Copy link
Contributor

Even I can replicate with lots of undefined

Screenshot 2023-05-14 at 9 45 56 PM

@mountiny
Copy link
Contributor

@dhairyasenjaliya I cannot repro in staging or locally, any idea to see what is special about these accounts?

@dhairyasenjaliya
Copy link
Contributor

@mountiny What I can see from the log is if we have report type iou it shows as undefined I believe we don't have any parameter for that to display the name so the first line would show as blank since we are displaying fullName only if we have this condition satisfy this.props.option.isChatRoom || this.props.option.isPolicyExpenseChat which will never be true in this case

  • We are getting undefined text in alternateText because we are not setting any alternateText in optimistic data we should set some message like Report or MoneyReport as alternateText if the report type is iou
Screenshot 2023-05-15 at 12 14 07 PM Screenshot 2023-05-15 at 12 14 39 PM

Solution 1

  • On OptionsListUtils.js we have the function createOption() here we can add one more parameter to result which is isIOUType

  • Also we need to set alternateText if report type of iou in order to avoid an undefined value of the text, we need to decide message like Report or money report

  • Then on OptionRow.js we can include this.props.option.isIOUType on shouldUseFullTitle props which is used inside <DisplayNames>

//OptionsListUtils.js

createOption(){

const result = {
+  isIOUType: false,
}

if (report) {
+  result.isIOUType = ReportUtils.isIOUReport(report);

        if (result.isChatRoom || result.isPolicyExpenseChat) {
            result.alternateText = showChatPreviewLine && !forcePolicyNamePreview && lastMessageText ? lastMessageText : subtitle;
+        } else if (result.isIOUType) {
+           result.alternateText = Localize.translate(preferredLocale, 'footer.expenseReports'); // might be needed new message
+        } else {
            result.alternateText = showChatPreviewLine && lastMessageText ? lastMessageText : LocalePhoneNumber.formatPhoneNumber(personalDetail.login);
        }
    }
}


//OptionRow.js

      <DisplayNames
-          shouldUseFullTitle={this.props.option.isChatRoom || this.props.option.isPolicyExpenseChat}
+          shouldUseFullTitle={this.props.option.isChatRoom || this.props.option.isPolicyExpenseChat || this.props.option.isIOUType}
       />

Result

Screenshot 2023-05-15 at 12 37 00 PM

Solution 2

  • We can omit the search data report type of iou

@dhairyasenjaliya
Copy link
Contributor

@mountiny

Correction on Solution 1

  • In recent PR Display iou or expense in LHN #18537 we already added a function to check for isIOUReport or isExpenseReport which we have added in isMoneyRequestReport parameter we can simply use this.props.option.isMoneyRequestReport to display name

  • But we still need to add alternateText inside isMoneyRequestReport parameter

@mountiny
Copy link
Contributor

@dhairyasenjaliya Ok I think for now we can go with showing the report name same as in LHN of rmoney requests (expense + iou reports) and add the Expense report or something else instead of the alternate text as I am not sure if we return that from backend

Do you want to create a PR fro this?

@mountiny mountiny removed the Needs Reproduction Reproducible steps needed label May 15, 2023
@dhairyasenjaliya
Copy link
Contributor

Yeah i think we are generating altertText from utlis helper so we can add text over there
Sure will create PR within few hours @mountiny

@mountiny
Copy link
Contributor

Thank you @dhairyasenjaliya Lets get this out fast 🔥 appreciate you stepping up

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label May 15, 2023
@melvin-bot melvin-bot bot changed the title DEV: Search items show weird undefined texts [$1000] DEV: Search items show weird undefined texts May 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

Current assignees @JmillsExpensify and @trjExpensify are eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

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

@dhairyasenjaliya
Copy link
Contributor

@mountiny @s77rt PR ready for initial review
do you think alternateText as Expense reports makes sense or we just named to other

Screenshot 2023-05-15 at 4 34 44 PM

@mountiny
Copy link
Contributor

Discussing this with @trjExpensify

@trjExpensify
Copy link
Contributor

Good to go here, related discussion was in the PR and here in slack.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 16, 2023
@melvin-bot melvin-bot bot changed the title [$1000] DEV: Search items show weird undefined texts [HOLD for payment 2023-05-23] [$1000] DEV: Search items show weird undefined texts May 16, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

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

@melvin-bot

This comment was marked as duplicate.

@melvin-bot

This comment was marked as duplicate.

@s77rt
Copy link
Contributor

s77rt commented May 17, 2023

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 18, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-05-23] [$1000] DEV: Search items show weird undefined texts [HOLD for payment 2023-05-25] [HOLD for payment 2023-05-23] [$1000] DEV: Search items show weird undefined texts May 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.15-12 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-05-25. 🎊

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

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 May 18, 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:

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

@s77rt
Copy link
Contributor

s77rt commented May 18, 2023

@MelvinBot Checklist provided already #18860 (comment)

@Julesssss Julesssss changed the title [HOLD for payment 2023-05-25] [HOLD for payment 2023-05-23] [$1000] DEV: Search items show weird undefined texts [HOLD for payment 2023-05-23] [$1000] DEV: Search items show weird undefined texts May 19, 2023
@Julesssss
Copy link
Contributor

Melvin's trying to double up the payment, bad bot!

@JmillsExpensify
Copy link

@trjExpensify Can you take payment on this one? I'm headed out of office the rest of this week.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 23, 2023
@trjExpensify
Copy link
Contributor

Yup, back and looking at it now.

@trjExpensify
Copy link
Contributor

Okay, so payments due:

@aimane-chnaif - $250 for the bug report
@dhairyasenjaliya - $1,500 for the fix & #urgency bonus
@s77rt - $1,500 for C+ & #urgency bonus

Offers have been sent, let me know when you accept and I'll settle up. 👍

@dhairyasenjaliya
Copy link
Contributor

Accepted thnx @trjExpensify

@s77rt
Copy link
Contributor

s77rt commented May 25, 2023

Accepted!

@trjExpensify
Copy link
Contributor

Settled up with all three of you, closing. Thanks everyone!

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 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants