Masking of source project names in Outgoing Sync script

We have a specific business requirement for our Jira-to-Jira integration using the Exalate plugin, Whenever an issue is synced from the Source instance to our Destination instance, we capture the source project’s name using replica.project?.name. This value is populated into a custom Select List field named “Source” on the destination side.

For security and privacy reasons, we need to mask certain source project names. Instead of displaying their real names in the destination “Source” field, we want them to appear as “Roomed”.

  • If the source project is on our “mask list”, the destination field should be set to “Roomed”.

  • If the source project is not on that list, it should continue to display its real project name as it does currently.

    is it possible to implement this requirement by making changes only to the Outgoing Sync script in the Source Jira instance, without requiring any modifications to the Incoming Sync script on the Remote Jira side?

You can achieve this masking requirement by modifying only the Outgoing Sync script on the Source Jira instance. In your Outgoing Sync script, you can check if the project name is in your “mask list” and set a masked value (like “Roomed”) in the replica. The Incoming Sync script on the destination side will then receive the masked value and populate it into the custom field as usual—no changes needed there.

Here’s how you can do it:

  1. Define your mask list in the Outgoing Sync script.
  2. When setting the value for the custom field in the replica, check if the project name is in the mask list.
  3. If it is, set the value to “Roomed”; otherwise, use the real project name.

Example snippet for your Outgoing Sync script:

def maskList = ["Project A", "Project B", "Sensitive Project"] // Add your project names here

def sourceProjectName = issue.project?.name
if (maskList.contains(sourceProjectName)) {
    replica.customFields."Source" = "Roomed"
} else {
    replica.customFields."Source" = sourceProjectName
}

This way, the masking logic is handled entirely on the source side, and the destination will always receive either the real project name or “Roomed” as appropriate. For more details on scripting in Exalate, check the documentation:

Let me know if you need help with more advanced masking logic or have other requirements!