How to get the initial status of a workflow

Hi,
i like to get the initial status of a jira workflow in java. I tried the following, but it does not return the initial status:

ComponentAccessor.getWorkflowManager().getWorkflow(myIssue).getLinkedStatusObjects().get(0);

I looked up the methods for JiraWorkflow, however I could not find a suitable one.

Thanks in advance.

2 Likes

To solve the problem i did this:

List<ChangeItemBean> changeItemBeans = changeHistoryManager.getChangeItemsForField(issue, "status"); 
String init = changeItemBeans.get(0).getFromString();

It’s not tested yet, but so far it seems to work. However if there is a better solution, feel free to share it.
Edit: changeItemBean already has a method to get the status name

2 Likes