Skip to content

Conversation

@pheus
Copy link
Contributor

@pheus pheus commented Jun 4, 2025

Fixes: #17183 - Add the ability to assign object types to a tag for CSV import

Adds support for assigning object types to Tags during CSV import, matching the functionality available in the web UI.

Proposed Functionality

  • Adds an object_types field to the Tag bulk import form.
  • Allows associating one or more object types with each Tag via CSV.

Use Case

Enables users to set object type associations via CSV, which is already possible through the GUI.

Example CSV

name,slug,color,object_types
Tag4,tag4,9e9e9e,"dcim.interface,virtualization.virtualmachine"

Introduces the `object_types` field in the Tag bulk import form, allowing
assignment of one or more object types to Tags.
@pheus
Copy link
Contributor Author

pheus commented Jun 4, 2025

Hi team,

Since I’m not yet assigned to this issue (and I understand that's a requirement), I’ve opened the PR as a draft for now. If this aligns with the project's direction, I’d be happy to mark the PR as ready once assigned.

Thanks!

Enhances tag-related tests to include `object_types` in setup data.
Updates CSV data to support object type assignments for improved test
coverage and functionality.
@pheus pheus marked this pull request as ready for review June 4, 2025 14:15
@jnovinger jnovinger requested review from a team and arthanson and removed request for a team June 4, 2025 16:18
@arthanson arthanson merged commit 9e0493c into netbox-community:main Jun 10, 2025
3 checks passed
@pheus pheus deleted the 17183-allow-tag-object-type-assignment-during-bulk-import branch June 10, 2025 16:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the ability to assign object types to a tag for CSV import

2 participants