This question is in reference to Atlassian Documentation: Configuring Workflow

Ask your question here...

1 answer

0 vote

There's no question here - what are you looking for?

Hi Nic,

I tried to use the getStatusId() and setStatusId() functions to change the EPIC status from To Do to In Progress. But it's not working / issueInputParameters1 is blank.


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.opensymphony.workflow.InvalidInputException
def issue = issue as Issue
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def issueService = ComponentAccessor.getIssueService()
def epicLinkCf = customFieldManager.getCustomFieldObjectByName("Epic Link")
def epicLink = issue.getCustomFieldValue(epicLinkCf) as Issue

def issueInputParameters1 = issueService.newIssueInputParameters().getStatusId()

log.debug (issueInputParameters1)

if (issueInputParameters1 == 'To Do') {
log.debug ('EPIC Status in in To Do state')
def issueInputParameters2 = issueService.newIssueInputParameters().setStatusId('In Progress')

issueInputParameters1 is blank ...

log.debug (issueInputParameters1)

2016-08-17 11:42:10,604 DEBUG [workflow.ScriptWorkflowFunction]: 

Do not try to set a status directly.

You need to move the issue through the workflow to get it to the right status.  The only time setStatusId can be used is by the workflow transitions and by an issue import creating issues.

See for how to change status properly.

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

285 views 38 9
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot