Hi team. How to get "is child of" linked issue? I've tried to do It , but can't get this issue. My Code:
for (link in issueLinkManager.getOutwardLinks(issue.getId())) {
log.error(link.getIssueLinkType().getName())
if (link.getIssueLinkType().getName() == "is child of") {
log.error("TEST")
etIssue = link.getDestinationObject()
if (etIssue.getResolutionObject() == null) {
result = true
}
else {
result = false
}
}
}
Hello @Andrii Striletskyi
You are comparing the description of linkType (is child of) instead of the name. To find the name of the issue link go to the URL
<-Your-Jira-Base-URL>/secure/admin/ViewLinkTypes!default.jspa
Once you visit the above URL you can see the actual link name.
Yes , I known about this. I've set "Child" (is child of as inwards and outwards links) , but still can't get this issue (
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share the screenshot of the issue links page in your jira instance and your exact code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code:
for (link in issueLinkManager.getOutwardLinks(issue.getId())) {
log.error(link.getIssueLinkType().getName())
if (link.getIssueLinkType().getName() == "Child") {
log.error("TEST")
etIssue = link.getDestinationObject()
if (etIssue.getResolutionObject() == null) {
result = true
}
else {
result = false
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you get for the log
log.error(link.getIssueLinkType().getName())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nothing , empty string. Only Clones issues (there are 2 types - Cloners and is child of)
2019-03-15 07:54:10,373 ERROR [runner.ScriptRunnerImpl]: Cloners 2019-03-15 07:54:10,374 ERROR [runner.ScriptRunnerImpl]: There is no linked issues 2019-03-15 07:54:10,374 ERROR [runner.ScriptRunnerImpl]:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Andrii Striletskyi
In your code instead of
issueLinkManager.getOutwardLink()
Use the below method
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's to get all links irrespective of outward or inward. And then you add logging inside it
log.info()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.