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

JMWE Groovy Script to change to another workflow

I am running a ServiceDesk (Server) with different workflows, security levels and issue-types. I am trying to define a transition to change four things at the time:

* Assignee
* SecurityLevel
* Issue-Type
* From one Workflow to another

To do this I am trying to write a JMWE Groovy Script. With Assignee and SecurityLevel I have no problem with the script.

Currently I use "Set field value (JMWE add-on)" to change the IssueType in a seperate post function.

My target is to set the new IssueType and change to the correct workflow also using my JMWE Groovy script (I do not have ScriptRunner and I cannot buy it).

All information I found by now is that this is something that should be done very carefully. I could not find any code-sniplets that could be helpful.

Using MOVE is not a solutuion in my case because the IssueSecurity will not change and the issue will not be seen by the new assignee. We have many problems with that.

I hope you can help me...please... as a christmas gift ;-)


1 answer

0 votes

This is the sort of thing that stops me giving recommendations for scripting and automation apps.  Whilst they're powerful and flexible, they can give you "enough rope to hang yourself with", and frankly, the more powerful ones hand you the keys to a rope factory as well.

Do not use JMWE to change the issue type.  Unless you can guarantee that the source and target issue type have the same configurations, you will break things, probably leaving your data in an unusable mess.  Your issue types must be set up to use the same workflow, the same field configuration, the same security scheme and all the same custom field contexts. 

By same, I really do mean the same schemes.  Not just schemes that are identical, it has to be the same schemes.

If you cannot guarantee those four things are the same, then you must use the "move" functionality.  "Using move is not a solution" is utterly wrong, it is the only way to do it.  There's two options there though - write all the code to emulate what Jira's move code does, or use Jira's move functions.

Suggest an answer

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

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

189 views 1 6
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