Hi,
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 :)
Thanks,
Aravind
Hi Jamie,
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.
Thanks
Oh cool... well done. Sounds like that will be useful others too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jamie for the help. Here is the link to the gist where I have placed the script:
https://gist.github.com/ark09/c62a20c4cdae3f98df85
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.