Forums

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

How do you set the default workflow for a workflow Scheme using the Java API?

Joshua Reddish February 13, 2020

I am trying to create a script that will create a copy of an existing workflow scheme. I am almost there, but I cannot figure out how to set the default workflow for the scheme (The one mapped to null, if you read out the mapping of the existing project).

 

I am using the addWorkflowToScheme method of the workflowSchemeManager class. It wont let me pass null, and an empty string doesn't associate it with anything. Is there a issueTypeId for the default workflow of a specific workflow scheme?

 

This is driving me nuts.

2 answers

0 votes
Joshua Reddish June 9, 2020

To anyone who find their way here, this was a snippet of my solution:

 

if (i.getKey() == null) {
log.warn ('default')
newWorkflowScheme.setDefaultWorkflow(workflowName = wfName)

0 votes
Robert_Nerone_Jr_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2020

Type CMD Open

Joshua Reddish February 17, 2020

This doesn't make any sense as an answer.

Suggest an answer

Log in or Sign up to answer