How can an assigned value containing a url with a dynamically created suffix in an event policy be formatted correctly?

book

Article ID: 38018

calendar_today

Updated On:

Products

CA Service Operations Insight (SOI)

Issue/Introduction

Question:

I'm using Event Policy to generate a search URL link,The URL includes a constant prefix and a dynamic suffix and the link itself is being attached to one of the user attributes.

For example:

https://wiki.atlassian.net/wiki/dosearchsite.action?cql=siteSearch+~+"High CPU"

<----------------------------------- prefix -------------------------><- suffix ->

The event policy should attach the alert's summary as a suffix, so when clicking the link it will search the wiki for the alert summary.

From looking at the alert attribute I see that it does build the URL content as needed but the problem is that not all content is being formatted as a link.

Instead of formatting the content as link:

https://wiki.host/wiki/dosearchsite.action?cql=siteSearch+~+"High CPU "

it is formatted as

https://wiki.host/wiki/dosearchsite.action?cql=siteSearch+~+"High CPU "

Is there any possible fix/workaround?

 

Answer:

You can use the encodeurl function to encode special characters in a string.

For example if you specify a value such as the one below below in Assigned Value you will get the expected result:

 https://wiki.host/wiki/dosearchsite.action?cql=siteSearch+~+fx:encodeurl(${pattern1.Summary})

 

 

Environment

Release: SAMBDL99000-3.3-Spectrum-Service Assurance Manager-Promotional Bundle
Component: