question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Custom Field Name Changes

See original GitHub issue

Environment

  • Python version: 3.7
  • Nautobot version: v1.0.0b2

Steps to Reproduce

  1. Create a custom field in nautobot, e.g. color on the dcim.device model
  2. Update data for a device, e.g. set to red
  3. Updated name of custom field to colour
  4. View the data in in the UI (notice it is missing)
  5. Return custom field to color
  6. See data return

Expected Behavior

Either custom fields should not be editable or when edited, the data should migrate as well.

Observed Behavior

The data seems to “disappear” on the UI. When the custom field name is returned, the data “reappears”.

Screenshots

image

image

image

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
glennmatthewscommented, Mar 12, 2021

What about adding label. This way the name(label) presented to the End Users could change, but not change the internal field. Though, this could change its usability in scripts and jobs.

Custom fields actually do already have a label field, which can be freely changed. 😃

1reaction
jathanismcommented, Mar 12, 2021

Yeah I would definitely lean towards a custom field not being able to be renamed once it is created. That would go a long way to avoiding an issue like this entirely that results in apparent data loss. Other concrete model fields cannot be renamed, so I think this asserts that consistency and prevents us from having to come up with an over-engineered solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Renaming Fields / Relabeling Fields – Propertybase Salesforce
Custom Field, Managed Field, Salesforce Standard Field ... Update the Field Label (do not change Field Name; see "Attention" note below - in ......
Read more >
Changing custom field names - ACF Support
I need to change the name of theses custom fields into more suitable ones (e.g. venue_slider, supplier_budget, honeymoon_region, etc.). I have ...
Read more >
NetSuite Applications Suite - Renaming Custom Fields
When you change the name of a custom field, the name is not automatically updated on custom forms that contain the field. To...
Read more >
If I change the name of a custom field, will that
I want to change names of custom fields for them to be more clear and intuitive (e.g. from "cause" to "cause of downtime")....
Read more >
Bug: Renaming custom fields creates new fields | WordPress.org
Hi, when a custom field is renamed in Jetpack CRM, it seems to actually create a new field. The outcome is that any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found