add more contact fields to contact assignments table #8221

Closed
opened 2025-12-29 20:33:58 +01:00 by adam · 2 comments
Owner

Originally created by @matejv on GitHub (Jun 21, 2023).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.5.4

Feature type

Change to existing functionality

Proposed functionality

Contact assignments table would include additional columns that correspond to contact fields:

  • Title
  • Phone
  • Email
  • Address
  • Link
  • Description

These fields would not be shown by default. Users could add them to the table via "Table Configuration" dialog.

Field definitions in NetboxTables can use accessor argument to refer to fields that span model relations. To for ContactAssignments table you could refer to contact fields. Something like this:

class ContactAssignmentTable(NetBoxTable):
...

    contact_phone = tables.Column(
        accessor=Accessor('contact__phone'),
        verbose_name='Phone'
    )
...
    class Meta(NetBoxTable.Meta):
        model = ContactAssignment
        fields = (... 'contact_phone', ...)

Use case

When looking up contacts for a site, the most often needed data is a persons phone number or email. Currently to access this information you need to click on each contact to see them. With this change one could see a list of phone numbers for all contacts assigned to a site and just start calling them down the list.

Database changes

No database changes required

External dependencies

None

Originally created by @matejv on GitHub (Jun 21, 2023). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.5.4 ### Feature type Change to existing functionality ### Proposed functionality Contact assignments table would include additional columns that correspond to contact fields: - Title - Phone - Email - Address - Link - Description These fields would not be shown by default. Users could add them to the table via "Table Configuration" dialog. Field definitions in `NetboxTables` can use accessor argument to refer to fields that span model relations. To for `ContactAssignments` table you could refer to contact fields. Something like this: ```py class ContactAssignmentTable(NetBoxTable): ... contact_phone = tables.Column( accessor=Accessor('contact__phone'), verbose_name='Phone' ) ... class Meta(NetBoxTable.Meta): model = ContactAssignment fields = (... 'contact_phone', ...) ``` ### Use case When looking up contacts for a site, the most often needed data is a persons phone number or email. Currently to access this information you need to click on each contact to see them. With this change one could see a list of phone numbers for all contacts assigned to a site and just start calling them down the list. ### Database changes No database changes required ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 20:33:58 +01:00
adam closed this issue 2025-12-29 20:33:58 +01:00
Author
Owner

@abhi1693 commented on GitHub (Jun 21, 2023):

I'm not sure how this will be achieved as the table that is linked is ContactAssignment and it does not have the fields you want. Could you expand your implementation a bit more on how this will be acheived?

@abhi1693 commented on GitHub (Jun 21, 2023): I'm not sure how this will be achieved as the table that is linked is ContactAssignment and it does not have the fields you want. Could you expand your implementation a bit more on how this will be acheived?
Author
Owner

@matejv commented on GitHub (Jun 21, 2023):

I've updated the original post with more information.

@matejv commented on GitHub (Jun 21, 2023): I've updated the original post with more information.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8221