How to set jira issue type with script runner (2nd post)

meddows April 9, 2017

Hi The previous question by Adolfo Casari (Feb 15, 2013) which was marked as solved, pointed to a post which no longer exists.

Previous: https://community.atlassian.com/t5/JIRA-questions/How-to-set-jira-issue-type-with-script-runner/qaq-p/344276

Answer: https://answers.atlassian.com/questions/133053/changing-the-issue-type-with-groovy

I am stuck trying to change an issue type (via script runner) when it is created in the project via automation. 

Thanks

2 answers

1 accepted

2 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 9, 2017

The post does exist, it's just that Atlassian in their wisdom put the post in https://community.developer.atlassian.com.

But let's just assume that all the answers I've made over the last 10 years that had "development" tags have been lost so we'll start again.,

Changing the issue type is "moving" the issue. You may be able to use issue.setIssyeType(...) if you use that in the first post-function on Create transition.

meddows April 10, 2017

Hi Jamie. Thank you for your response.

I was able to get it working with your suggestion and then using issue.store(). 

0 votes
MarcosQ July 14, 2017

Hi @JamieA @meddows did you were able to solve this? I need the same,  I have to change issue type of an issue in order to change the workflow. Can you please provide me the script that you use? 
Thanks a lot!
Mark.

Suggest an answer

Log in or Sign up to answer