# Use SQL Query to pull out JSD or Jira Core reference link

**URL:** <https://community.exalate.com/t/use-sql-query-to-pull-out-jsd-or-jira-core-reference-link/4601>\
**Category:** General Questions\
**Tags:** jira, migrated\_question, jiraservicdesk, mari\
**Created:** [November 4, 2024, 7:09am UTC](https://community.exalate.com/t/use-sql-query-to-pull-out-jsd-or-jira-core-reference-link/4601 "2024-11-04T07:09:22Z")\
**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:09am UTC](https://community.exalate.com/t/use-sql-query-to-pull-out-jsd-or-jira-core-reference-link/4601/1 "2024-11-04T07:09:22Z")

</div>

_Originally asked by Jamie Bartlett on 15 February 2021 [(original question)](https://oldcommunity.exalate.com/questions/25068284)_

* * *

We are doing some analysis on demand coming into the business, now some of this demand will come in via Jira Servicedesk and some will be created directly in Jira Core.  
When a ticket gets sent for development e.g sent to Jira Core there is a synchronised ticket reference. JSD will show for example JiraCore-1 and Jira Core would show JSD-1

What I am after is pulling out this link on either side so we can join the 2 systems together and report demand comming in via servicedesk and its performance in Jira Core

* * *

---

<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:09am UTC](https://community.exalate.com/t/use-sql-query-to-pull-out-jsd-or-jira-core-reference-link/4601/2 "2024-11-04T07:09:23Z")

</div>

_Answer by Mariia Horbatiuk on 16 February 2021_

Hi Jamie,

Please try to add this rule into the incoming sync rules on the source side:

```auto
issue.customFields."remote issue key".value = remoteIssueUrl

```

and this into the incoming sync rules of the destination side:

```auto
if(firstSync){
syncHelper.syncBackAfterProcessing()
}

```

Hope this helps!

* * *
