[PR #18641] [MERGED] Fixes #18585: filtering circuits by location #15401

Closed
opened 2025-12-30 00:21:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18641
Author: @jnovinger
Created: 2/13/2025
Status: Merged
Merged: 2/18/2025
Merged by: @jeremystretch

Base: mainHead: 18585-filtering-circuits-by-location-not-working


📝 Commits (2)

  • 178eb31 Fixes #18585: filtering circuits by location
  • 6f7863d Adds test for new CircuitFilterset.location_id filter

📊 Changes

3 files changed (+33 additions, -3 deletions)

View changed files

📝 netbox/circuits/filtersets.py (+5 -0)
📝 netbox/circuits/forms/filtersets.py (+6 -1)
📝 netbox/circuits/tests/test_filtersets.py (+22 -2)

📄 Description

Fixes: #18585 - filtering circuits by location

This also fixes a related issue where selected filter is not shown in the filter form.

Changes:

  • Adds CircuitFilterSet.location_id field to enable filtering with incoming GET params
  • Adds CircuitFilterForm.location_id field to enable filtering from list form
  • Adds location_id to the Location fieldset on CircuitFilterForm

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/18641 **Author:** [@jnovinger](https://github.com/jnovinger) **Created:** 2/13/2025 **Status:** ✅ Merged **Merged:** 2/18/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `18585-filtering-circuits-by-location-not-working` --- ### 📝 Commits (2) - [`178eb31`](https://github.com/netbox-community/netbox/commit/178eb31ab8248cec832b972f99db57db8cb9f3eb) Fixes #18585: filtering circuits by location - [`6f7863d`](https://github.com/netbox-community/netbox/commit/6f7863db05d5e3e8f9ec75af3dc63d3e28f315ab) Adds test for new CircuitFilterset.location_id filter ### 📊 Changes **3 files changed** (+33 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/filtersets.py` (+5 -0) 📝 `netbox/circuits/forms/filtersets.py` (+6 -1) 📝 `netbox/circuits/tests/test_filtersets.py` (+22 -2) </details> ### 📄 Description ### Fixes: #18585 - filtering circuits by location This also fixes a related issue where selected filter is not shown in the filter form. Changes: - Adds `CircuitFilterSet.location_id` field to enable filtering with incoming GET params - Adds `CircuitFilterForm.location_id` field to enable filtering from list form - Adds `location_id` to the Location fieldset on `CircuitFilterForm` <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> <!-- Please include a summary of the proposed changes below. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:21:44 +01:00
adam closed this issue 2025-12-30 00:21:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15401