Commit Graph

19 Commits

Author SHA1 Message Date
Jeremy Stretch cd87ab3159
Fixes #23010: Defer bulk changes to object data when adding/removing a custom field (#23011) 2026-08-26 10:51:59 -07:00
Brian Tiemann fde10cbf22 Merge branch 'feature' into 22896-merge-main-into-feature
Resolves all conflicts between main and feature for #22896. Notable
resolutions:

- dcim/signals.py, dcim/tests/test_signals.py: main's cache_presave_scope_fields
  / sync_cached_scope_fields addition is fully superseded by feature's
  PostgreSQL-trigger-based denormalization (confirmed via feature's own
  migration docstrings); dropped in favor of feature's existing approach.
  Both files now match feature's originals exactly.

- netbox/tables/columns.py: combined main's generic get_ordering_annotation()
  protocol with feature's nulls_first-aware order() override. These two
  mechanisms cannot both apply to the same column (django-tables2 negates an
  entire order_by tuple uniformly on direction toggle, so a fixed nulls_first
  placement and multi-column sort composition are mutually exclusive for one
  column) -- preserved nulls_first (existing, wired through forms/API/GraphQL)
  and removed main's two composition-only tests for CustomFieldColumn. See the
  comment on CustomFieldColumn.order() for full reasoning.

- extras/customfields.py, extras/graphql/mixins.py: combined main's
  request-cache optimization and has_key-scoped batch updates with feature's
  resolve_selection_value() (shared select-field label resolution between
  REST and GraphQL).

- extras/events.py, extras/event_rules.py: main's "Honor Script defaults when
  triggered by Event Rules" (#22852) fix was written against the old inline
  action-type dispatch, which feature had already replaced with a pluggable
  action-provider registry (#22770). Re-applied the same two-line fix
  (notifications/job_timeout) inside ScriptAction.enqueue() in event_rules.py
  instead.

- utilities/jinja2.py: fixed a config-attribute name mismatch the raw merge
  would have introduced (main's JINJA2_FILTERS vs feature's renamed
  JINJA_FILTERS) by updating the shared _jinja2_filters() helper.

- ipam/migrations/: renumbered main's 0094_ipaddress_host_index to 0096 and
  added a merge migration, since main and feature had each independently
  added a migration numbered 0094.

- dcim/tests/query_counts.json: regenerated via UPDATE_QUERY_COUNTS=1 against
  the merged codebase rather than hand-merging counts.

Verified: manage.py check clean, full migration graph applies cleanly from
scratch, ruff clean, and full test suites pass for dcim, ipam, netbox, extras,
circuits, vpn, wireless, tenancy, virtualization, core, users, and account
(fresh databases, no state carried over between runs).
2026-08-10 16:13:01 -04:00
bctiemann 0984be8c04
#20897: Pre-release QA (#22864) 2026-08-07 16:38:32 -07:00
Jeremy Stretch 80231a9706
Closes #22835: Improve performance when provisioning new custom fields (#22866) 2026-08-06 14:56:22 -05:00
Arthur Hanson 58b4209fe6
#22640 - Enforce ALLOWED_URL_SCHEMES for URLs in custom fields (#22732) 2026-07-23 10:33:53 -04:00
Arthur Hanson e1f0c18c74
Closes #20897: Expose selection custom field labels in the REST API (#22475) 2026-06-29 04:54:08 -05:00
Jeremy Stretch e5b9e5a279
Closes #19025: Add schema validation for JSON custom fields (#21746) 2026-03-31 12:41:49 -05:00
samk-acw 650898719e
Fixes #16782: Add object filtering for custom fields (#16994)
* Fixes #16782: Add object filtering for custom fields

* Add validation for related_object_filter

* Extend documentation & misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-29 15:45:48 -04:00
Jeremy Stretch f0aca5bac1 Remove notes referencing past releases 2024-04-17 08:41:51 -04:00
Jeremy Stretch a73ba00aa0
Closes #13299: Improve options for controlling custom field visibility (#14289)
* Add ui_visible and ui_editable fields

* Extend migration to map new visible/editable values

* Remove ui_visibility field

* Update docs
2023-11-20 13:06:34 -05:00
Jeremy Stretch 96ea0ac9c7
Closes #12988: Introduce custom field choice sets (#13195)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup
2023-07-19 10:26:24 -04:00
Jeremy Stretch 5517963b24
Closes #10729: Add date & time custom field type (#11857)
* Add datetime custom field type

* Update custom field tests
2023-02-28 13:33:40 -05:00
jeremystretch ef3ac25406 Remove old feature version notices 2023-02-19 20:09:51 -05:00
Arthur Hanson af8bb0c4b9
10348 add decimal custom field (#10422)
* 10348 add decimal custom field

* 10348 fix tests

* 10348 add documentation

* Rearrange custom fields to be ordered consistently

* Rename number_field to integer_field for clarity

* Clean up validation logic

* Apply suggested changes from PR

* Store decimal custom field values natively

* Fix filter test

* Update custom field model migrations to use new encoder

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-30 16:03:24 -04:00
jeremystretch 0750e27351 Finish customization docs 2022-08-11 16:14:06 -04:00
jeremystretch 5f15f550c9 Restore model documentation for all models under extras 2022-08-11 11:37:07 -04:00
jeremystretch 5da3cab4de Reorganize documentation 2022-08-04 14:11:52 -04:00
jeremystretch 38f34ddb28 Fixes #7392: Fix "help" links for custom fields, other models 2021-09-29 09:09:10 -04:00
jeremystretch 036a068b83 Update extras documentation 2021-06-24 08:37:06 -04:00