# Labels not setting on Jira Issue

**URL:** https://community.exalate.com/t/labels-not-setting-on-jira-issue/5662
**Category:** General Questions
**Tags:** cloud-salesforce, exalate, cloud-jira, jira, migrated\_question
**Created:** [November 4, 2024, 8:20am UTC](https://community.exalate.com/t/labels-not-setting-on-jira-issue/5662 "2024-11-04T08:20:15Z")
**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, 8:20am UTC](https://community.exalate.com/t/labels-not-setting-on-jira-issue/5662/1 "2024-11-04T08:20:15Z")

</div>

_Originally asked by Kaleigh Garcia on 03 April 2024 [(original question)](https://oldcommunity.exalate.com/questions/107970645)_

* * *

Hello! I’ve been asked to set the Label on our Jira Issues based on our Category\_\_Text\_c field. My script reads below, however, the Label is still coming over blank. I can’t find what I’m missing? This script is in my Jira incoming script.

```auto
if (replica.Category_Text__c?.contains("Credible")) {
    issue.labels = issue.labels ?: new HashSet<>()
    issue.labels += nodeHelper.getLabel("Proserv")
    } else if (replica.Category_Text__c?.contains("CareLogic")) {
    issue.labels = issue.labels ?: new HashSet<>()
    issue.labels += nodeHelper.getLabel("CareLogic")
    }

```

* * *

---

<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, 8:20am UTC](https://community.exalate.com/t/labels-not-setting-on-jira-issue/5662/2 "2024-11-04T08:20:16Z")

</div>

_Answer by Javier Pozuelo on 06 April 2024_

Hi Kaleigh,

There are several ways to troubleshoot this, firstly I would recommend seeing if Category\_Text\_\_c is being sent over in the replica to Jira. To see this, go to Entity sync panel in your Exalate console in Jira, place the issue urn and select “Remote replica”. If you cannot find Category\_Text\_\_c the issue resides in the outgoing sync of Salesforce. If it is in the replica, you can try debugging Category\_Text\_\_c in the Incoming sync of Jira. The label could be coming in blank because the if statement conditions are not being met, so try doing the following:

```auto
debug.error("Category Text: " + Category_Text__c)

```

The `debug.error` method will block the synchronization, so after you receive the error message, you can remove the method from your sync rules.

* * *
