In the script override for the Remote Record Field Importer, you should have something like this:
var importer = new Packages.purescm.vegas.plugins.ALMRemoteRecSynchronizer(
executingRule, // Mapping Rule
remId, // Filter
extraInfo, // Extra Info
Packages.purescm.vegas.plugins.StmUtil.getItemTypeName(Packages.purescm.vegas.plugins.StmUtil.getDefectId(), securityContext), // Import To Item Type
"purescm.vegas.plugins.jira.JiraIssueConnector", // Connector ID
null, // Attachment Filter
null, // Attachment Extra Info
null, // Attachment Connector ID
false, // Allow Delete Local Attachments
proj, // Link To Item
impByRelTypeStr, // Relationship Type
true, // Implied Relationship
excl, // Rule Exclusion List
true, // Do Percent Complete At End
rulesToken, // Rules Access Token
securityContext, // Security Context
true, // Async Import
null, // Field Mapping Listener
null, // Attachment Extra Info Decrypt/Encrypt Listener
null); // Import Listener
importer.start();
The import listener (highlighted in yellow above) allows you to modify the records before save. With this you can translate the info coming in from the assignee in SDM to the correct format for ALC. The SDM record contains the info needed in two fields (Assignee first name and Assignee last name) and ALC needs the value to be a Person org entry. So you would do something like this:
obj = {
itemImported: function(remRec, item, beforeSave, importCtx) {
if (beforeSave) {
// Get assignee name
var assignName = new java.lang.StringBuilder();
var flds = remRec.getFieldNames();
var vals = remRec.getValues();
for (var f = 0; f < flds.size(); f++) {
if (flds.get(f).equals("assignee.first_name")) {
if (vals.get(f) != null && !vals.get(f).equals("")) {
assignName.append(vals.get(f));
}
} else if (flds.get(f).equals("assignee.last_name")) {
if (vals.get(f) != null && !vals.get(f).equals("")) {
if (assignName.length() > 0)
assignName.append(" ");
assignName.append(vals.get(f));
}
}
}
// Find person
var people = VegasClient.getVegasObjectsForCollection(Packages.purescm.vegas.engine.People, 0,
null, securityContext, 0);
for (var p = 0; p < people.size(); p++) {
if (people.get(p).getName().equals(assignName.toString())) {
item.setAssignee(people.get(p));
item.persistChanges();
break;
}
}
}
},
forceUpdate: function(remRec, itemId) {},
importComplete: function(updatedItemIds) {}
};
var impListener = new Packages.purescm.vegas.plugins.ALMRemoteRecSynchronizer.ImportListener(obj);
var importer = new Packages.purescm.vegas.plugins.ALMRemoteRecSynchronizer(
executingRule, // Mapping Rule
remId, // Filter
extraInfo, // Extra Info
Packages.purescm.vegas.plugins.StmUtil.getItemTypeName(Packages.purescm.vegas.plugins.StmUtil.getDefectId(), securityContext), // Import To Item Type
"purescm.vegas.plugins.jira.JiraIssueConnector", // Connector ID
null, // Attachment Filter
null, // Attachment Extra Info
null, // Attachment Connector ID
false, // Allow Delete Local Attachments
proj, // Link To Item
impByRelTypeStr, // Relationship Type
true, // Implied Relationship
excl, // Rule Exclusion List
true, // Do Percent Complete At End
rulesToken, // Rules Access Token
securityContext, // Security Context
true, // Async Import
null, // Field Mapping Listener
null, // Attachment Extra Info Decrypt/Encrypt Listener
impListener); // Import Listener
importer.start();