Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Related issues automation

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()}}"


}
}
}
]
}
}

 

1 answer

Hi @CTO 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).

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, 

Hi @CTO 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")

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")

}
}
}
]
}
}

Thanks for that information, @CTO 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/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,121 views 8 28
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you