# Sync status to custom field

**URL:** <https://community.exalate.com/t/sync-status-to-custom-field/4207>\
**Category:** General Questions\
**Tags:** exalate, usecase, customfields, migrated\_question\
**Created:** [November 4, 2024, 6:38am UTC](https://community.exalate.com/t/sync-status-to-custom-field/4207 "2024-11-04T06:38:51Z")\
**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, 6:38am UTC](https://community.exalate.com/t/sync-status-to-custom-field/4207/1 "2024-11-04T06:38:51Z")

</div>

_Originally asked by Peter Pesta on 20 April 2020 [(original question)](https://oldcommunity.exalate.com/questions/11339112)_

* * *

Dear exalate team,  
I’d like to ask you regarding the synchronisation of a status from the sender, to a custom field on the recipient side. The synchronisation is bi-directional, however, Company A is sending an issue to their contractor (Company B). The company A has only one status step within their WF for requests that are sent to their vendors (e.g.: Vendor), the company B has a WF with 7 different statuses. The company A would like to know just some of the steps and since the WFs arent the same, they would like to replicate the status from Company B into a custom field within jira of the company A. So if the vendor (Company B) does a status change, the status on the Company A side doesn’t change, only the cf value will be updated. However, when the issue gets to the final step within the Company B WF, this will trigger an WF status change on the Company A side. So the Company A knows that this issue was fixed by Company B.

Thank you and best regards,  
Peter

* * *

---

<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:38am UTC](https://community.exalate.com/t/sync-status-to-custom-field/4207/2 "2024-11-04T06:38:52Z")

</div>

_Answer by Juan Grases on 20 April 2020_

Hi Peter,

The sync from status to Cf can be done like this:

Outgoing processor (On Jira B):

```auto
replica.status = issue.status

```

Incoming Processor (On Jira A):

```auto
issue.customFields."Remote Status".value = replica.status.name

```

If Jira A would like to react to a specific status on B, it can be done with:

Incoming processor (On Jira A):

```auto
if(replica.status.name == "Closed"){
  issue.setStats("Closed")
}

```

Of course you might replace the status name and the custom field name with the real ones in your environment.

Best regards,

Juan

* * *
