Follow up from a previous post. I have been trying to add a newly created Task to an existing Epic.
I know that I can find the Epic key # and the Epic name in the custom fields of the epic story and the epic itself but I need to use EpicLinkManagerImpl.associateIssuesWithEpic to link the newly created Task to the existing Epic.
Just writing the Epic key to the Epic Link of the new created Task does not seem to be enough for the Greenhopper functionality.
I cannot use @ComponentImport EpicLinkManagerImpl in my constructor as then my class won't be loaded.
I tried using ComponentAccessor.getComponentOfType(EpicLinkManagerImpl.class) but it can't get that class, it returns null.
I tried just a myclass= new EpicLinkManagerImpl();
That last one seems to work but after passing it a correct issue I get a crash in the EpicLinkManagerImpl class:
[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer] at com.atlassian.greenhopper.manager.issuelink.EpicLinkManagerImpl.getEpicLinkType(EpicLinkManagerImpl.java:484)
[INFO] [talledLocalContainer] at com.atlassian.greenhopper.manager.issuelink.EpicLinkManagerImpl.getEpic(EpicLinkManagerImpl.java:79)
What is the right way of using this class?