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

Backoffice, fix customer search when searching by first name #12015

Merged

Conversation

rioug
Copy link
Collaborator

@rioug rioug commented Jan 8, 2024

What? Why?

Discovered while looking at #11759. Customer search when creating a new order doesn't work with only first name.
Also remove the usage of Jquery.

What should we test?

  • Login as an admin
  • Visit "Orders" page, and click on "+ new order" button
  • Choose a distributor and an ordering cycle and click "Next"
  • Search a customer by first name :
    => Find a matching customer
Regression testing:

Follow the scenario above and search by :

  • last name
  • full name
  • email

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Also remove populating user_id as it's not on the page
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you.

@filipefurtad0 filipefurtad0 self-assigned this Jan 12, 2024
@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Jan 12, 2024
@filipefurtad0
Copy link
Contributor

Hey @rioug ,

Nice, thanks for spotting and fixing this.

Before this PR - searching by first name yielded no results
image

After this PR - searching by first name
image

After this PR - searching by last name
image

After this PR - searching by email
image

Which corresponds to the expected results.

Looking great!

@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Jan 12, 2024
@filipefurtad0 filipefurtad0 merged commit 2cd3545 into openfoodfoundation:master Jan 12, 2024
52 checks passed
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Jan 25, 2024

I did not spot this on my testing...
EDIT: I'm not sure I think this was introduced here - ping @rioug - but it seems that when searching by email, clicking the results does not fill in the form and triggers a console error. This is verified with and without BUU enabled:

image

Opening an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants