简体   繁体   English

Jira Java Rest客户端:从问题获取IssueLinks

[英]Jira Java Rest Client: Get IssueLinks from issue

I'm implementing a tool with the JIRA Javs Rest Client. 我正在使用JIRA Javs Rest Client实施工具。 I perform a query to get all issues which are overdued. 我执行查询以获取所有过期的问题。 After this I would like to check, whether each of them is a child of any other issue. 在此之后,我想检查一下它们是否是其他任何问题的孩子。

Problem : I cannot find any solution to get the issue links 问题 :我找不到任何解决方案来获取问题链接

I tried to get the field "issuelinks" by: 我试图通过以下方式获取“ issuelinks”字段:

issue.getField("issuelinks");

and also tried to use the method: 并尝试使用该方法:

getIssueLinks()

I also read about an IssueLinkManager but it seems that I cannot import that library as I cannot find the correct maven repository for that. 我还阅读了有关IssueLinkManager的信息,但由于找不到正确的Maven存储库,因此似乎无法导入该库。 I also tried to use an adapted JQL query but couldn't find a solution to search for issues without parent issues. 我还尝试使用经过改编的JQL查询,但是找不到没有父问题的问题的解决方案。

I would really appreciate if anyone could help me. 如果有人可以帮助我,我将不胜感激。 Thank you in advance! 先感谢您!

This code works for me: 该代码对我有用:

Issue i = client.getIssueClient().getIssue("XX-1000").claim();
for(IssueLink il : i.getIssueLinks()){
    System.out.println(il);
}

Prints: 印刷品:

IssueLink{targetIssueKey=XX-1000, targetIssueUri=xxx, issueLinkType=IssueLinkType{name=Duplicate, description=duplicates, direction=OUTBOUND}}

What happens when you try it? 尝试时会发生什么? This API works fine, but has no documentation whatsoever. 此API可以正常运行,但是没有任何文档。 I am using version 4.0.0. 我正在使用4.0.0版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM