Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Change the issuetype with scriptrunner


I would like to change the issue type after receiving the ticket with scriptrunner.

The workflow is different from the entrance workflow but it is the same project.

The tickets are automatically created in the service desk by a mail handler. However, a different issuetype should be selected for one customer.

Do you have any ideas?

Many thanks for your help.



2 answers

2 accepted

0 votes
Answer accepted

Hi @Alexander Herrler - Why don't you consider creating sub-tasks instead of changing issue types of newly created issues You can create sub-tasks with the post-functions (script runner).

Thanks @Niranjan , thats a good idea.

But where in the script can I put an "IF" condition that the script only creates tickets as subtask when it comes from customer XY (E-Mail Adress)?

Do you know this?

Hi @Alexander Herrler ,

I am sure that the post-function of Sub-task creation can be done based on condition using Script runner. You may need to check how to identify issues created via emails. May be if the description has the email address of the sender, you need to validate the description field for the email address.

0 votes
Answer accepted

Moving issues via scriptrunner or JAVA api is not trivial.

Think of all the steps you have to go through when you move an issue manually.
All those steps would have to be accounted for in a move script without the opportunities to prompt the users for many critical pieces of information. 

I haven't seen anyone implementing this successfully (and I haven't dared to try myself).

I think using a "Clone Issue And Link" or "Create Sub-task" post-function script as suggested in another answer will be your best bet. Both of those come with a "Condition" code block where you can examine the reporter's email address and decide whether or not to execute the function.

The condition script could be as simple as 


Just that single line will return either true (execute the function) or false (skip the function)

The rest of the function parameters are all form-driven, so no coding required.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

159 views 2 8
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you