Can I increase the Loop Detection sevice limit in JIRA automation from 10?
Asked by Gaurav Dhuppar:

I have an requirement where I need to perform automation on dates where dates for linked subtasks should change if any change occurs in date of one subtask. I want to run it until the condition got failed for linked tasks as I have 20 subtasks. How can this be acheived?


Answers:
author: Mark Segall
body: Hi [@Gaurav Dhuppar](/t5/user/viewprofilepage/user-id/4788306) - This can be handled like this:

* TRIGGER: Field Value Changed
* CONDITIONS:
  * \<Your Date Field(s)\>
  * Issue Type = Subtask
* BRANCH: JQL *This will get you into the other subtasks*
  *

    ```
    parent = {{issue.parent}}
    ```

  * CONDITION(S) *If applicable*
  * ACTION: Edit Issue \<Your Date Field(s)\> (Set to copy from trigger issue)

comments: author: Gaurav Dhuppar
body: Hi [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637) ,

Thanks for your response. This is what I have done but I have 20 subtasks within the task and when I am trying to update the dates for all the linked subtasks, after 10 JIRA automation is throwing loop detected. Hence I wanted to check if we can increase the value for Loop Detection service Limit?


author: Mark Segall
body: Ahh... I think the loop detection is occurring because the issue is hitting itself with the JQL. You probably want to adjust the branch query to this so that the trigger issue is not included in the branch set:

```
parent = {{issue.parent}} AND KEY != {{issue}}
```

See if that fixes the problem.


author: Simmo
body: Hi [@Gaurav Dhuppar](/t5/user/viewprofilepage/user-id/4788306),

The loop detection limit cannot be changed. As [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637) pointed out, if you're hitting that then it is a sign that you need to restructure your rule.

Can you provide a screenshot of how you have configured your rule?

Cheers,

Simeon.


author: Gaurav Dhuppar
body: Hi [@Simmo](/t5/user/viewprofilepage/user-id/3608665) ,

Thanks for your response. Here is the screenshot of the rule.

![Automation_rule.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/187395i888EA17F51AB9732/image-size/large?v=v2&px=999 "Automation_rule.PNG")

The reason I have checked the box of check to allow other rule action to trigger this rule is because I want to update dates for all the linked subtasks. Now, if subtask count is less than 10, then this rule is working absolutely fine. But for more than 10 it is showing as loop. Can we insert some delay in the rule or break it in between and restart it again?

Thanks,

Gaurav Dhuppar


author: Simmo
body: Hey [@Gaurav Dhuppar](/t5/user/viewprofilepage/user-id/4788306)

Is there any chance you can raise a support ticket? These things are really hard to debug without seeing what is going on and thats lots of screenshots.  

But to answer your question, we need to have a look at what issues are triggering this rule and redesign your rule. The loop is happening because the rule is triggering itself. Perhaps a check before editing might help here as well. No point editing the field if the value already matches what it is set to.


author: Gaurav Dhuppar
body: Hi [@Simmo](/t5/user/viewprofilepage/user-id/3608665) ,

I have raised support ticket [JST-741086](https://getsupport.atlassian.com/servicedesk/customer/portal/23/JST-741086), but the field is getting edited because the value is getting changed as it is dependent on other subtasks.

Thanks,

Gaurav Dhuppar


Tags: cloud