[PR #18725] [MERGED] Closes #17944: Allow filtering of ObjectVar and MultiObjectVar script inputs #15427

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18725
Author: @atownson
Created: 2/24/2025
Status: Merged
Merged: 3/3/2025
Merged by: @jeremystretch

Base: mainHead: issue_17944


📝 Commits (2)

  • 761a4f7 Add the advanced object selector to the ObjectVar and MultiObjectVar script inputs
  • e86a1f9 Fix formatting issue

📊 Changes

3 files changed (+9 additions, -1 deletions)

View changed files

📝 docs/customization/custom-scripts.md (+1 -0)
📝 netbox/extras/scripts.py (+4 -1)
📝 netbox/templates/extras/script.html (+4 -0)

📄 Description

Closes: #17944

Added the advanced object selection widget to the ObjectVar and MultiObjectVar script inputs. To render the selector button set selector = True on the input. The modals block was added to the script template to pass the size='lg' parameter. Without it the modal was rendering thinner than normal.

I discovered an issue where the query_params defined for the input are not passed to the advanced object selector widget. I plan to open a separate bug issue for this.


🔄 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/18725 **Author:** [@atownson](https://github.com/atownson) **Created:** 2/24/2025 **Status:** ✅ Merged **Merged:** 3/3/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `issue_17944` --- ### 📝 Commits (2) - [`761a4f7`](https://github.com/netbox-community/netbox/commit/761a4f727f87646a7bd74f81f66782bcc576b5ff) Add the advanced object selector to the ObjectVar and MultiObjectVar script inputs - [`e86a1f9`](https://github.com/netbox-community/netbox/commit/e86a1f96fe047e83c61cee2d42b2d02cefa39e17) Fix formatting issue ### 📊 Changes **3 files changed** (+9 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/customization/custom-scripts.md` (+1 -0) 📝 `netbox/extras/scripts.py` (+4 -1) 📝 `netbox/templates/extras/script.html` (+4 -0) </details> ### 📄 Description ### Closes: #17944 Added the advanced object selection widget to the ObjectVar and MultiObjectVar script inputs. To render the selector button set `selector = True` on the input. The modals block was added to the script template to pass the `size='lg'` parameter. Without it the modal was rendering thinner than normal. I discovered an issue where the `query_params` defined for the input are not passed to the advanced object selector widget. I plan to open a separate bug issue for this. --- <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:52 +01:00
adam closed this issue 2025-12-30 00:21:52 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15427