Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

How to run a trigger on created issues only

 
2
1
0

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

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

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

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



      This will work in Exalate version 4.7.4 and higher
        CommentAdd your comment...