# How to run a trigger on created issues only

**URL:** <https://community.exalate.com/t/how-to-run-a-trigger-on-created-issues-only/4185>\
**Category:** General Questions\
**Tags:** usecase, triggers, jira, migrated\_question\
**Created:** [November 4, 2024, 6:37am UTC](https://community.exalate.com/t/how-to-run-a-trigger-on-created-issues-only/4185 "2024-11-04T06:37:10Z")\
**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:37am UTC](https://community.exalate.com/t/how-to-run-a-trigger-on-created-issues-only/4185/1 "2024-11-04T06:37:10Z")

</div>

_Originally asked by Roman on 27 March 2020 [(original question)](https://oldcommunity.exalate.com/questions/11338743)_

* * *

For example we have a Trigger

project = TEST AND assignee = Admin

We would like to run a synchronization only if the issue in the project TEST gets assigned to an admin user by creation. In case an old issue gets updated from assignee user1 to assignee admin Trigger should not start the synchronization

* * *

---

<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:37am UTC](https://community.exalate.com/t/how-to-run-a-trigger-on-created-issues-only/4185/2 "2024-11-04T06:37:11Z")

</div>

_Answer by Roman on 27 March 2020_

this can be achieved by adding the following code to the beginning of your Outgoing Sync

```auto
if(firstSync && (!eventTypeId || eventTypeId != com.atlassian.jira.event.type.EventType.ISSUE_CREATED_ID)) 
return;

```

```auto
This will work in Exalate version 4.7.4 and higher

```

* * *
