# How would I add the story on which a comment originated to the comment on the replica story?

**URL:** <https://community.exalate.com/t/how-would-i-add-the-story-on-which-a-comment-originated-to-the-comment-on-the-replica-story/5057>\
**Category:** General Questions\
**Tags:** cloud-jira, comments, migrated\_question\
**Created:** [November 4, 2024, 7:40am UTC](https://community.exalate.com/t/how-would-i-add-the-story-on-which-a-comment-originated-to-the-comment-on-the-replica-story/5057 "2024-11-04T07:40:47Z")\
**Posts on this page:** 3\
**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:40am UTC](https://community.exalate.com/t/how-would-i-add-the-story-on-which-a-comment-originated-to-the-comment-on-the-replica-story/5057/1 "2024-11-04T07:40:47Z")

</div>

_Originally asked by Destri Weir on 15 February 2022 [(original question)](https://oldcommunity.exalate.com/questions/42832790)_

* * *

* * *

#### Comments:

> **Destri Weir commented on 15 February 2022**
>
> > I am using a visual connection with scripting, and I can’t get this script to work:
> 
> issue.comments = commentHelper.mergeComments(  
> issue, replica,{  
> comment -\>  
> comment.body = “[” + replica.key  
> + “|[https://wenergysoftware.atlassian.net/browse/“\+replica.key\+”](https://wenergysoftware.atlassian.net/browse/%22%5C+replica.key%5C+%22)]”  
> + ", "+comment.body  
> }  
> )
> 
> However, I can get the following script to work (I’d just prefer to have the link):
> 
> `issue.comments = commentHelper.mergeComments(`  
> `issue, replica, {`  
> `comment ->`  
> `comment.body = replica.key+``", "``+comment.body`  
> `}`  
> `)`

---

<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:40am UTC](https://community.exalate.com/t/how-would-i-add-the-story-on-which-a-comment-originated-to-the-comment-on-the-replica-story/5057/2 "2024-11-04T07:40:48Z")

</div>

_Answer by Destri Weir on 16 February 2022_

I answered this myself using the [https://groovyconsole.appspot.com](https://groovyconsole.appspot.com). It was a syntax error.

* * *

---

<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 6, 2024, 7:41am UTC](https://community.exalate.com/t/how-would-i-add-the-story-on-which-a-comment-originated-to-the-comment-on-the-replica-story/5057/3 "2024-11-06T07:41:27Z")

</div>

Closed on November 6, 2024, 7:41am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
