How to link all newly created issues in 15 minutes period
Asked by Slobodan Spasenovski:

Hello all,

I am trying to link all newly created issues in a 15 minutes time period since they are almost always connected to each other.

I have tried with the "Link issue to" but it doesn't work for some reason.

Have anyone successfully managed a similar task?

Best regards,

Slobodan


Answers:
author: Slobodan Spasenovski
body: There is automatisation in place that creates new issue when there is new alarm, the issue is created from a dedicated user. If the issue persists or has some chained alarms/problems it will create new issue and for example in a short period of 15 minutes it might create 10 issues.

Since all issues are created from one dedicated user I can filter them created by user but that is not the problem.

It is not the condition that I am questioning, was trying to just catch ALL new issues in the past 15 minutes and link them, for testing purposes I even tried to catch ALL issues during the **whole business day** and link them with each other but without success.

Just to verify that the conditions are working I added auto assign after/before the Link action and the auto assign works so it doesn't look like a problem in the condition but a **problem in the Link function**/condition.

Thanks, Slobodan

comments: author: Agraj Mangal
body: Hi [@Slobodan Spasenovski](/t5/user/viewprofilepage/user-id/4981343)

Can you please provide some screenshots of your rule to help us understand better what you are trying to achieve - what worked and what did not?

also please expand on "it doesn't look like a problem in the condition but a **problem in the Link function** /condition."

When you say the Like action does not work, do you see any errors in the Audit Log?   


author: Darryl Lee
body: Huh. Interesting idea.

What are you using to "find" the issues created within 15 minutes of each other. Do you have more than one user? What if multiple users create tickets within the same time frame?

How long do you "wait" before you can be sure that a new issue is part of a new group of tickets, as opposed to part of the last group.

Let's say if there's 5 minutes of no issues created, then any issue created is the "first" one in the group. I suppose you could create an Automation that runs every minute, but you'd have to do something like... JQL of:

```
created > now.minusMinutes(5)
```

But that doesn't guarantee that NO OTHER ISSUES have been created in the last 5 minutes. Hmmm.

Anyways though, I was thinking that if you *could* somehow identify this "first" issue you maybe could do something like finding related issues that match:

```
reporter = {{issue.reporter}} AND created >= {{issue.created}} AND created < {{issue.created.plusMinutes(15)}}
```

The PROBLEM though is that when the same automation runs again the next minute, it's not going to know if this is part of a group, as opposed to a new "first" issue. You would need some independent counter or flag. I suppose you could use a [project entity property](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-users/#Entity-Properties). But this seems incredibly fragile.

In sum, this probably isn't possible, OR it's a bad idea.

comments: author: Slobodan Spasenovski
body: ah, replied as an answer :)