[PR #19941] [CLOSED] OLD and broken: 18936 import cable color names #15765

Closed
opened 2025-12-30 00:23:55 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19941
Author: @Jathn
Created: 7/23/2025
Status: Closed

Base: mainHead: 18936-import-cable-color-names


📝 Commits (10+)

📊 Changes

2097 files changed (+702843 additions, -76439 deletions)

View changed files

.gitattributes (+5 -0)
.github/ISSUE_TEMPLATE/01-feature_request.yaml (+61 -0)
.github/ISSUE_TEMPLATE/02-bug_report.yaml (+73 -0)
.github/ISSUE_TEMPLATE/03-documentation_change.yaml (+40 -0)
.github/ISSUE_TEMPLATE/04-translation.yaml (+38 -0)
.github/ISSUE_TEMPLATE/05-housekeeping.yaml (+25 -0)
.github/ISSUE_TEMPLATE/06-deprecation.yaml (+25 -0)
.github/ISSUE_TEMPLATE/config.yml (+21 -0)
.github/PULL_REQUEST_TEMPLATE.md (+17 -0)
.github/workflows/ci.yml (+109 -0)
.github/workflows/close-incomplete-issues.yml (+33 -0)
.github/workflows/close-stale-issues.yml (+54 -0)
.github/workflows/lock-threads.yml (+24 -0)
.github/workflows/update-translation-strings.yml (+55 -0)
📝 .gitignore (+29 -4)
.pre-commit-config.yaml (+44 -0)
.readthedocs.yaml (+10 -0)
.tx/config (+12 -0)
CHANGELOG.md (+1 -0)
📝 CONTRIBUTING.md (+107 -35)

...and 80 more files

📄 Description

Fixes:

The changes made allows for colors to be imported as either hex code or with the label name.
Changes made:

  • Make "color" a custom field instead of using the built in Django field. It now allows longer names for the colors (previously only 6 chars matching that of a hex code.)
  • The given color is then matched against both the labels and hex code of ColorChoices. This is more in line with how the color is selected through the GUI as well, as previously any hex code could be imported.

Note: It seems that color choices in general are limited to the set defined in ColorChoices, however I can't seem to find these documented anywhere. Didn't include it as it is out of scope for this issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/19941 **Author:** [@Jathn](https://github.com/Jathn) **Created:** 7/23/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `18936-import-cable-color-names` --- ### 📝 Commits (10+) - [`af1a4b9`](https://github.com/netbox-community/netbox/commit/af1a4b9a129c9a3e7914873055745f4c0ccfb075) Remove #18095 from v4.2.5 release notes (#19165) - [`64643eb`](https://github.com/netbox-community/netbox/commit/64643ebdadaf49830c3e1424001c88776b5ff8a0) Merge pull request #19170 from netbox-community/18287-last_sync-column - [`76053f2`](https://github.com/netbox-community/netbox/commit/76053f259190d040790a4ee39d1a3f73a3b1c1b1) Fixes #19173: Fix heading text on table config form (#19174) - [`6b1c128`](https://github.com/netbox-community/netbox/commit/6b1c128a23dd7c0caec8c34ceea22fec4960061a) Remove #18095 from v4.2.5 release notes (#19165) - [`3324b43`](https://github.com/netbox-community/netbox/commit/3324b431092620d59c742ab90d4f39d6763339d3) Release v4.3-beta1 (#19172) - [`369b8eb`](https://github.com/netbox-community/netbox/commit/369b8eb44d1545b166b05e97e9d4257b8b462f6b) Add GetRelatedModelsMixin to ClusterView - [`b32a92e`](https://github.com/netbox-community/netbox/commit/b32a92e22beb2a23eae6ab4b0eaa10f23b83ba1b) Closes #19139: Use --force when invoking tx pull - [`cab966e`](https://github.com/netbox-community/netbox/commit/cab966e7efc03e52ec1cd927b75f5eacf2b1e336) Closes #19175: Remove outdated NetBox installation video (#19177) - [`89de6a5`](https://github.com/netbox-community/netbox/commit/89de6a543236cd10658862fb22bc09c10e20ae57) Update source translation strings - [`d243b12`](https://github.com/netbox-community/netbox/commit/d243b12a0212967f7e88ce5f2fe061e8d6facb23) Fixes #18879 - Add prefix filtering by assigned VLAN Group (#19182) ### 📊 Changes **2097 files changed** (+702843 additions, -76439 deletions) <details> <summary>View changed files</summary> ➕ `.gitattributes` (+5 -0) ➕ `.github/ISSUE_TEMPLATE/01-feature_request.yaml` (+61 -0) ➕ `.github/ISSUE_TEMPLATE/02-bug_report.yaml` (+73 -0) ➕ `.github/ISSUE_TEMPLATE/03-documentation_change.yaml` (+40 -0) ➕ `.github/ISSUE_TEMPLATE/04-translation.yaml` (+38 -0) ➕ `.github/ISSUE_TEMPLATE/05-housekeeping.yaml` (+25 -0) ➕ `.github/ISSUE_TEMPLATE/06-deprecation.yaml` (+25 -0) ➕ `.github/ISSUE_TEMPLATE/config.yml` (+21 -0) ➕ `.github/PULL_REQUEST_TEMPLATE.md` (+17 -0) ➕ `.github/workflows/ci.yml` (+109 -0) ➕ `.github/workflows/close-incomplete-issues.yml` (+33 -0) ➕ `.github/workflows/close-stale-issues.yml` (+54 -0) ➕ `.github/workflows/lock-threads.yml` (+24 -0) ➕ `.github/workflows/update-translation-strings.yml` (+55 -0) 📝 `.gitignore` (+29 -4) ➕ `.pre-commit-config.yaml` (+44 -0) ➕ `.readthedocs.yaml` (+10 -0) ➕ `.tx/config` (+12 -0) ➕ `CHANGELOG.md` (+1 -0) 📝 `CONTRIBUTING.md` (+107 -35) _...and 80 more files_ </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: <!-- Please include a summary of the proposed changes below. --> The changes made allows for colors to be imported as either hex code or with the label name. Changes made: - Make "color" a custom field instead of using the built in Django field. It now allows longer names for the colors (previously only 6 chars matching that of a hex code.) - The given color is then matched against both the labels and hex code of ColorChoices. This is more in line with how the color is selected through the GUI as well, as previously any hex code could be imported. Note: It seems that color choices in general are limited to the set defined in ColorChoices, however I can't seem to find these documented anywhere. Didn't include it as it is out of scope for this issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:23:55 +01:00
adam closed this issue 2025-12-30 00:23:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15765