Custom Fields should gain ability to store hyperlink base URL #5027

Closed
opened 2025-12-29 19:23:19 +01:00 by adam · 3 comments
Owner

Originally created by @c-po on GitHub (Jun 24, 2021).

NetBox version

v2.11.7

Feature type

New functionality

Proposed functionality

There is the functionality for Custom Links which will render a button on the top right location for NetBox. This is very handy but I could not get this to work to reference a custom field from within the object itself (tried using the keys exposed by the NetBox API).

When a new custom field is added which e.g. holds the reference to a ticketing system, it should not only be able to a a constraining regex, but also a base URL.

image

When the IP address, prefix or whatever this custom field is bound to is displayed, I would like to see a hyperlink which consists out of http://base.url/foo/bar/VALUE. Like this is done for the emea tenant in the screenshot below.

image

Use case

Fast and easy way to back reference to your IT ticketing system - or any other system/information you add to your custom fields.

Database changes

No response

External dependencies

No response

Originally created by @c-po on GitHub (Jun 24, 2021). ### NetBox version v2.11.7 ### Feature type New functionality ### Proposed functionality There is the functionality for Custom Links which will render a button on the top right location for NetBox. This is very handy but I could not get this to work to reference a custom field from within the object itself (tried using the keys exposed by the NetBox API). When a new custom field is added which e.g. holds the reference to a ticketing system, it should not only be able to a a constraining regex, but also a base URL. ![image](https://user-images.githubusercontent.com/25299219/123290030-3b3dd380-d511-11eb-991a-93c741af86a3.png) When the IP address, prefix or whatever this custom field is bound to is displayed, I would like to see a hyperlink which consists out of `http://base.url/foo/bar/VALUE`. Like this is done for the emea tenant in the screenshot below. ![image](https://user-images.githubusercontent.com/25299219/123291155-257cde00-d512-11eb-9b79-a79528905c7d.png) ### Use case Fast and easy way to back reference to your IT ticketing system - or any other system/information you add to your custom fields. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 19:23:19 +01:00
adam closed this issue 2025-12-29 19:23:19 +01:00
Author
Owner

@ktims commented on GitHub (Jun 24, 2021):

This is very handy but I could not get this to work to reference a custom field from within the object itself (tried using the keys exposed by the NetBox API).

You can reference them as obj.cf.name, e.g. http://base.url/foo/bar/{{ obj.cf.incident }} should work.

@ktims commented on GitHub (Jun 24, 2021): > This is very handy but I could not get this to work to reference a custom field from within the object itself (tried using the keys exposed by the NetBox API). You can reference them as `obj.cf.name`, e.g. `http://base.url/foo/bar/{{ obj.cf.incident }}` should work.
Author
Owner

@c-po commented on GitHub (Jun 25, 2021):

Hi @ktims wow, that works like a charm - I was just looking at the wrong key.

Do you happen to know to have an idea for the other feature request to replace the custom field content with a hyperlink?

@c-po commented on GitHub (Jun 25, 2021): Hi @ktims wow, that works like a charm - I was just looking at the wrong key. Do you happen to know to have an idea for the other feature request to replace the custom field content with a hyperlink?
Author
Owner

@DanSheps commented on GitHub (Jul 30, 2021):

I think the original issue is resolved. I do potentially see value in a "hyperlink" Customfield where the customfield data input is linkable in some fashion. For now though, I tihnk we can close this out.

@DanSheps commented on GitHub (Jul 30, 2021): I think the original issue is resolved. I do potentially see value in a "hyperlink" Customfield where the customfield data input is linkable in some fashion. For now though, I tihnk we can close this out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5027