Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
HTML<head> <meta name="robots" content="noindex"> </head> <body> <style> .release-box { height: 30px; width: 70px; padding-top: 8px; text-align: center; border-radius: 5px; font-weight: bold; background-color: #F4D942; border-color: #FCE28A; } .release-box:hover { cursor: hand; cursor: pointer; opacity: .9; } </style> <div class="release-box"> <a href="

UI Button
colormagenta
tooltipInformation on this page pertains to the Perspectium Fluorine release
titleFluorine
url

https://docs.perspectium.com/display/

gold" style="text-decoration: none; color: #FFFFFF;"> Gold </a> </div> </body>

fluorine


ServiceNow transform maps allow you to map data from an import set table (inbound data for ServiceNow) to fields in the appropriate ServiceNow tables. To ensure that data being shared out of Jira and into your ServiceNow instance is mapped to the proper fields, you will need to make some changes to the existing Common Incident to Incident for Jira transform map in your ServiceNow instance that will be used as the hub for your multi-app ServiceBond integration.


Procedure

To modify the Common Incident to Incident for Jira transform map in ServiceNow for your multi-app ServiceBond integration, follow these steps:


UI Steps


UI Step

Access the PSP Common Incident to Incident for Jira transform map 

Log into your ServiceNow instance and navigate to Perspectium Common Documents PSP Common Transform Maps. Then, click into the Common Incident to Incident for Jira transform map.


UI Step

Access field maps

Make sure that the Run business rules box is checked. Then, scroll down to the Field Maps tab. 


UI Step

Add a new field map script for Sys ID

Click New to add a new field map. Check the Use source script and Coalesce boxes. Then select your target table and choose Sys Id as the target field. Add the following Source script for your new field map:

answer = (function transformEntry(source) {
    if (source.u_action == 'issue_created' || source.u_action == 'issue_updated') {
        var pspC = new PerspectiumCorrelation();
        return pspC.getRecordSysId(source, 'jira', 'incident');
    }
    return '';
})(source);

Finally, click Submit in the bottom left-hand corner of the form to save your new field map.


UI Step

Add transform scripts

Scroll down and click the Transform Scripts tab. Then, create three new transform scripts by clicking New and adding the following specifications for each (Be sure to click Submit to save each new transform script):

When

Active checked?

Order

Script

onBeforeYes110
// Ignore applications other than Jira
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
if (!source.u_provider.toString().contains("jira")) {
ignore = true;
}
})(source, map, log, target);
onAfterYes90
// Update Correlation IDs in the Correlation table
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
    var projName = gs.getProperty('com.perspectium.siam.jira.project');
    if (source.u_correlation_display.toString().contains(projName)) {
        var pspC = new PerspectiumCorrelation();
        pspC.updateCorrelationRecord(target, source, 'jira');
    }
})(source, map, log, target);
onBeforeYes105
// Prevents duplication of comments
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

    if (source.u_comments.nil())
        return;
    var sgr = new GlideRecord("sys_journal_field");
    sgr.addQuery("name", target.getTableName());
    sgr.addQuery("element", "comments");
    sgr.addQuery("element_id", target.sys_id);
    sgr.addQuery("value", source.u_comments);
    sgr.query();
    if (sgr.next())
        ignore = true;

})(source, map, log, target);



UI Step

Save the Common Incident to Incident for Jira transform map

Click Update in the top right-hand corner of the transform map form to save your changes to the Common Incident to Incident for Jira transform map.




Next steps


Copy and modify the Incident to Common Incident table map in ServiceNow (multi-app integration)



Similar topics


Content by Label
showLabelsfalse
max5
showSpacefalse
sortmodified
cqllabel in ("service-bond","servicenow") and parent = "9109559"

Contact Perspectium Support


US: 1 888 620 8880

UK: 44 208 068 5953

support@perspectium.com