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

Allow searching for ASNs with the prefix "AS". #14201

Closed
991jo opened this issue Nov 7, 2023 · 6 comments · Fixed by #17532
Closed

Allow searching for ASNs with the prefix "AS". #14201

991jo opened this issue Nov 7, 2023 · 6 comments · Fixed by #17532
Assignees
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@991jo
Copy link
Contributor

991jo commented Nov 7, 2023

NetBox version

v3.6.4

Feature type

Change to existing functionality

Proposed functionality

The current global and the ASN quick search should return results independent of whether a user searches for "AS64496" or "64496".
Currently only the later returns results.

Use case

This should reduce errors and increase the search hit rate for ASNs.
Many other systems return ASNs as "AS64496" and the user simply copies that and finds no results in NetBox.
NetBox itself even formats the ASN Objects in the global search as "AS64496" instead of "64496".

Database changes

No response

External dependencies

No response

@991jo 991jo added the type: feature Introduction of new functionality to the application label Nov 7, 2023
@abhi1693
Copy link
Member

abhi1693 commented Nov 9, 2023

I do not think this is possible to implement. The value in question is an interger field vs the object representation (suffixed with AS). The search cache adds the actual value rather than the string representation of the object, so a user must search for the value as 64496 only. You could however try to use the ends with type instead of partial match to workaround this issue.

@abhi1693 abhi1693 added the status: revisions needed This issue requires additional information to be actionable label Nov 9, 2023
@jeremystretch
Copy link
Member

We could enable this by extending SearchIndex to allow passing instance attributes in addition to fields, and adding a name property on ASN that returns e.g. "AS1234". Then, the string "AS1234" would be cached alongside the integer 1234.

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: revisions needed This issue requires additional information to be actionable labels Dec 7, 2023
Copy link
Contributor

github-actions bot commented Mar 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Mar 7, 2024
@jeremystretch
Copy link
Member

Marking this as blocked by #15413

@jeremystretch jeremystretch added status: blocked Another issue or external requirement is preventing implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Mar 12, 2024
@jeremystretch
Copy link
Member

#15413 has been completed for NetBox v4.0.

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: blocked Another issue or external requirement is preventing implementation labels Apr 2, 2024
@jeremystretch jeremystretch added the complexity: low Requires minimal effort to implement label May 22, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Aug 22, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants