This is my post function. I am working on jython scripting suite.
from java.util import Calendar
from java.util import Date
import com.atlassian.jira.component.ComponentAccessor
from com.atlassian.jira import ComponentManager
from com.atlassian.jira.issue import Issue
from java.sql import Timestamp
import java
import time
ts = long(time.time())
issue.setDueDate(java.sql.Timestamp(ts))
issue.store()
and this is what i am getting error
Issue workflow initialization error: unable to find Issue created with workflowId '10694'. Did the IssueCreateFunction run successfully on workflow.initialize() ?
Just an educated guess:
Your post function is modifying the issue before it has been created. Have a look at the postfunctions in the create-transition: The first one called should be "Creates the issue originally.". Place your own postfunction after it and it should work.