I'm trying to use the DefaultWorkFlowSchemeEditor
to change the default workflow of created projects programatically. Can anyone please give me an example of how I can use the assign function to make the created project have a workflow of type "mycustomworkflow" instead of the default work flow assigned by Jira?
Community moderators have prevented the ability to post new answers.
Probably something like
workflowScheme = workflowSchemeManager.getScheme(ID); project = projectManager.getProjectObjByKey("TST"); workflowSchemeManager.addSchemeToProject(project, workflowScheme);
Haven't tested that, but it may point you in the direction
Hey Colin, thank you for the reply. I'm just wondering will addSchemeToProject actually change the current workflow that the project is following?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tested it out and it worked with a few modifications, thanks! =)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share your findings? I'm trying to accomplish a similiar thing with no luck:
https://answers.atlassian.com/questions/264805/create-a-workflow-programatically
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am assuming those are new projects with no issues?
You can use SchemeManager, e.g. schemeManager.addSchemeToProject(project, scheme);
Or you can try using the WorkflowMigrationHelper,
WorkflowMigrationHelper migrationHelper = migrationHelperFactory.createMigrationHelper(getProject(), getScheme()); migrationHelper.doQuickMigrate();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey patrick I appreciate the reply. Would the addSchemeToProject function be capable of changing the current workflow that the project is following?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.