Skip to content

Commit d7c37d9

Browse files
committed
Fixes #11483: Apply configured formatting to custom date fields
1 parent 24de404 commit d7c37d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/release-notes/version-3.4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* [#11438](https://github.com/netbox-community/netbox/issues/11438) - Fix deletion of scheduled job using non-default queues
2424
* [#11444](https://github.com/netbox-community/netbox/issues/11444) - Adding/removing a device from a device bay should record a pre-change snapshot on the device bay
2525
* [#11467](https://github.com/netbox-community/netbox/issues/11467) - Correct count on interfaces tab when viewing a VC master device
26+
* [#11483](https://github.com/netbox-community/netbox/issues/11483) - Apply configured formatting to custom date fields
2627

2728
---
2829

netbox/utilities/templates/builtins/customfield_value.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{% load helpers %}
12
{% if customfield.type == 'integer' and value is not None %}
23
{{ value }}
34
{% elif customfield.type == 'longtext' and value %}
@@ -6,6 +7,8 @@
67
{% checkmark value true="True" %}
78
{% elif customfield.type == 'boolean' and value == False %}
89
{% checkmark value false="False" %}
10+
{% elif customfield.type == 'date' and value %}
11+
{{ value|annotated_date }}
912
{% elif customfield.type == 'url' and value %}
1013
<a href="{{ value }}">{{ value|truncatechars:70 }}</a>
1114
{% elif customfield.type == 'json' and value %}

0 commit comments

Comments
 (0)