-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Custom field choice filtering matches multiple choices #1513
Comments
Please upgrade to the most recent release of NetBox (v2.1.4) to see if that resolves your issue. |
Sorry Jeremy, I am at 2.1.4. Something got in my mind that I was a little ways back. |
@vanderaaj Could you please extend the steps needed to recreate this? Be sure to outline the process of creating the custom field first. |
Do my best.
Then I found about 10 more service contracts
|
@vanderaaj You'll need to provide specific values for every field in the reproduction. You'll also need to provide the exact script that you ran; otherwise, we have no idea what was modified. |
@jeremystretch makes perfect sense to me about wanting the full data, is there a method to get those communicated that isn't all over a Github public page? With this being our contract information, probably best to not have those contract numbers showing up. I'm almost thinking that it may have been something with adding in additional contracts after adding data. Or else, just an input error on my part. I'm all for getting the data if it will help the community in the future. But if it is just to try to fix one individual user issue, I'm good with deleting and recreating the custom field. I've automated the process of getting each device into that field, so that isn't much work. |
@vanderaaj
All development activity is tracked publicly. You'll need to detail the steps needed to recreate the bug using sanitized or fabricated data. Starting up a separate instance of NetBox running a fresh installation is a good idea. |
All good on the public dev. I thought a previous comment wanted the real live data. One more attempt...
Custom Field Choices Set Set approximately 12 devices to the 3rd value, then I found more contracts. Followed the same process to get into the dcim custom field. Then added the following options Then I had a CSV file with device, contract and used the API to assign a contract to the device. |
Please provide the query you're using to search. |
Devices -> Devices, Scroll down the right hand search filter to Support Contract custom field drop down. Selecting NationalCoverage and then devices with Needs Coverage show up in the search. |
I think I know what's happening. The PK for the "NationalCoverage" option is 1, and the PK for the "Needs Coverage" option is 11. The query is filtering on
This matches both serialized values 1 and 11. We need to modify the filter to only match on exact values for select fields. |
Issue type
[ ] Feature request
[x] Bug report
[ ] Documentation
Environment
DCIM Custom Field Search - Returning Wrong Info
I setup a custom field to maintain our support contract information for each of the devices. I originally had 3 choices setup. I then got a bigger list of contracts and am now up to 13. When I search for devices in a field that I state has one coverage, devices with "Needs Coverage" show up. I click into the device and it has the custom field setup properly. When checking the API, it also reports the proper field back. However when I search for devices of each field type, they are showing up in the wrong place.
####Steps to Reproduce:
The text was updated successfully, but these errors were encountered: