Details
-
Suggestion
-
Resolution: Fixed
-
None
Description
The following document is out of date:
http://confluence.atlassian.com/display/JIRA/Creating+and+Editing+an+Issue
I think the following does not work since 3.7:
MutableIssue issueObject = (MutableIssue) JiraUtils.loadComponent(IssueImpl.class);
And should be replaced with:
MutableIssue issueObject = issueFactory.getIssue();
We should also say that if you are creating an issue from a place where the issueFactory cannot be injected in the constructor (e.g. you are writing a servlet), you can get the issueFactory statically:
IssueFactory issueFactory = ComponentManager.getInstance().getIssueFactory();
Need to test to ensure the example works.
When fixing the page we should provide both examples, pre-JIRA 3.7 and after 3.7 and clearly state which one should be used where.