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

0 votes
Answer accepted
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events