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

Extending filtering of date custom field type #1498

Closed
3 of 12 tasks
jakubkrysl opened this issue Mar 15, 2022 · 4 comments · Fixed by #2126 or #2167
Closed
3 of 12 tasks

Extending filtering of date custom field type #1498

jakubkrysl opened this issue Mar 15, 2022 · 4 comments · Fixed by #2126 or #2167
Assignees
Labels
type: feature Introduction of new or enhanced functionality to the application
Milestone

Comments

@jakubkrysl
Copy link

jakubkrysl commented Mar 15, 2022

As ...

Dan - Data Owner

I want ...

to filter data by before/after custom field of type date

So that ...

I can find all devices whose warranty will expire after certain date. Warranty is only one of 5 dates we have as custom field.

I know this is done when...

  • Using loose filtering condition allows for these extensive filters and does not behave same way as exact
    • loose and exact filtering of custom fields is an old concept that we will be moving away from.
  • I am able to filter custom fields by before/after some date via API
  • I am able to filter custom fields by before/after some date via changing parameter in URL
  • (further discussion needed) I am able to filter custom fields by before/after some date via GUI

Date/time custom fields should use the same lookup expression filters as concrete fields.

Optional - Feature groups this request pertains to.

  • Automation
  • Circuits
  • DCIM
  • IPAM
  • Misc (including Data Sources)
  • Organization
  • Plugins (and other Extensibility)
  • Security (Secrets, etc)
  • Image Management
  • UI/UX
  • Documentation
  • Other (not directly a platform feature)

Database Changes

None most probably

External Dependencies

No response

@jakubkrysl jakubkrysl added the type: feature Introduction of new or enhanced functionality to the application label Mar 15, 2022
@glennmatthews
Copy link
Contributor

Thanks for the request! In general it seems like it should be desirable and possible to extend the custom-field filtering support so that any given custom field supports the appropriate filtering operators that a non-custom field of the same type would have, so a "date" custom field would support cf_<name>__gt, cf_<name>__gte, etc. It looks like it might be possible to take some inspiration from similar work that was done under netbox-community/netbox#7678.

@glennmatthews
Copy link
Contributor

Possible duplicate of #1288.

@lampwins lampwins added this to the v1.4.0 milestone Apr 8, 2022
@jathanism
Copy link
Contributor

IMO the range filter should be implemented on Date filter types across the board!

@bryanculver
Copy link
Member

Closed with #2126

@bryanculver bryanculver linked a pull request Aug 10, 2022 that will close this issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new or enhanced functionality to the application
Projects
No open projects
Archived in project
7 participants