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

Allow custom object fields to reference a user or group #10600

Closed
joaolucasmacedo opened this issue Oct 7, 2022 · 10 comments · Fixed by #12206
Closed

Allow custom object fields to reference a user or group #10600

joaolucasmacedo opened this issue Oct 7, 2022 · 10 comments · Fixed by #12206
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@joaolucasmacedo
Copy link

NetBox version

v3.3.5

Feature type

Data model extension

Proposed functionality

Being able to create object type custom fields with Netbox users.

Use case

Being able to point a specific user which is responsible for a given object, like a device or VM.

Database changes

No response

External dependencies

No response

@joaolucasmacedo joaolucasmacedo added the type: feature Introduction of new functionality to the application label Oct 7, 2022
@bistraque
Copy link

That's why Contacts are for: give a specific role to a specific contact for a given object, and for free you get a many-to-many relationship. In case an object does not have a Contacts field, a custom field of that type will do. It also allows for Contacts to exist while not being Users with credentials on Netbox itself (covers different tenancy models).

Arguably, we may question the use case where a Contact is optionally associated with a Netbox User at creation time (e.g. autofill name and associated info). This could be helpful as a "garbage collection" strategy to detect obsolete contact info (via scripting for example if user no longer valid in ldap).

@jeremystretch jeremystretch changed the title User object Custom field Allow custom object fields to reference a user or group Oct 18, 2022
@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Oct 18, 2022
@jeremystretch
Copy link
Member

I think it's reasonable to allow referencing a NetBox user (or group) as well; we do this today with rack reservations.

@github-actions
Copy link
Contributor

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 github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Dec 18, 2022
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Dec 22, 2022
@github-actions
Copy link
Contributor

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 github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Mar 23, 2023
@abhi1693
Copy link
Member

Can I take a shot at this?

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation pending closure Requires immediate attention to avoid being closed for inactivity labels Apr 5, 2023
@jeremystretch
Copy link
Member

Assigned to you @abhi1693, thanks!

@abhi1693
Copy link
Member

abhi1693 commented Apr 7, 2023

For the assigned user/group, should the custom field be hidden from the UI that were not assigned on it?

@jeremystretch
Copy link
Member

@abhi1693, sorry, I'm not clear on what you're asking. Could you give me an example?

@abhi1693
Copy link
Member

abhi1693 commented Apr 7, 2023

Lets say I created a custom field and assigned to bob. Should the field only be visible to bob whether its view or edit on the UI? If so, should this also be tackled on the API side?

@jeremystretch
Copy link
Member

No, I don't think so. I believe the intent here is merely to be able to associate an arbitrary object with a particular user or group, like we do currently for rack reservations.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 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.

4 participants