# Display multiple issue links

**URL:** <https://community.exalate.com/t/display-multiple-issue-links/4384>\
**Category:** General Questions\
**Tags:** onpremise-jira, usecase, migrated\_question, moved\
**Created:** [November 4, 2024, 6:52am UTC](https://community.exalate.com/t/display-multiple-issue-links/4384 "2024-11-04T06:52:57Z")\
**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, 6:52am UTC](https://community.exalate.com/t/display-multiple-issue-links/4384/1 "2024-11-04T06:52:57Z")

</div>

_Originally asked by Berry Kersten on 09 October 2020 [(original question)](https://oldcommunity.exalate.com/questions/20119912)_

* * *

Hi,

Currently I’m syncing an issue link by the following scripts

**Outgoing**

```auto
replica.customKeys.issueLinks = issue.issueLinks.collect{ baseUrl + im.getIssueObject(it.otherIssueId as Long).key}

```

**Incoming**

```auto
issue.customFields."ServiceDesk ID".value = replica.customKeys.issueLinks.join(",")

```

This works like a charm (in case of 1 issue link), however I’m not sure how to change this for the use case where I have multiple and different issue links.

Now the result on the remote site is like this:

**Custom field** :

“[https://someurl1/browse/ISSUEKEY-1,https://someurl1/browse/ISSUEKEY-2](https://someurl1/browse/ISSUEKEY-1,https://someurl1/browse/ISSUEKEY-2)”

I would to have something like this

**Custom field** :

“[https://someurl1/browse/ISSUEKEY-1](https://someurl1/browse/ISSUEKEY-1,https://someurl1/browse/ISSUEKEY-2) (is caused by)”, [https://someurl1/browse/ISSUEKEY-2](https://someurl1/browse/ISSUEKEY-1,https://someurl1/browse/ISSUEKEY-2) (relates to)

Ideas anyone? Thanks!

* * *

#### Comments:

> **Berry Kersten commented on 16 November 2020**
>
> > Hi Juan Grasesdo you have an idea how to realize this? Thanks.

---

<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, 6:52am UTC](https://community.exalate.com/t/display-multiple-issue-links/4384/2 "2024-11-04T06:52:58Z")

</div>

_Answer by Juan Grases on 17 November 2020_

Hi Berry, could you try:

Outgoing:

```auto
replica.customKeys.issueLinks = issue.issueLinks
.collect{
 baseUrl + im.getIssueObject(it.otherIssueId as Long).key + "("+it.linkName+")"
}

```

The incoming is good as it is. Maybe you can leave a space between comas:

```auto
issue.customFields."ServiceDesk ID".value = replica.customKeys.issueLinks.join(", ")

```

* * *

#### Comments:

> **Berry Kersten commented on 18 November 2020**
>
> > Thanks a lot. This works and is exactly what I needed!

> **Berry Kersten commented on 17 December 2020**
>
> > Hi Juan Grases one more additional question.
> 
> Currently the link is displayed as:
> 
> [[https://support.test.uniface.info/browse/UFC\-25669](https://support.test.uniface.info/browse/UFC%5C-25669)(is]([https://support.test.uniface.info/browse/UFC-25669](https://support.test.uniface.info/browse/UFC-25669)(is “Follow link”) caused by)
> 
> When opening that link it’s also displayed as
> 
> ![](https://dub1.discourse-cdn.com/flex018/download/attachments/20119912/Schermafbeelding%202020-12-17%20om%2010.37.12.png?version=1&modificationDate=1608197845453&api=v2)
> 
> Is there a trick/way to exclude the “(is” in the URL? Because in some browsers this results in not finding the issue when clicking on the link.
> 
> Current rules:
> 
> **outgoing**
> 
> ```auto
> replica.customKeys.issueLinks = issue.issueLinks
> .collect{
> baseUrl + im.getIssueObject(it.otherIssueId as Long).key + "("+it.linkName+")"
> }
> 
> ```
> 
> **incoming**
> 
> ```auto
> issue.customFields."ServiceDesk ID".value = replica.customKeys.issueLinks.join(", ")
> 
> ```

> **Berry Kersten commented on 04 January 2021**
>
> > Fixed it! There was a space missing…
> 
> ```auto
> baseUrl + im.getIssueObject(it.otherIssueId as Long).key + " ("+it.linkName+")" 
> 
> ```
> 
> ```auto
>   
> 
> ```

---

<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, 6:53am UTC](https://community.exalate.com/t/display-multiple-issue-links/4384/3 "2024-11-06T06:53:29Z")

</div>

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