Hello,
What is the .json that should I use to add this automation?:
Example:
In Project A: I have Issue 1, Issue 2 and Issue 3.
In Project B: I have Issue 4, Issue 5 and Issue 6.
Manually I related some issues like this:
Issue 1 is related with issue 4. Issue 2 is related with issue 5. and Issue 3 is related with issue 6. (They are related with "RELATED TO")
Now:
I want to create an automation, that when, issue 1 and issue 2 and 3 are related, then in issue 4, Issue 5 and Issue 6 are related with (RELATED TO).
I tried this, but it is doesn't work:
{"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "Relates"
},
"outwardIssue": {
"key": "{{issue.RelatesTo.getKey()}}"
}
}
}
]
}
}
Hi @JIRA Admin
Have you tried a global / multi-project rule, and just use the Link Issue action instead of JSON?
Best regards,
Bill
Yes, I tried but it doesn't work. If I do that, then the linked issue is duplicated in the issue, I would have in issue 4, two times the issue 1. And I want in issue 4, the issue 5 and 6.
I want to reproduce what says the example:
I want to create an automation, that when, issue 1 and issue 2 and 3 are related, then in issue 4, Issue 5 and Issue 6 are related with (RELATED TO).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think, the only way is with a .json, but I don't know how to say in jql that I want the key of the issue that is related to an issue,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @JIRA Admin
If the global rule does not work for you, I am unclear how you can do this with JQL. Note that JQL is not a complete SQL (e.g. ISO SQL), so you have limited control of what you can do.
It appears you are attempting to create a redundant web of links between sets of issues across multiple projects, and so it is unclear to me what problem you are trying to solve.
If it helps, there is a syntax for JQL to find the linked issues for a specific type. That may get you closer to being able to iterate over the result set of issues.
issue IN linkedIssues({{issue.key}}, "related to")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, thank you, I know how to find linked issues. But what I don't know, is to find this issues by .json.....
What would be the .json? I tried with this, but it doesn't work because it is not good-written:
{"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "Relates"
},
"outwardIssue": {
"key": (issue IN linkedIssues({{issue.key}}, "related to")
}
}
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, @JIRA Admin
In your JSON, you are trying to update multiple items when that JSON only works for one item at a time. What you could do instead is use the JQL in an automation branch, and then update each issue, one at a time. Please see this documentation for more information:
https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/
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.