Issue with Select2 and Tags with Spaces #2487

Closed
opened 2025-12-29 18:19:16 +01:00 by adam · 0 comments
Owner

Originally created by @bdlamprecht on GitHub (Mar 28, 2019).

Environment

  • Python version: 3.6.7
  • NetBox version: 2.5.8

Steps to Reproduce

  1. Edit a device (or any other applicable object) and add an already existing tag:
    image
  2. Select a tag to attach to device (or other object):
    image
  3. Click Update

Expected Behavior

The existing tag to be attached according to what was displayed in the WebUI

Observed Behavior

New individual tags were created for each separate word in the existing tag name:
image

The only way to work around this is to manually type the name of the tag surrounded by double-quotes:
image

I know this is documented in the section on Tags, but it doesn't exactly follow the behavior there as the WebUI is showing it will attach an existing tag (which already has spaces in the name).

This became an became an issue (I believe) when #2753 was implemented.
I'm hopeful this shouldn't be too difficult to fix, but I could be wrong (?),

Originally created by @bdlamprecht on GitHub (Mar 28, 2019). ### Environment * Python version: 3.6.7 * NetBox version: 2.5.8 ### Steps to Reproduce 1. Edit a `device` (or any other applicable object) and add an already existing tag: ![image](https://user-images.githubusercontent.com/7783306/55117974-4693c180-50b2-11e9-83a2-85065ebea3f2.png) 2. Select a tag to attach to device (or other object): ![image](https://user-images.githubusercontent.com/7783306/55117914-06ccda00-50b2-11e9-8a1f-06b7b99ab58d.png) 3. Click `Update` ### Expected Behavior The existing tag to be attached according to what was displayed in the WebUI ### Observed Behavior New individual tags were created for each separate word in the existing tag name: ![image](https://user-images.githubusercontent.com/7783306/55118072-abe7b280-50b2-11e9-8c1f-9d234d9e9fb8.png) The only way to work around this is to manually type the name of the tag surrounded by double-quotes: ![image](https://user-images.githubusercontent.com/7783306/55118169-03861e00-50b3-11e9-83f4-4280f9c5abe5.png) I know this is [documented](https://netbox.readthedocs.io/en/stable/additional-features/tags/#tags) in the section on `Tags`, but it doesn't _exactly_ follow the behavior there as the WebUI is showing it will attach an **existing** tag (which _already_ has spaces in the name). This became an became an issue (I believe) when #2753 was implemented. I'm hopeful this shouldn't be too difficult to fix, but I could be wrong (?),
adam added the type: bugstatus: accepted labels 2025-12-29 18:19:16 +01:00
adam closed this issue 2025-12-29 18:19:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2487