Show child locations when creating devices and searching for parent location #9113

Closed
opened 2025-12-29 20:45:35 +01:00 by adam · 6 comments
Owner

Originally created by @blackphantom39 on GitHub (Jan 19, 2024).

NetBox version

v3.7.1

Feature type

Change to existing functionality

Proposed functionality

Say we have locations categorized as buildings (parent locations) and rooms (child locations). Building names are unique and room names aren't. So take the following locations as an example.

Building A
 - 00.01
 - 00.02
 - ...
 
 Building B
 - 00.01
 - 00.02
 - ...

Several problems arise from this when creating devices and assigning a location to a device. Just opening up the location dropdown shows the above-mentioned location structure.

Screenshot 2024-01-18 at 18 08 24

Selecting form this representation works fine. However, when using the search within the dropdown it is not clear which location is actually being used when i.e. searching for a room.

Screenshot 2024-01-18 at 18 08 47

And only the building is shown, when searching for a building.

Screenshot 2024-01-18 at 18 09 00

This makes it hard to assign locations correctly with an increasing amount of locations, as scrolling to the correct location could be cumbersome. So it would be nice if either searching for a parent location would also show it's child locations or searching for a child location would show its parent. Maybe display it as 00.01 (Building A) or something like that?

Of course one could add the building name to the room name, but that would result in unnecessary redundancy in my opinion and kinda defeats the purpose of having parent and child locations.

Other problems

Maybe not related to this specifically, but this also leads to problems, when using a CSV import, as one cannot specify the full location path (i.e. parent/child) when creating the CSV (at least not that I'm aware of). This results in devices getting assigned to the first location that matches the name specified, which may not be the correct one.

Issues with similar changes to this one

There might me more related issues.

Use case

Would increase usability of the location system for organizations that follow a similar naming schema (i.e. universities or large corporations) and make use of the location nesting feature.

Database changes

Should not need any database changes, as the required information is already present in the location selection dropdown.

External dependencies

No response

Originally created by @blackphantom39 on GitHub (Jan 19, 2024). ### NetBox version v3.7.1 ### Feature type Change to existing functionality ### Proposed functionality Say we have locations categorized as buildings (parent locations) and rooms (child locations). Building names are unique and room names aren't. So take the following locations as an example. ``` Building A - 00.01 - 00.02 - ... Building B - 00.01 - 00.02 - ... ``` Several problems arise from this when creating devices and assigning a location to a device. Just opening up the location dropdown shows the above-mentioned location structure. ![Screenshot 2024-01-18 at 18 08 24](https://github.com/netbox-community/netbox/assets/48262415/ec118d2f-96c8-45e9-a369-69d4e852ffa0) Selecting form this representation works fine. However, when using the search within the dropdown it is not clear which location is actually being used when i.e. searching for a room. ![Screenshot 2024-01-18 at 18 08 47](https://github.com/netbox-community/netbox/assets/48262415/b57f97f0-b54f-440c-a7ad-a3f066797b7c) And only the building is shown, when searching for a building. ![Screenshot 2024-01-18 at 18 09 00](https://github.com/netbox-community/netbox/assets/48262415/65ab6788-dd4d-4707-bb60-95f2f001714b) This makes it hard to assign locations correctly with an increasing amount of locations, as scrolling to the correct location could be cumbersome. So it would be nice if either searching for a parent location would also show it's child locations or searching for a child location would show its parent. Maybe display it as `00.01 (Building A)` or something like that? Of course one could add the building name to the room name, but that would result in unnecessary redundancy in my opinion and kinda defeats the purpose of having parent and child locations. ## Other problems Maybe not related to this specifically, but this also leads to problems, when using a CSV import, as one cannot specify the full location path (i.e. parent/child) when creating the CSV (at least not that I'm aware of). This results in devices getting assigned to the first location that matches the name specified, which may not be the correct one. ## Possibly related issues: Issues with similar changes to this one - #14548 - #12751 - #12669 There might me more related issues. ### Use case Would increase usability of the location system for organizations that follow a similar naming schema (i.e. universities or large corporations) and make use of the location nesting feature. ### Database changes Should not need any database changes, as the required information is already present in the location selection dropdown. ### External dependencies _No response_
adam added the type: featurestatus: needs ownerpending closurecomplexity: low labels 2025-12-29 20:45:35 +01:00
adam closed this issue 2025-12-29 20:45:36 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Jan 19, 2024):

This issue and #14548 appear to generalize together into #13283. Please take a look at those other issues and, if you agree, close this issue so that we can track it and #14548 as use cases for #13283.

@jeffgdotorg commented on GitHub (Jan 19, 2024): This issue and #14548 appear to generalize together into #13283. Please take a look at those other issues and, if you agree, close this issue so that we can track it and #14548 as use cases for #13283.
Author
Owner

@DanSheps commented on GitHub (Jan 19, 2024):

This issue and #14548 appear to generalize together into #13283. Please take a look at those other issues and, if you agree, close this issue so that we can track it and #14548 as use cases for #13283..

IMO, this is really two FR's:

  1. Show parent information for children
  2. Show child locations when searching for a parent location

For #1, absolutely it is a use case for #13283

For #2, that requires modifying the search function on the filter set and would still need a FR.

Might be better to rework this one to search for child locations and then block it by #13283

@DanSheps commented on GitHub (Jan 19, 2024): > This issue and #14548 appear to generalize together into #13283. Please take a look at those other issues and, if you agree, close this issue so that we can track it and #14548 as use cases for #13283.. IMO, this is really two FR's: 1. Show parent information for children 2. Show child locations when searching for a parent location For #1, absolutely it is a use case for #13283 For #2, that requires modifying the search function on the filter set and would still need a FR. Might be better to rework this one to search for child locations and then block it by #13283
Author
Owner

@blackphantom39 commented on GitHub (Jan 22, 2024):

As for @jeffgdotorg's comment I would agree, that this issue qualifies as an use case for #13283. For splitting the functionality of searching for a parent location and showing its child locations into a second FR as @DanSheps pointed out, I'm not sure if it would also qualify as an additional use case for #13283.

I'm going to wait a bit before closing this issue, depending on if this issue should be reworked for Show child locations when searching for a parent location.

@blackphantom39 commented on GitHub (Jan 22, 2024): As for @jeffgdotorg's comment I would agree, that this issue qualifies as an use case for #13283. For splitting the functionality of searching for a parent location and showing its child locations into a second FR as @DanSheps pointed out, I'm not sure if it would also qualify as an additional use case for #13283. I'm going to wait a bit before closing this issue, depending on if this issue should be reworked for `Show child locations when searching for a parent location`.
Author
Owner

@jeremystretch commented on GitHub (Apr 18, 2024):

This can be accomplished now with the implementation of #13283 in the upcoming v4.0 release.

@jeremystretch commented on GitHub (Apr 18, 2024): This can be accomplished now with the implementation of #13283 in the upcoming v4.0 release.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 21, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Aug 21, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Sep 20, 2024):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Sep 20, 2024): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9113