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

[PAID] [Search v2.1] - Sorting on Drafts and Finished does not work at all #46720

Closed
2 of 6 tasks
lanitochka17 opened this issue Aug 2, 2024 · 29 comments
Closed
2 of 6 tasks
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

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 2, 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: 9.0.16-0
Reproducible in staging?: Y
Reproducible in production?: Unable to check
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): applausetester+khcategory15@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • Account has lots of expenses in Drafts and Finished section (Search)
  1. Go to staging.new.expensify.com
  2. Go to Search
  3. Go to Drafts
  4. Apply Date, Merchant and Amount sorting
  5. Repeat Step 3 and 4 with Finished section

Expected Result:

The expenses will be sorted accordingly

Actual Result:

The sorting on Drafts and Finished does not work at all

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

Add any screenshot/video evidence

Bug6559944_1722577006437.20240802_133409.mp4
Bug6559944_1722594720567.bandicam_2024-08-02_18-30-56-057.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

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

Copy link
Contributor

github-actions bot commented Aug 2, 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.

@dangrous
Copy link
Contributor

dangrous commented Aug 2, 2024

Seems to happen on production build on local, so maybe backend or a previous regression that wasn't caught. Asking the folks working on search to have a look

@rayane-djouah
Copy link
Contributor

I believe this issue is related to a backend bug. @luacmartins recently worked on a backend change (#46481 (comment)) to address this bug, which could be causing the current problem. However, @luacmartins is currently out of the office. Can we find someone internally to handle this?

@dangrous
Copy link
Contributor

dangrous commented Aug 2, 2024

I'm continuing to look into it but haven't found a fix yet. @iwiznia it looks like you worked on some of the syntax - any ideas? I've confirmed that the asc/desc exists correctly as ORDER BY in the query that's run here (e.g. ORDER BY toUser asc LIMIT 51) but the data returned, at least by this point is no different, no matter the sort order that was sent. So, need to figure out why that's not changing anything...

The search already gets wacky results on prod, so although clicking the columns does CHANGE the sort, it's still wrong, so I'm not sure this is enough of an issue to block deploy... but open to other opinions

@dangrous
Copy link
Contributor

dangrous commented Aug 2, 2024

Running SQL queries directly via command line DOES result in differently ordered results... so the issue has to be in Search::buildTransactionResponse()

@dangrous dangrous added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Aug 2, 2024
@dangrous
Copy link
Contributor

dangrous commented Aug 2, 2024

Removing blocker label since prod is already weird, and this is no worse.

@luacmartins
Copy link
Contributor

The only filter that supports sorting is Expenses. The issue here is that we're allowing the column header to be clicked ofr the other filters. We should disable that.

@melvin-bot melvin-bot bot added the Overdue label Aug 5, 2024
@Kicu
Copy link
Contributor

Kicu commented Aug 5, 2024

@luacmartins I can fix this, since I broke this, by removing the mechanism of disabling sorting for other filters than Expense.
Sorry about that, when I was migrating us to new search syntax using AST I assumed that "everything works with everything" and sorting is no longer an issue.

Expect a PR with fix soon.

@luacmartins
Copy link
Contributor

No worries! Thank you for working on this.

@Kicu
Copy link
Contributor

Kicu commented Aug 5, 2024

@luacmartins actually I need to confirm one thing. In the past it was not that we only allowed Expenses as type, but that we only allowed ALL status to be sorted.

Is that still true? Because what we call on the LHN Expenses is in reality type:expense status:all. So is this the only thing that is sortable now?

@luacmartins
Copy link
Contributor

Correct! Type expenses and status all is the only sortable one for now

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Aug 5, 2024
@Kicu
Copy link
Contributor

Kicu commented Aug 7, 2024

I think in general sorting on backend is usually always required while sorting on frontend is a nice addition. Since we can't drop sorting on backend then maybe this is a good idea?

I'm assuming that technically we'd still have a call to sort() in App, but it would be something as simple as

(a, b) => a.sortIndex <= b.sortIndex

right?

It would definitely allow us to simplify parts of SearchUtils that do sorting for different columns, since each col has a slightly different logic.

@luacmartins
Copy link
Contributor

Yea, that makes sense to me. I don't think this is a priority now though given that the functionality works. I'll add this to the list of follow ups here

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 12, 2024
@melvin-bot melvin-bot bot changed the title [Search v2.1] - Sorting on Drafts and Finished does not work at all [HOLD for payment 2024-08-19] [Search v2.1] - Sorting on Drafts and Finished does not work at all Aug 12, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

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

Copy link

melvin-bot bot commented Aug 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.18-10 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-08-19. 🎊

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

  • @Kicu does not require payment (Contractor)
  • @ikevin127 requires payment (Needs manual offer from BZ)

@ikevin127
Copy link
Contributor

@luacmartins When you get a chance, mind adding the Bug label to assign a BZ team member for payment ? Appreciate it!

@luacmartins luacmartins added the Bug Something is broken. Auto assigns a BugZero manager. label Aug 13, 2024
Copy link

melvin-bot bot commented Aug 13, 2024

Triggered auto assignment to @sonialiap (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.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 13, 2024
@sonialiap
Copy link
Contributor

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Aug 16, 2024
@sonialiap sonialiap added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 16, 2024
Copy link

melvin-bot bot commented Aug 16, 2024

Triggered auto assignment to @strepanier03 (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.

@sonialiap
Copy link
Contributor

@strepanier03 I'm OOO Aug 19-30, adding leave buddy.
Status: if no regressions popup, please complete payment on the 19th. Payment summary

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Aug 18, 2024
@ikevin127

This comment was marked as resolved.

@strepanier03
Copy link
Contributor

Paid. closing.

@strepanier03 strepanier03 changed the title [HOLD for payment 2024-08-19] [Search v2.1] - Sorting on Drafts and Finished does not work at all [PAID] [Search v2.1] - Sorting on Drafts and Finished does not work at all Aug 19, 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 Engineering
Projects
None yet
Development

No branches or pull requests

9 participants