Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

looking for string replacement in incident title

$
0
0

We use a script within our email-server to append the e-mail alias into the title of an incident.

example:

e-mail alias:     software@servicedesk.de

title before:     problem xyz

title after:        problem xyz #software@servicedesk.de#

 

This text between the ## is used to automaticaly set a category which the incident is forwarded to.

This works well!

 

But everytime a note is added to the incident, an e-mail is sent adding an additional "##" entry to the title.

So I would like to delete the "##" entry from the title after it has been evaluated.

I wrote a script which should replace the ## and the including text by an empty string.

 

This is the script:

import System

static def GetAttributeValue(Incident):

    Value = null

    IncidentTitleLower = Incident.Title.ToLower()

    Value = IncidentTitleLower.Replace(/#.*#/,"")

    return Value

 

It is the calculation of the title.

 

The RegExp should be ok as this Check shows:

RegExpCheck.jpg

 

But the title has not been changed.

 

Could you please help?

Regards, George


Viewing all articles
Browse latest Browse all 12704

Trending Articles