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

Custom Fields cannot filter by name for content_types #201

Closed
FragmentedPacket opened this issue Mar 26, 2021 · 1 comment · Fixed by #208
Closed

Custom Fields cannot filter by name for content_types #201

FragmentedPacket opened this issue Mar 26, 2021 · 1 comment · Fixed by #208
Assignees
Labels
type: bug Something isn't working as expected
Milestone

Comments

@FragmentedPacket
Copy link
Contributor

Environment

  • Python version: Python 3.8
  • Nautobot version: 1.0.0.b2

Steps to Reproduce

  1. Attempt to filter extras/custom-fields by content_types=dcim.device it fails with Observed Behavior below.
  2. Attempt to filter extras/statuses by content_types=dcim.device and it works

Expected Behavior

Filter custom fields for any that are tied to dcim.device

Also, should content-types providers an integer instead of UUID. Not sure if this is due to it being a Django construct primarily.

@jmcgill298 @jvanderaa

Observed Behavior

{
  "content_types": [
    "“dcim.device” is not a valid value."
  ]
}
@jathanism jathanism added the type: bug Something isn't working as expected label Mar 26, 2021
@jathanism jathanism changed the title Bug: Custom Fields cannot filter by name for content_types Custom Fields cannot filter by name for content_types Mar 26, 2021
@jathanism
Copy link
Contributor

Thanks @FragmentedPacket for the report.

We won't be able to solve for integer PKs for content types because they are built-in, but we can at least hide them. We just need to revise the custom fields relationship to use the same content-types related field subclass we added to support a cleaner UX for working with statuses.

@jathanism jathanism added this to the v1.0.0 milestone Mar 26, 2021
@lampwins lampwins self-assigned this Mar 29, 2021
lampwins added a commit to lampwins/nautobot that referenced this issue Mar 29, 2021
@lampwins lampwins linked a pull request Mar 29, 2021 that will close this issue
@glennmatthews glennmatthews added this to To do in Release v1.0.0 via automation Apr 1, 2021
@jedelman8 jedelman8 moved this from To do to In progress in Release v1.0.0 Apr 1, 2021
@jedelman8 jedelman8 moved this from In progress to To do in Release v1.0.0 Apr 1, 2021
@jedelman8 jedelman8 moved this from To do to In progress in Release v1.0.0 Apr 1, 2021
Release v1.0.0 automation moved this from In progress to Done Apr 5, 2021
glennmatthews added a commit that referenced this issue Apr 5, 2021
* fixes #135, #136, and #201 - custom fields choices refactor

* pr feedback

* pr feedback

* refactor migrations (again) and rename custom_field_data to _custom_field_data to make it private

* pr feedback and added webhooks queue

* updated docs

* Update nautobot/docs/additional-features/custom-fields.md

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants