#14329 Improve diffs for custom_fields #132

Closed
opened 2026-04-05 16:22:05 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @arthanson on 3/17/2026

Fixes: #14329

Needed to add a deep_compare_dict to process the diffs instead of the current shallow_compare_dict, as custom_fields is a nested dict inside the diff. Two places for change - one modifying the "Difference" panel and the other for the "Pre-Change Data" and "Post-Change Data"

I created 6 custom fields on a Tenant and modified one of them. On the original note all the custom fields are highlighted, even though only modified one of them:

Monosnap Tenancy | tenant Cyberdyne Systems updated by ahanson | NetBox 2026-03-17 09-04-29

On this version, only the custom field that actually got modified is highlighted:

Monosnap Tenancy | tenant Cyberdyne Systems updated by ahanson | NetBox 2026-03-17 09-01-09
*Originally created by @arthanson on 3/17/2026* ### Fixes: #14329 Needed to add a deep_compare_dict to process the diffs instead of the current shallow_compare_dict, as custom_fields is a nested dict inside the diff. Two places for change - one modifying the "Difference" panel and the other for the "Pre-Change Data" and "Post-Change Data" I created 6 custom fields on a Tenant and modified one of them. On the original note all the custom fields are highlighted, even though only modified one of them: <img width="1112" height="1101" alt="Monosnap Tenancy | tenant Cyberdyne Systems updated by ahanson | NetBox 2026-03-17 09-04-29" src="https://github.com/user-attachments/assets/cc4dc6e9-bff0-4376-b409-db0302b55511" /> On this version, only the custom field that actually got modified is highlighted: <img width="1109" height="911" alt="Monosnap Tenancy | tenant Cyberdyne Systems updated by ahanson | NetBox 2026-03-17 09-01-09" src="https://github.com/user-attachments/assets/f17cd460-61d3-43f2-a7aa-be58e6f6e59c" />
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#132