New date fields added to the nr object are displayed in Julian date format in the Versioning TAB of the CI detail form

Document ID : KB000048113
Last Modified Date : 14/02/2018
Show Technical Document Details


I added correctly a new date attribute to the nr object. This new date attribute is created with Site-Defined UI_INFO equal to AUDITLOG in order to get it displayed in the Versioning Tab for the Configuration Item detail form. The new date attribute is correctly displayed but with Julian date format.


The incorrect date format comes from the fact that the newly added attribute does not have a call to the cmdbMetadata macro that would format it.

The cmdbMetadata macro handles formatting for CMDB attributes and if you look through the HTMPL files beginning with cmdb_metadata_xxxx you will see that the attributes that need formatting for the web UI Versioning tab are found there.

The potential resolution for this problem is to add a cmdbMetadata macro call for the new date attribute. Steps to follow:

  1. Open Web Screen Painter.

  2. Open the file cmdb_metadata_common.htmpl

  3. Scroll down to the bottom and before the line that states "<PDM_IF 0>", insert the following line:
    <PDM_MACRO name=cmdbMetadata category="General" attr="z_newdate_attribute" heading="<Name>" help="<Help>">
    Note: replace <Name> with the name of the attribute you would like to appear on the Versioning tab and Replace <Help> with a description of the attribute.

  4. Save and publish the changes.

Note that if the new date field has been added to an extension table (i.e. in secx instead of nr)) , the line need to be inserted in the cmdb_metadata_xxx.htmpl file for the particular extension table (i.e. cmdb_metadata_secx.htmpl) instead of in the cmdb_metadata_common.htmpl file.

Note: Modifying forms using a means other than GUI operations in Web Screen Painter is not supported.