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-08-29] [$250] [Search v2.1] Update search parser grammar to handle special characters #47095

Closed
luacmartins opened this issue Aug 8, 2024 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@luacmartins
Copy link
Contributor

luacmartins commented Aug 8, 2024

Problem

Coming from here, the search parser grammar doesn't handle some special characters very well, for example it throws an error when ; is added to a text input like keyword

Solution

Update the parser grammar to correctly handle special characters:

; should be treated like any other character
(whitespace) should be a logic AND operator when separating filter keys, e.g. amount:200 category:travel means amount=200 AND category=travel. It should also be a logical OR when separating free text, e.g. las vegas means keyword=las OR keyword=vegas
, is used as a logical OR operator when separating values for a filter key, e.g. category:travel,hotel,food means category=travel OR category=hotel OR category=food. It should also be treated as a regular character when used in free text, e.g. las, vegas means keyword="las," OR keyword="vegas"

cc @Kicu @adamgrzybowski @289Adam289 @Guccio163 @SzymczakJ

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cfdc085a6131060b
  • Upwork Job ID: 1821628463273416803
  • Last Price Increase: 2024-08-08
  • Automatic offers:
    • ikevin127 | Reviewer | 103492420
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @slafortune
@luacmartins luacmartins added Daily KSv2 NewFeature Something to build that is a new item. labels Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

Triggered auto assignment to @slafortune (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 8, 2024
@luacmartins luacmartins added Daily KSv2 and removed Weekly KSv2 labels Aug 8, 2024
@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Aug 8, 2024
@melvin-bot melvin-bot bot changed the title [Search v2.1] Update search parser grammar to handle special characters [$250] [Search v2.1] Update search parser grammar to handle special characters Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

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

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

melvin-bot bot commented Aug 8, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@289Adam289
Copy link
Contributor

Hi! I am from SWM and I'd like to work on this issue.

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

melvin-bot bot commented Aug 12, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Aug 12, 2024
@289Adam289
Copy link
Contributor

After investigation, I believe that implementing the following part of the proposed solution:

; should be treated like any other character

will resolve this issue.
The 'Page Not Found' appears to be caused by a SyntaxError in the SearchParser.

Copy link

melvin-bot bot commented Aug 12, 2024

📣 @MCarlesso! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@MCarlesso
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~012c16fe40faf63452

Copy link

melvin-bot bot commented Aug 12, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@luacmartins
Copy link
Contributor Author

Thanks for the proposal @MCarlesso However, we already have someone working on this issue.

@MCarlesso
Copy link

Sorry @luacmartins! I'm new here 🙂 From reading the contribution guidelines I thought that only complete proposals would be considered? 😅 I don't see an approved proposal for this one yet?

@luacmartins
Copy link
Contributor Author

No worries! You're correct that that's the regular process. This issue is part of the Search project though and we have an expert agency working with us on this implementation, so they are handling most of the Search issues.

@slafortune
Copy link
Contributor

This is being worked on, it will have a 7-day regression period, so I don't feel the need to add another BZ person to this.
I'll be out until 8/21 and will check in on this then.

@289Adam289
Copy link
Contributor

HI! @luacmartins How to handle cases where keywords are provided in multiple places in an input string. For example:
xxx yyy category:Cat merchant:Mer zzz
in #47328 it is is handled like that:
(xxx OR yyy OR zzz) AND (category:Cat) AND (merchant:Mer)
but I am not sure if this is correct approach.

@luacmartins
Copy link
Contributor Author

Yea, that's correct!

@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 22, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Search v2.1] Update search parser grammar to handle special characters [HOLD for payment 2024-08-29] [$250] [Search v2.1] Update search parser grammar to handle special characters Aug 22, 2024
Copy link

melvin-bot bot commented Aug 22, 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 Aug 22, 2024
Copy link

melvin-bot bot commented Aug 22, 2024

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

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

Copy link

melvin-bot bot commented Aug 22, 2024

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ikevin127] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@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 and removed Weekly KSv2 labels Aug 28, 2024
@slafortune
Copy link
Contributor

@ikevin127 can you please propose a regression test?

@ikevin127
Copy link
Contributor

@slafortune I've asked (ref1, ref2, ref3) whether regression tests are needed on Search v2.1 related issues and was told (ref1, ref2, ref3) that regression tests will be added later as part of the project wrap up.

@slafortune
Copy link
Contributor

@ikevin127 Role c+ - Paid $250 via Upworks
@289Adam289 Role Contributor - does not require payment (Contractor)

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 Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
Status: Done
Development

No branches or pull requests

5 participants