这是我在Jira 4.2中执行IssueLinking的Jelly脚本...在Jira4.2中直接尝试直播时效果很好。
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
<jira:Login username="jiraloginname" password="jirapwd">
<jira:LinkIssue key="issuekey1" linkKey="issuekey2" linkDesc="duplicates"/>
</jira:Login>
</JiraJelly>
这是我调用JellyScript和Execute的Java代码。但这引发了一些例外。
JellyContext context = new JellyContext();
Writer objWriter = new StringWriter();
XMLWriter xmlWriter = new XMLWriter(objWriter);
XMLOutput objOut = XMLOutput.createXMLOutput(objWriter);
context.runScript("IssueLinking-Jelly.jelly", objOut);
执行此代码时,会捕获以下异常。
org.apache.commons.jelly.JellyTagException: <jira:Login> com.atlassian.jira.jelly.tag.login.Login doesn't have any satisfiable constructors. Unsatisfiable dependencies: [[interface com.atlassian.jira.security.JiraAuthenticationContext]]
Caused by: org.picocontainer.defaults.UnsatisfiableDependenciesException: com.atlassian.jira.jelly.tag.login.Login doesn't have any satisfiable constructors. Unsatisfiable dependencies: [[interface com.atlassian.jira.security.JiraAuthenticationContext]]
答案 0 :(得分:0)
使用Http Post方法将链接功能的相同问题修复到JIRA中的LinkExistingIssue页面。
感谢。