Stop create sub task post function from firing 'Assign' event


  • Jira Server version v7.0.10
  • ScriptRunner 4.3.1


  • 2 Issue Types
    • Bug
    • Team SLA (Sub-task)
  • Separate workflow for each issue type.
  • Notification scheme is customized to no notifications for 'Generic Event' type

Bug workflow create transition post functions

  1. Creates the issue originally.
  2. Script workflow function : Create a sub-task
    • Subtask will be created with issue type: Team SLA
  3. Re-index an issue to keep indexes in sync with the database.
    Type: class
    Class: com.atlassian.jira.workflow.function.event.FireIssueEventFunction
    eventTypeId = 1

Addition Issue actions for step 2 above

import com.atlassian.jira.issue.Issue
Issue issue = issue
String issueKey = sourceIssue.getKey()
issue.summary = "SLA | " + issueKey


We have our Bug workflow auto-creating a "Team SLA" sub-task upon creation of the Bug.  It uses the built in "Create Sub-Task" post function supplied by the Script Runner plugin.  The Bug workflow is configured to fire a 'Create Issue' event.  The "Team SLA" workflow is configured to fire a 'Generic Event' for the 'Create' transition in its workflow.


We receive 2 e-mail notifications.  Once for the create of the 'Bug' which is as expected.  But we receive a 2nd notification for the "Team SLA" from saying it was 'Assigned' eventhough there is no apparent assign event going on.


How can I stop it from generating the e-mail for the sub-task?  Is the create subtask built in script firing the 'Assign' event internally?

1 answer

1 accepted

1 vote
Accepted answer
Jenna Davis Community Champion Jul 05, 2017


Sorry for the late reply!

What are you using to send emails (a listener, a post function, etc.)? 

Could you please send me the condition for your custom email?


I'm just using post functions to send e-mails.  The post function fires a 'Generic Event' and the notification scheme for the project is configured to send no e-mail for a 'Generic Event'.  There is no other e-mail handler configured.

Jenna Davis Community Champion Jul 06, 2017

Okay, I think I understand now.

I believe that when you create a subtask it fires an 'Assign' event to assign it to your parent issue.

You probably need to set up something in your notification scheme that would ignore that 'Assign' event, if you don't have it already.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,388 views 0 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you