Jump to content

Recommended Posts

This document will show how to create new hiersel, hierload and new factories to table rootcause (rc).
On this example I'm using the rootcause categorys to request and incidents on detail_in.htmpl.

1º) Create 2 new columns on table rootcause (z_cr_flag and z_in_flag - INTEGER);

 

f78ae53b41564279bba2c6ef080b9b97_pastedImage_4.png

 

f78ae53b41564279bba2c6ef080b9b97_pastedImage_17.png

 

f78ae53b41564279bba2c6ef080b9b97_pastedImage_19.png

 

 

2º) Create 2 new factorys with .mod files just like below: <After install this files, you must restart the CA SDM services>

 

 

File: rc_cr.mod

OBJECT rc {


FACTORY rc_cr{

RESTRICT "z_cr_flag = 1 " { z_cr_flag=1};


STANDARD_LISTS {

MLIST OFF;

RLIST OFF;

SORT_BY "sym";

};

REL_ATTR persistent_id;

COMMON_NAME sym;

};

};        

 

File: rc_in.mod

OBJECT rc {


FACTORY rc_cr{

RESTRICT "z_in_flag = 1 " { z_in_flag=1};


STANDARD_LISTS {

MLIST OFF;

RLIST OFF;

SORT_BY "sym";

};

REL_ATTR persistent_id;

COMMON_NAME sym;

};

};

 

 

3º) Create new files: hiersel_rc_cr.htmpl and hierload_rc_cr.htmpl ||| hiersel_rc_in.htmpl and hierload_rc_in.htmpl 

<You can copy the default files of rc -- hiersel_rc.htmpl and hierload_rc.htmpl -- this files could be located at $NXROOT\bopcfg\www\htmpl\default >

           

After copy the files and rename them, put the new files at $NXROOT\site\mods\www\htmpl\default                   

 

You must change the factory on each one of them, effectly the change must be applied on this part of the code:

 

hiersel_rc_cr.htmpl and hierload_rc_cr.htmpl

<PDM_LIST PREFIX=list FACTORY=rc_cr WHERE="${args.KEEP.HierWc:}"

 

hiersel_rc_in.htmpl and hierload_rc_in.htmpl 

<PDM_LIST PREFIX=list FACTORY=rc_in WHERE="${args.KEEP.HierWc:}"

 

4º) On detail_in.htmpl you must add the follow code to separate each factories:

 

<PDM_IF "$args.zType2" == "I">
<PDM_MACRO name=dtlHier hdr="Categoria de fechamento" attr=rootcause factory=rc_in autofill="no">
<PDM_ELIF "$args.zType2" == "R">
<PDM_MACRO name=dtlHier hdr="Categoria de fechamento" attr=rootcause factory=rc_cr autofill="no">
</PDM_IF>

 

zType2 is the attribute that controls the type of the ticket (Incident or Request).

 

 

f78ae53b41564279bba2c6ef080b9b97_pastedImage_13.png     f78ae53b41564279bba2c6ef080b9b97_pastedImage_20.png

 

all_files.zip

Edited by thiago23oliveira

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...