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

add more contact fields to contact assignments table #12955

Closed
matejv opened this issue Jun 21, 2023 · 2 comments · Fixed by #13050
Closed

add more contact fields to contact assignments table #12955

matejv opened this issue Jun 21, 2023 · 2 comments · Fixed by #13050
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@matejv
Copy link
Contributor

matejv commented Jun 21, 2023

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

@matejv matejv added the type: feature Introduction of new functionality to the application label Jun 21, 2023
@abhi1693
Copy link
Member

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?

@matejv
Copy link
Contributor Author

matejv commented Jun 21, 2023

I've updated the original post with more information.

@abhi1693 abhi1693 added the status: accepted This issue has been accepted for implementation label Jun 26, 2023
@abhi1693 abhi1693 self-assigned this Jun 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants