# Synchronize comment author from Salesforce to Jira

**URL:** https://community.exalate.com/t/synchronize-comment-author-from-salesforce-to-jira/5131
**Category:** General Questions
**Tags:** exalate, cloud-jira, salesforce, migrated\_question
**Created:** [November 4, 2024, 7:45am UTC](https://community.exalate.com/t/synchronize-comment-author-from-salesforce-to-jira/5131 "2024-11-04T07:45:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)
#### Post date: [November 4, 2024, 7:45am UTC](https://community.exalate.com/t/synchronize-comment-author-from-salesforce-to-jira/5131/1 "2024-11-04T07:45:22Z")

</div>

_Originally asked by Andres Martynowicz on 23 March 2022 [(original question)](https://oldcommunity.exalate.com/questions/42835461)_

* * *

We’re trying to sync a case comment author from Salesforce to Jira Cloud but it’s not working as the author is always “Exalate”.

I’ve followed the documentation to add this code :

```auto
issue.comments = commentHelper.mergeComments(issue, replica){ it.executor = nodeHelper.getUserByEmail(it.author?.email) }

```

I’ve also made sure that the comment author exists on Jira and has the permissions to access the project and add comments.

Please advise.

* * *

---

<div class="post-metadata">

### Author: ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)
#### Post date: [November 4, 2024, 7:45am UTC](https://community.exalate.com/t/synchronize-comment-author-from-salesforce-to-jira/5131/2 "2024-11-04T07:45:26Z")

</div>

_Answer by Ariel Aguilar on 26 March 2022_

Hi Andres,

I was able to reproduce the problem from Salesforce to Jira Cloud:

![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/f0afb2b85825498446dfa89f62b74b5297b6f230.png)

![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/312de077e5bebbf062489a419b522a0ac735ccc6.png)

To achieve what is needed, you will need to inspect the local replica from Salesforce side, and you will get something like:

“comments”: [  
{  
“id”: “00a5f000000oZGfAAM”,  
“author”: {  
“key”: “0055f000000xGlUAAU”,  
“active”: false  
},  
“body”: “TEST internal comment.”,  
“created”: 1648252800000,  
“internal”: true,  
“restrictSync”: false  
}

Then, once you know the author key, what you will need is to define a user mapping:

```auto
final def userMapping = [
      "0055f000000xGlUAAU" : "ariel.aguilar@idalko.com"
]
issue.comments = commentHelper.mergeComments(
  issue,
  replica,
  {
    it.executor = nodeHelper.getUserByEmail(userMapping[it.author?.key]);it
  }
)

```

I just tested it and it worked for me.

 ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/c2d3c47218be22c28a8d6e0807c997f0238fb382.png)

 ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/1fc8907228321eea5e5c68db86a490799f5f3a91.png)

Kind regards,

Ariel

* * *
