Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk contact-to-object assignments #12631

Closed
opericgithub opened this issue May 16, 2023 · 2 comments
Closed

Bulk contact-to-object assignments #12631

opericgithub opened this issue May 16, 2023 · 2 comments
Labels
status: duplicate This issue has already been raised type: feature Introduction of new functionality to the application

Comments

@opericgithub
Copy link

NetBox version

v3. 5.1

Feature type

New functionality

Proposed functionality

Currently there is no gui possibility to bulk-assign many contacts to many objects. The only way we have found is by directly modifying database with "insert into tenancy.contact (...) values (...)(...) etc " which may be very hazardous.

There should be an gui option to link the ID of the contact with the ID of the object, let's say a device.

Use case

We have thousands of devices representing physical IP phones, and also have thousands of contacts, each of them representing the phone number of the IP phone.

We would like to link all of the contacts to all of the devices, but there is no way to do that by bulk editing (importing) devices because there is no available contact field option.

If such field existed, it would be easy to link let's say a list of device id's with a list of contact id's.

As for now, we have to edit thousands of devices one-by-one and click "add a contact" button on every single one of them.

Database changes

No response

External dependencies

No response

@opericgithub opericgithub added the type: feature Introduction of new functionality to the application label May 16, 2023
@Dakson13
Copy link

I agree with this proposed feature.Here where i work at, we have over ten thousand tenants and we have to enter their contact information for each of them. In order to do that, we have to choose contact first and then contact role for each of them.So this feature whould help us a lot, because adding contacts to each tenant one by one isn't feasible.
As @opericgithub we have also poked around the netbox database. While poking around the database we found out that you can allocate CONTACT ASSIGNEMENTS using the following query:

insert into public.tenancy_contactassignment ( object_id, priority, contact_id, content_type_id, role_id )
values
('2','','6311','73','4'),
('3','','6312','73','4'),
('4','','6313','73','4')...

The relevant columns (first and third) in this query are object_id and contact_id, which we used to associate tenants with their contacts. This import works, so we can achieve the desired result with this, but we are afraid of compromising the integrity of the database. And we also think this is not a good way to assign contacts.
It seems to us that this is no different than any other bulk import we do via the GUI. We hope that this functionality will be implemented in one of the next versions of Netbox, because it would help us immensely.

@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label May 25, 2023
@jeremystretch
Copy link
Member

Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #11307 for further discussion.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2023
@jeremystretch jeremystretch added status: duplicate This issue has already been raised and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels May 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: duplicate This issue has already been raised type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants