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-06-20] [Search v1] Opening transactions on search page can lead to not found page #41578

Closed
6 tasks
luacmartins opened this issue May 3, 2024 · 43 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 Internal Requires API changes or must be handled by Expensify staff

Comments

@luacmartins
Copy link
Contributor

luacmartins commented May 3, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number:
Reproducible in staging?:
Reproducible in production?:
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:
Slack conversation:

Action Performed:

  1. Open the search page, Profile > Troubleshoot > New Search Page
  2. Click on a transaction
  3. Verify that you see a not found page

Note: this seems to only happen for older transactions that don't have a transaction thread created since the value for transactionThreadReportID is 0.

Expected Result:

We should create the transaction thread and let users open the transaction

Actual Result:

Not found page is shown

Workaround:

N/A

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

https://github.com/Expensify/App/assets/22219519/ed64830c-ca4d-4ba7-b95e-c066fe5d6084
Screenshot 2024-05-03 at 8 25 40 AM

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b78bbfebf5ef557c
  • Upwork Job ID: 1786400627125800960
  • Last Price Increase: 2024-05-03
Issue OwnerCurrent Issue Owner: @jliexpensify
@luacmartins luacmartins added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 3, 2024
@luacmartins luacmartins self-assigned this May 3, 2024
@luacmartins luacmartins added the Internal Requires API changes or must be handled by Expensify staff label May 3, 2024
Copy link

melvin-bot bot commented May 3, 2024

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented May 3, 2024

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

Copy link

melvin-bot bot commented May 3, 2024

Triggered auto assignment to Contributor Plus for review of internal employee PR - @Santhosh-Sellavel (Internal)

