# Exalate is used as reporter if user's email was not found in Jira

**URL:** <https://community.exalate.com/t/exalate-is-used-as-reporter-if-users-email-was-not-found-in-jira/4603>\
**Category:** General Questions\
**Tags:** exalate, usecase, cloud-jira, migrated\_question\
**Created:** [November 4, 2024, 7:09am UTC](https://community.exalate.com/t/exalate-is-used-as-reporter-if-users-email-was-not-found-in-jira/4603 "2024-11-04T07:09:31Z")\
**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:09am UTC](https://community.exalate.com/t/exalate-is-used-as-reporter-if-users-email-was-not-found-in-jira/4603/1 "2024-11-04T07:09:31Z")

</div>

_Originally asked by Valeriy Ivanov on 18 February 2021 [(original question)](https://oldcommunity.exalate.com/questions/25068562)_

* * *

On the initial JSD when user creates a request - reporter field is filled with user’s email. However, once sync comes into play, on the destination side, if user has never sent a request, reporter field is set to Exalate. How can we sync the reporter?

I have the following script for this

```auto
issue.reporter = nodeHelper.getUserByEmail(issue.reporter?.email)

```

But it doesn’t seem to work

* * *

---

<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/exalate-is-used-as-reporter-if-users-email-was-not-found-in-jira/4603/2 "2024-11-04T07:09:32Z")

</div>

_Answer by Jonathon Irwin on 22 February 2021_

You certainly can create the customer if required (provided the Exalate user has permissions to do so).

As per [https://docs.idalko.com/exalate/display/ED/createUser](https://docs.idalko.com/exalate/display/ED/createUser):

You should be able to go:

```auto
if (replica?.reporter?.key) { // added this line to exclude trying to make a user if this value is null
def reporterUser= userHelper.getByKey(replica?.reporter?.key)
if (reporterUser== null) {
   // create the user if s/he doesn't exist
   reporterUser= userHelper.createUser(replica.reporter.username,
                         "passwordToChange",
                         replica.reporter.email,
                         replica.reporter.displayName)
}
    //add the user as a request participant
issue.reporter= reporterUser
}

```

* * *

---

<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/exalate-is-used-as-reporter-if-users-email-was-not-found-in-jira/4603/3 "2024-11-04T07:09:39Z")

</div>

_Answer by Valeriy Ivanov on 18 February 2021_

Okay, so after spending a day on this, I have figured out that there are changes in Jira API and getUser had some changes.

But I believe the root case is even deeper, seems like if the customer doesn’t exist in master instance it won’t be synced with his email and only ‘Exalate’ would be the reporter.

So the question is: is it possible to sync the customers between two instances or can I do it in script somehow? Like create customer if it doesn’t exist?

* * *
