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

Filter: GT/LT Custom Date Field #12073

Closed
bradley-rose opened this issue Mar 27, 2023 · 1 comment
Closed

Filter: GT/LT Custom Date Field #12073

bradley-rose opened this issue Mar 27, 2023 · 1 comment
Labels
type: feature Introduction of new functionality to the application

Comments

@bradley-rose
Copy link

NetBox version

v3.4.6

Feature type

Data model extension

Proposed functionality

I've introduced a few custom fields to DCIM > Device Types to track EOL Sale, EOL SW Support, and EOL HW Support dates. These are all of the type "date".

To further sell Netbox to management, one of the things they'd like to do it easily filter all device types for devices that will be EOL by a certain date. For example, to better budget for replacement equipment, refresh projects, etc., it would be great for them to navigate to DCIM > Device Types, and filter for devices that will have an EOL SW Support date before a certain deadline.

Currently, this is doable via the API, but this isn't currently an option from what I can tell in the web interface.

Here's an example query that I am able to make in the web interface:

https://<Netbox URI>/dcim/device-types/?cf_EOL_SW_Maintenance__lt=<YYYY-MM-DD>

This does properly show the filtered device types in the web interface, but there's no simple way to generate this query from the filtering options provided in the web interface.

Use case

This simplifies any custom date field for any purpose whatsoever. In my case, management can log into the web interface and create a budget estimate for replacing end-of-life equipment with a point-and-click filter. They're not going to want to write their own URI-based query or make an API call.

Database changes

No response

External dependencies

No response

@bradley-rose bradley-rose added the type: feature Introduction of new functionality to the application label Mar 27, 2023
@jeremystretch
Copy link
Member

The REST API and the UI use the same underlying filtersets, so what's possible via one interface is possible via the other. However, you may need to craft the URL manually as modifiers (such as less than/greater than) are not available within the filter form. #7604 has already been opened to implement this functionality, so I'm going to close this as it should be covered by that FR.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants