Suppose, you want to set workflow scheme from the template project to another project. The code would be something like that:
Project project = ComponentAccessor.getProjectManager().getProjectObjByKey("projectKey");
Project templateProject = ComponentAccessor.getProjectManager().getProjectObjByKey("projectKey");
I want to copy a workflow scheme from a template project and assign that copied workflow scheme to a new project. i tried your code, but it doesn't work. It remove the workflow scheme from both template and target project. When i go to admin page edit the template workflow scheme, the log shows the error below.
2017-11-21 04:04:51,206 http-nio-8080-exec-21 ERROR admin 244x10835x1 wllipk 10.209.96.235 /rest/globalconfig/latest/workflowschemeeditor/11401 [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Passed List had more than one value.
java.lang.IllegalArgumentException: Passed List had more than one value.
at sun.reflect.GeneratedMethodAccessor934.invoke(Unknown Source)
... 1 filtered
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs