I am working on the requirement to remove below information before a creating incident in the service now.
* "Short Description" is having extra sub strings [ex: INC0011372 - 10 events 0 flows magnitude 3 : Firewall Accept by External Host Watchlistn containing Firewall Permitn].
I am trying to use the script module of resilient script to divide the string in the two parts separated by the : and capture the second string in the new field i.e. incident.properties.description.
but it seems split and many other library are missing in the resilient script module.
Expected output - Firewall Accept by External Host Watchlistn containing Firewall Permitn
Sample code -
s = incident.description
if s is None:
log.info("No description.")
elif s.format == "text":
log.info("Description is text: {}".format(s.content))
else:
abc = log.info("{}".format(s.content))
print abc
x = abc.split(":", 1)
print x – just for testing – idea to capture and write using below command.
incident.properties.incident_description(helper.createRichText("{}".format(x.content)))
Can you please share if document is available to get more details on the available library and functions.
------------------------------
Abhishek Mahadik
------------------------------