Hi!
JIRA 7.3.6 Standalone
Atlassian Plugin SDK 6.2.2
We have created an Atlassian Plugin which changes the IssueType of another linked Issue within a Workflow Validator Class:
import com.opensymphony.workflow.Validator;
// validate
public void validate(Map transientVars, Map args, PropertySet ps) throws InvalidInputException {
final Issue issue = (Issue)transientVars.get("issue");
…
IssueManager im = ComponentAccessor.getIssueManager();
MutableIssue linkedIssue = im.getIssueObject(issue.getId()); linkedIssue.setIssueType(bug); im.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), linkedIssue, EventDispatchOption.DO_NOT_DISPATCH, false);
...
}
Changing the IssueType of the linked Issue works fine and it causes the linked Issue to have another Workflow, which is correct.
Though everything seemed to work fine, we realized, that after changing the IssueType, no more Workflow Post-Functions are called anymore when State Transitions occur for the linked Issue.
Any Ideas on how to get the Workflow Post Functions working in this scenario would be greatly appreciated!
Thanx in advance,
Hans