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

Fixed #13409 Search in component detail view not working #13471

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented Aug 15, 2023

Description

When selecting a component, if it was checked out to multiple assets, the search bar doesn't actually filter anything.
image

This PR adds the SQL filter needed so now it can search trough asset model, asset tag and asset name.

image

image

image

Fixes #13409

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 8.1
  • MySQL version: 8.0.31
  • Webserver version: PHP dev server
  • OS version: Debian 11

Checklist:

@what-the-diff
Copy link

what-the-diff bot commented Aug 15, 2023

PR Summary

  • Inclusion of Additional Library
    The team has integrated an additional library to help manage and manipulate data more effectively.

  • Improvement on Asset Retrieval
    An enhancement has been made to the way we find and organize assets. If you type something in the search bar, the system will now search through all assets by their name, model name, or asset tag to find the best match. This should lead to more efficient and streamlined searching experiences.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

I think it would be better to include the lines above the added lines in an else.

Right now we're querying the database (line 211/212) and then if search is filled we run another query and overwrite $total and $assets. Wrapping the section above in an else after the if that is added in this PR will cut down on the query count.

@inietov
Copy link
Collaborator Author

inietov commented Aug 16, 2023

@marcusmoore Thanks for your review, I hope I understand your point... let me know if that's not the case :P

@inietov inietov requested a review from marcusmoore August 16, 2023 03:13
Copy link
Collaborator

@marcusmoore marcusmoore 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 👍🏾

@snipe snipe merged commit 34f2221 into snipe:develop Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants