I am working on a groovy script (which runs as post function) that creates an issue soon after an Epic is created and also associates the created issues with the Epic. So if the scripts runs successfully I should see the created issue under "Issues in Epic" field.
I am able to create the issue as soon as epic is created, but the association fails(i.e., unable to see created issue under "Issues in Epic field").
I get below error in logs:
The script failed : javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.atlassian.greenhopper.manager.issuelink.EpicLinkManagerImpl.associateIssuesWithEpic() is applicable for argument types: (com.atlassian.jira.user.BridgedDirectoryUser, com.atlassian.fugue.Option$Some, java.util.HashSet) values: [USER:10200, some(SCRUM-102), [SCRUM-103]] Possible solutions: associateIssuesWithEpic(com.atlassian.crowd.embedded.api.User, com.atlassian.fugue.Option, java.util.Set)
I am using instance of "epicLinkManagerImpl" and calling associateIssuesWithEpic() as in below code
Issue archIssue =issueManager.createIssueObject(user,issueObject) User user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(); def epic = (Option)Option.option(issue) def issueSet = new HashSet<Issue>(); issueSet.add(issueObject); epicLinkManagerImpl.associateIssuesWithEpic(user, epic, issueSet);
I wrote above based on the information obtained here
After going through couple of forums, I felt that it might have something to do with the plugins I am using, but don't any proofs to support the same.
Looking for some help here :)
Got the script working after changing the method to "createLink" from "associateIssuesWithEpic".
Our current version of gh-plugin is 6.3.6, API doc of which shows "associateIssuesWithEpic()".
But unknowingly on trying createLink() method inplace of above made the script work!
On refering to the documentation found that this method was supported in API version 6.0.7
Not sure how it worked.
Don't really understand why that doesn't work... if you look at what you are passing and what it expects it looks correct.
A BridgedDirectoryUser "is a" com.atlassian.crowd.embedded.api.User, so that's not a problem.
"Some" is an "Option", so same there, and clearly a HashSet is a Set.
Can you post a minimal but complete script that demonstrates the issues to gist.github.com, if you do that I will try to reproduce and debug.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs