No export for column #Chg in list_nr.htmpl
search cancel

No export for column #Chg in list_nr.htmpl

book

Article ID: 431881

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

In file Service Desk Manager\bopcfg\www\htmpl\web\analyst\list_nr.htmpl the following line has been updated from

<PDM_MACRO name=lsCol hdr="#Chg" attr=chgnr display_attr=length export=no justify="right" sort=no>
to
<PDM_MACRO name=lsCol hdr="#Chg" attr=chgnr display_attr=length export=yes justify="right" sort=no>

But when we do an export the column #Chg is not exported. Why ?

 

In log\stdlog.0 we could see this during export :

02/27 20:00:10.66 <SDM_Server> pdm_exporter  9828 SIGNIFICANT  nx_exporter.c   1544 Column (chgnr) doesn't appear to be valid for factory (nr). Ignoring column...

Environment

Service Desk Manager 17.*

Cause

Field chgnr is of type BREL (Backwards Relationship list)

This command :
bop_sinfo -a nr | findstr /I "chgnr"

returns
   chgnr                BREL <- lrel_asset_chgnr.nr (LREL chg) {nr = ?}

 

SDM does not support BREL, QREL, and LREL attributes via the Export button.

Resolution

Columns #Chg, #Req, #Inc, #Prb, #Iss are of type BREL and this type is not supported by pdm_exporter tool

#Chg value can be retrieved from database using this SQL Query :

select ci.resource_name ,count(chg.id) '#Chg' 
from ca_owned_resource ci
LEFT JOIN usp_lrel_asset_chgnr chg ON chg.nr=ci.own_resource_uuid
GROUP BY ci.resource_name