The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set issue type in behaviors script

Jordan Loverock
September 10, 2018

Hello,

I know I can check the current issue type by using the following:

if(issueContext.issueType.name == "Incident")
{
    //do something
}
else if (issueContext.issueType.name == " Service Request")
{
    //do something else
}

I'm having difficultly figuring out how to set the issue type via the groovy script?  Not just check it's value, but set it to something else.

 

 

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Tuncay Senturk _Snapbytes_
Community Champion
September 10, 2018

Hi Joseph,

AFAIK, you can not just update issue type. You should move issue to change issue type, because changing issuetype changes the fields, workflows, screens, ...

If you want to change issuetype you can use REST API so that you can change multiple fields at a time.

Jordan Loverock
September 12, 2018

Yeah, I quickly realized it's not something I want to be doing anyway, thanks for the reply.

TAGS
AUG Leaders

Atlassian Community Events