@luacmartins luacmartins changed the title Opening transactions on search page can lead to not found page [Search v1] Opening transactions on search page can lead to not found page May 3, 2024
@luacmartins luacmartins moved this to Release 2: Summer 2024 (Aug) in [#whatsnext] #wave-collect May 3, 2024
@luacmartins luacmartins moved this from Release 2: Summer 2024 (Aug) to HOT PICKS in [#whatsnext] #wave-collect May 3, 2024
@grgia
Copy link
Contributor

grgia commented May 4, 2024

What we chatted about before:
Create a command - OpenTransactionThread (maybe OpenSearchItemPreview if we later need to add support for previewing reports? )
That calls auth.transaction.createTransactionThread if it doesn't already exist

openReport(item.transactionThreadReportID);

Use the loading indicator on the page

@melvin-bot melvin-bot bot added the Overdue label May 6, 2024
@jliexpensify
Copy link
Contributor

Not overdue. Should we switch to Weekly to stop the pings?

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

@luacmartins, @jliexpensify, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@luacmartins
Copy link
Contributor Author

I think we might need a new command as @grgia described above, since calling openReport wouldn't be enough because we might not have a lot of the data needed, e.g. reportActions, parentReportActions, participant list, etc

@luacmartins
Copy link
Contributor Author

@jliexpensify I think we should leave this as daily, since it's high priority

@luacmartins luacmartins added the Hot Pick Ready for an engineer to pick up and run with label May 7, 2024
@Kicu
Copy link
Contributor

Kicu commented May 9, 2024

@luacmartins @grgia I did some testing and in my experience the problem is almost exclusively that a lot of items simply have reportID set to 0 and so we try to open route with 0 inside and that gets us the "Not Found" page - which is correct behavior.

A lot of other items that looked legit opened correctly:

rec-web-openreport.mp4

Sorry if I'm misunderstanding something - can't this be fixed in api by simply always returning some existing reportID?

@luacmartins
Copy link
Contributor Author

You understood it right. This happens because in the past we didn't create these threads for all reports, so they might not exist and we end up returning 0. The solution is to create a new command that will create the thread if it doesn't exist.

@melvin-bot melvin-bot bot added the Overdue label May 13, 2024
@luacmartins
Copy link
Contributor Author

luacmartins commented May 15, 2024

Still looking for volunteers. @grgia are you interested in working on this one?

@melvin-bot melvin-bot bot removed the Overdue label May 15, 2024
@lakchote
Copy link
Contributor

You understood it right. This happens because in the past we didn't create these threads for all reports, so they might not exist and we end up returning 0. The solution is to create a new command that will create the thread if it doesn't exist.

It should be fixed by https://github.com/Expensify/Auth/pull/10456. We should create threads automatically from now on, even for old preexisting transactions.

@trjExpensify
Copy link
Contributor

Nice, @lakchote! That's on prod, so we can retest then, yeah? If so, @grgia @Kicu did you have some transactions in your account that definitely weren't working before to validate @lakchote's theory?

@Kicu
Copy link
Contributor

Kicu commented May 15, 2024

@trjExpensify @lakchote

For me on dev every row that "looks" normally is correctly opening a report/IOU in RHP.
However every row with __fake__ field has no transactionID and opens error page. I have no idea what these rows are and where do they come from.

Seems there is an issue for this: #41985

// edit
btw Im using staging api if that changes anything

Screenshot 2024-05-15 at 13 26 52

sample object with fake

{
  accountID: 0,
  action: "view",
  amount: 55500,
  canDelete: false,
  category: "",
  comment: {
    comment: "",
  },
  created: "2024-04-29 10:13:59",
  currency: "PLN",
  hasEReceipt: false,
  managerID: 0,
  merchant: "(none)",
  modifiedAmount: 0,
  modifiedCreated: "",
  modifiedCurrency: "",
  modifiedMerchant: "",
  parentTransactionID: "",
  policyID: "",
  reportID: "-2",
  reportType: "",
  tag: "",
  transactionID: "5321901916525874903",
  transactionThreadReportID: "0",
  type: "cash",
  from: {
    accountID: 0,
    avatar:
      "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_1.png",
    displayName: "__fake__",
    firstName: "",
    lastName: "",
    login: "__fake__",
    payPalMeAddress: "",
    phoneNumber: "",
    pronouns: "",
    timezone: {
      automatic: true,
      selected: "America/Los_Angeles",
    },
    validated: false,
  },
  to: {
    accountID: 0,
    avatar:
      "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_1.png",
    displayName: "__fake__",
    firstName: "",
    lastName: "",
    login: "__fake__",
    payPalMeAddress: "",
    phoneNumber: "",
    pronouns: "",
    timezone: {
      automatic: true,
      selected: "America/Los_Angeles",
    },
    validated: false,
  },
  shouldShowMerchant: true,
  shouldShowCategory: false,
  shouldShowTag: false,
  shouldShowTax: false,
  keyForList: "5321901916525874903",
}

Copy link

melvin-bot bot commented Jun 4, 2024

@luacmartins, @jliexpensify, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Jun 4, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 11, 2024
@melvin-bot melvin-bot bot changed the title [Search v1] Opening transactions on search page can lead to not found page [HOLD for payment 2024-06-18] [Search v1] Opening transactions on search page can lead to not found page Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 11, 2024
Copy link

melvin-bot bot commented Jun 11, 2024

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

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

Copy link

melvin-bot bot commented Jun 11, 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:

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

@jliexpensify
Copy link
Contributor

jliexpensify commented Jun 12, 2024

Payment Summary

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 13, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-18] [Search v1] Opening transactions on search page can lead to not found page [HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [Search v1] Opening transactions on search page can lead to not found page Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-06-20. 🎊

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

Copy link

melvin-bot bot commented Jun 13, 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:

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

@jliexpensify
Copy link
Contributor

Is a checklist needed here @Santhosh-Sellavel ?

@jliexpensify jliexpensify changed the title [HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [Search v1] Opening transactions on search page can lead to not found page [HOLD for payment 2024-06-20] [Search v1] Opening transactions on search page can lead to not found page Jun 18, 2024
@luacmartins
Copy link
Contributor Author

No checklist needed. This is a new feature and we'll add tests as part of the project wrap up

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 18, 2024
@jliexpensify
Copy link
Contributor

Awesome, ty!

Here's the ND payment summary for JMills

Copy link

melvin-bot bot commented Jun 20, 2024

Payment Summary

Upwork Job

BugZero Checklist (@jliexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1786400627125800960/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@github-project-automation github-project-automation bot moved this from Release 1.5: XeroCon 2024 (June 12th) to Done in [#whatsnext] #wave-collect Jun 20, 2024
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 Internal Requires API changes or must be handled by Expensify staff
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants