Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..
404 views

Java script to replace affected Item!!

Hi Team,

We are looking for script, Once any ticket opens with particular CI's automatically affected item to be "XYZ". Currently we are using with title of the descprition we are looking replace with CI's value.

/////////////////////////////// XXX///////////////////////////////////////
if(system.functions.index("DAD",record.brief_description)==1 || system.functions.index("Alert: DAD",record.brief_description)==1 || system.functions.index("Memory usage",record.brief_description)==1 || )
{
record.affected_item="XYZ"
}

Best Regards,
Tom
0 Likes
8 Replies
Highlighted
Established Member..
Established Member..

Re: Java script to replace affected Item!!

Hi Tom,

 

If the afftected Item is fetteched from "device" table then you can make use of link itself written for 'logical.name' .

 

Regards,

Krn

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Java script to replace affected Item!!

Yes! It's in device table. How I can use the link!!

Best Regards,
Tom
0 Likes
Highlighted
Established Member..
Established Member..

Re: Java script to replace affected Item!!

Hi,

If you this to be configured in IM ticket then,

link->probsummary->find for name "logical.name"-> right click on the logical.name--> Select line-->fill the field names as shown in the attachment.

Regards,

Krn

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Java script to replace affected Item!!

Hello.

Can you describe more detail all process.

How do you open a ticket, is this interaction...? (opened\added automatically by email, added maually by operator,...)

Link give you ability choose from interaction (for example) real CI from your devices (manually)

Your script doesnot check is there such CI in your device or not.

 

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Java script to replace affected Item!!

Hello,

Thanks for the feedback, We have integration RTSM-SM, When any devices goes down RTSM forward alert to SM. Based upon the event Incident ticket is created. 

For particular CI's we require affected_item to be "XYZ". All these days we were using with title based!! 

/////////////////////////////// XXX///////////////////////////////////////
if(system.functions.index("DAD",record.brief_description)==1 || system.functions.index("Alert: DAD",record.brief_description)==1 || system.functions.index("Memory usage",record.brief_description)==1 || )
{
record.affected_item="XYZ"
}

Best Regards,
Tom
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Java script to replace affected Item!!

I do not understand what result you wish to obtain.

There is a field logical.name  (in incidents and probsummary table)

You can configure the integration to write the value directly into the field you need (logical.name). Your RTSM system must have same name for device as SM have it in device table for logical.name field

Or you mean that RTSM and SM have not same name for devices. And RTSM recieve XXX name to SM and SM should interpret it as "XYZ"

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Java script to replace affected Item!!

Hi  @tomkool007

I belive yuor quetion is't full.

I can suppose you are looking for script which will  populate the affected item based on some creteria in turn which are passed from monitoring system.  Please describe your questiom more clearly.  Like example:

1. now we having this.(done)

2. but we would like to achive this

3. we are having a.b.c set of data 

 

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Java script to replace affected Item!!

Hello,

as it was posted before, could you please describe the required  mechanism in more details.

 

Based on what you have posted before I can suggest that you are trying to tailor that in triggers.

What kind of trigger you have chosen? You dont have any function for saving like record.doSave() or something like that so not sure if the result of your script is trying to be saved at all.

 

Besides of that it might not be workong if you have activate Subscription functionality and the person who is chosen in Interaction does not have subscription for that technical service.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.