Collect block does not collect all items

hi, I’m using a flow which has a ‘for’ block followed by an ‘if’ block. Near the end of the flow I’ve joined both branches of the ‘if’ back together through an ‘evaluate’ block that uses the FQL $merge function which produces a single object. Now I tried collecting these objects in a ‘collect’ block, but it doesn’t work as expected.

As you can see in the screenshot, the ‘collect’ blogs appears to be randomly collecting items. At first, it collects data from 5 iterations before finishing, then it finishes after each iteration, collecting a single object each time.

I say “randomly” because the first time I ran this flow I joined the two branches of the ‘if’ block in a ‘record’ block instead of the ‘evaluate’ block that is in the screenshot and then the ‘collect’ block collected 3 iterations at once which coincidentally corresponded to the 3 iterations that came via the top branch. It then “collected” the other 7 separately.

Any idea if I’m doing something wrong or if something else is happening here?

Thanks!

Hi @jd-forem

Welcome to the forums!

A few questions:

  1. Is the data the same every time when it gives you a random number of collection iterations?
  2. Do you have more than one for loop in your flow?
  3. Are you able to show the logic with your If Block

hi @flows-daniel ,

  1. Yes, the two ‘record’ blocks make sure that the data is the same. Anyway, I’ve tested this separately and collecting sets of objects/records that are not the same appears to be working just fine.
  2. I do have two other for loops, which are much ‘simpler’ and just process arrays of strings and then collect again on a single branch. This part works fine. See the screenshot below.
  3. From the screenshot mentioned in point 2, the flow goes directly into the ‘for’ block and from there into a first ‘if’. On one of the branches there is a second, nested ‘if’ (see the second screenshot below).

@flows-daniel, any chance you can figure out what’s wrong with my flow from what I’ve provided? Or do you need more information? Thanks a lot!

Hi @jd-forem

It’s hard to pinpoint the issue without seeing the entire flow. I think there are some minimizations that will make debugging easier and your flow run faster such as replacing your for<>record<>collect<>evaluate with a single evaluate block with the following typescript code:

sonar
  .map((item) => ({ name: item, tag: "sonar" }))
  .concat(
    deptrack.map((item) => ({
      name: item,
      tag: "dependencytrack"
    }))
  );

Are you open to a debugging call? May be easier to review and simplify some logic to find the issue: Calendly - Daniel Kimmelmann

1 Like

hi @flows-daniel,

Thanks. I tried collecting the different branches separately but the one that came from the ‘if’ block ‘Check if project name or UUID’ was still collecting items separately. So, for now, I’ve removed that ‘if’ block and now both branches collect correctly, and I then append everything in an array before outputting it.

One thing isn’t entirely clear though: what’s the ‘right’ (or best) way to ‘rejoin’ two branches of an ‘if’ block?

Hi @jd-forem

I think isn’t not so much about rejoining the If Block as it is handling multiple for/collect loops. I can’t see your whole flow but because flows operates asynchronously, if you have nested for loops the collect block can randomly collect values.

Using evaluate blocks to replace for loops when they aren’t needed or always following a for loop with a collect before any other for loops will help prevent this.

hi @flows-daniel,

Yet it was removing the ‘if’ block that did the trick in this case. However, I see your point.

The thing is, how can I then iterate over a list within a list?

Consider the following example :

It processes the following ‘hard-coded’ input from the ‘template’ block :

JSON input from 'template' block
[
    {
        "id":"main 1",
        "name":"lorem",
        "description":"lorem ipsum dolor sit amet",
        "issues": [
            {
                "id": "1",
                "name": "ipsum"
            },
            {
                "id": "2",
                "name": "ipsum"
            }
        ]
    },
    {
        "id":"main 2",
        "name":"ipsum",
        "description":"lorem ipsum dolor sit amet",
        "issues": [
            {
                "id": "3",
                "name": "abc"
            },
            {
                "id": "4",
                "name": "def"
            }
        ]
    },
    {
        "id":"main 3",
        "name":"no issues",
        "description":"this one doesn't have any issues, hence the 'if' block",
        "issues": []
    },
    {
        "id":"main 4",
        "name":"more issues",
        "description":"this one has a longer list of issues",
        "issues": [
            {
                "id": "5",
                "name": "abc"
            },
            {
                "id": "6",
                "name": "def"
            },
            {
                "id": "7",
                "name": "ghi"
            },
            {
                "id": "8",
                "name": "jkl"
            }
        ]
    }
]```

And it gives the following console output:

Console logs with network hidden
09:23:12.980 'No issues here '
09:23:14.035 'Processing issue 1 for main main 1.'
09:23:15.459 'Processing issue 2 for main main 1.'
09:23:16.823 'Processing issue 3 for main main 1.'
09:23:18.063 'Processing issue 4 for main main 1.'
09:23:19.134 'Processing issue 5 for main main 1.'
09:23:20.487 'Processing issue 6 for main main 1.'
09:23:21.578 'Processing issue 7 for main main 1.'
09:23:22.506 'Processing issue 8 for main main 1.'
09:23:22.821 'Processed issues for main main 1.'
09:23:22.821 'Processed issues for main main 2.'
09:23:22.821 'Processed issues for main main 4.'
09:23:22.821 'Processed issues for main main 4.'
09:23:22.821 'Processed issues for main main 4.'
09:23:22.821 'Processed issues for main main 4.'
09:23:22.821 'Processed issues for main main 4.'
09:23:22.822 'Processed issues for main main 4.'
09:23:22.822 'Processed issues for main main 4.'
09:23:22.822 'Processed issues for main main 4.'
09:23:22.822 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.013 'Processed issues for main main 4.'
09:23:23.014 'Processed issues for main main 4.'
09:23:23.014 'Processed issues for main main 4.'
09:23:23.014 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.395 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.396 'Processed issues for main main 4.'
09:23:23.397 'Processed issues for main main 4.'
09:23:23.397 'Processed issues for main main 4.'
09:23:23.397 'Processed issues for main main 4.'
09:23:23.548 'Processed issues for main main 4.'
09:23:23.548 'Processed issues for main main 4.'
09:23:23.548 'Processed issues for main main 4.'
09:23:23.549 'Processed issues for main main 4.'
09:23:23.549 'Processed issues for main main 4.'
09:23:23.549 'Processed issues for main main 4.'
09:23:23.549 'Processed issues for main main 4.'
09:23:23.728 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.729 'Processed issues for main main 4.'
09:23:23.877 'Processed issues for main main 4.'
09:23:23.877 'Processed issues for main main 4.'
09:23:23.877 'Processed issues for main main 4.'
09:23:23.877 'Processed issues for main main 4.'
09:23:23.878 'Processed issues for main main 4.'
09:23:23.878 'Processed issues for main main 4.'
09:23:23.878 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.014 'Processed issues for main main 4.'
09:23:24.159 'Processed issues for main main 4.'
09:23:24.160 'Processed issues for main main 4.'
09:23:24.160 'Processed issues for main main 4.'
09:23:24.160 'Processed issues for main main 4.'
09:23:24.160 'Processed issues for main main 4.'
09:23:24.160 'Processed issues for main main 4.'
09:23:24.160 'Processed issues for main main 4.'
09:23:24.279 'Processed issues for main main 4.'
09:23:24.279 'Processed issues for main main 4.'
09:23:24.279 'Processed issues for main main 4.'
09:23:24.280 'Processed issues for main main 4.'
09:23:24.280 'Processed issues for main main 4.'
09:23:24.396 'Processed issues for main main 4.'
09:23:24.396 'Processed issues for main main 4.'
09:23:24.396 'Processed issues for main main 4.'
09:23:24.396 'Processed issues for main main 4.'
09:23:24.396 'Processed issues for main main 4.'
09:23:24.396 'Processed issues for main main 4.'
09:23:24.565 'Processed issues for main main 4.'
09:23:24.565 'Processed issues for main main 4.'
09:23:24.565 'Processed issues for main main 4.'
09:23:24.565 'Processed issues for main main 4.'
09:23:24.565 'Processed issues for main main 4.'
09:23:24.566 'Processed issues for main main 4.'
09:23:24.566 'Processed issues for main main 4.'
09:23:24.566 'Processed issues for main main 4.'
09:23:24.730 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.731 'Processed issues for main main 4.'
09:23:24.911 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:24.912 'Processed issues for main main 4.'
09:23:25.028 'Processed issues for main main 4.'
09:23:25.028 'Processed issues for main main 4.'
09:23:25.028 'Processed issues for main main 4.'
09:23:25.028 'Processed issues for main main 4.'
09:23:25.028 'Processed issues for main main 4.'
09:23:25.028 'Processed issues for main main 4.'
09:23:25.146 'Processed issues for main main 4.'
09:23:25.147 'Processed issues for main main 4.'
09:23:25.147 'Processed issues for main main 4.'
09:23:25.147 'Processed issues for main main 4.'
09:23:25.147 'Processed issues for main main 4.'
09:23:25.148 'Processed issues for main main 4.'
09:23:25.260 'Processed issues for main main 4.'
09:23:25.260 'Processed issues for main main 4.'
09:23:25.261 'Processed issues for main main 4.'
09:23:25.261 'Processed issues for main main 4.'
09:23:25.261 'Processed issues for main main 4.'
09:23:25.328 'Processed issues for main main 4.'
09:23:25.328 'Processed issues for main main 4.'
09:23:25.329 'Processed issues for main main 4.'
09:23:25.329 'Processed issues for main main 4.'
09:23:25.395 'Processed issues for main main 4.'
09:23:25.395 'Processed issues for main main 4.'
09:23:25.395 'Processed issues for main main 4.'
09:23:25.457 'Processed issues for main main 4.'
09:23:25.457 'Processed issues for main main 4.'
09:23:25.458 'Processed issues for main main 4.'
09:23:25.528 'Processed issues for main main 4.'
09:23:25.528 'Processed issues for main main 4.'
09:23:25.528 'Processed issues for main main 4.'
09:23:25.615 'Processed issues for main main 4.'
09:23:25.615 'Processed issues for main main 4.'
09:23:25.615 'Processed issues for main main 4.'
09:23:25.615 'Processed issues for main main 4.'
09:23:25.698 'Processed issues for main main 4.'
09:23:25.699 'Processed issues for main main 4.'
09:23:25.699 'Processed issues for main main 4.'
09:23:25.699 'Processed issues for main main 4.'
09:23:25.791 'Processed issues for main main 4.'
09:23:25.791 'Processed issues for main main 4.'
09:23:25.791 'Processed issues for main main 4.'
09:23:25.791 'Processed issues for main main 4.'
09:23:25.791 'Processed issues for main main 4.'
09:23:25.856 'Processed issues for main main 4.'
09:23:25.856 'Processed issues for main main 4.'
09:23:25.856 'Processed issues for main main 4.'
09:23:25.929 'Processed issues for main main 4.'
09:23:25.929 'Processed issues for main main 4.'
09:23:25.930 'Processed issues for main main 4.'
09:23:25.930 'Processed issues for main main 4.'
09:23:25.995 'Processed issues for main main 4.'
09:23:25.996 'Processed issues for main main 4.'
09:23:25.996 'Processed issues for main main 4.'
09:23:26.064 'Processed issues for main main 4.'
09:23:26.065 'Processed issues for main main 4.'
09:23:26.065 'Processed issues for main main 4.'
09:23:26.127 'Processed issues for main main 4.'
09:23:26.127 'Processed issues for main main 4.'
09:23:26.127 'Processed issues for main main 4.'
09:23:26.188 'Processed issues for main main 4.'
09:23:26.189 'Processed issues for main main 4.'
09:23:26.189 'Processed issues for main main 4.'
09:23:26.189 'Processed issues for main main 4.'
09:23:26.260 'Processed issues for main main 4.'
09:23:26.260 'Processed issues for main main 4.'
09:23:26.260 'Processed issues for main main 4.'
09:23:26.325 'Processed issues for main main 4.'
09:23:26.325 'Processed issues for main main 4.'
09:23:26.325 'Processed issues for main main 4.'
09:23:26.392 'Processed issues for main main 4.'
09:23:26.392 'Processed issues for main main 4.'
09:23:26.392 'Processed issues for main main 4.'
09:23:26.392 'Processed issues for main main 4.'
09:23:26.457 'Processed issues for main main 4.'
09:23:26.458 'Processed issues for main main 4.'
09:23:26.458 'Processed issues for main main 4.'
09:23:26.515 'Processed issues for main main 4.'
09:23:26.515 'Processed issues for main main 4.'
09:23:26.515 'Processed issues for main main 4.'
09:23:26.573 'Processed issues for main main 4.'
09:23:26.573 'Processed issues for main main 4.'
09:23:26.644 'Processed issues for main main 4.'
09:23:26.644 'Processed issues for main main 4.'
09:23:26.644 'Processed issues for main main 4.'
09:23:26.644 'Processed issues for main main 4.'
09:23:26.725 'Processed issues for main main 4.'
09:23:26.725 'Processed issues for main main 4.'
09:23:26.725 'Processed issues for main main 4.'
09:23:26.726 'Processed issues for main main 4.'
09:23:26.826 'Processed issues for main main 4.'
09:23:26.827 'Processed issues for main main 4.'
09:23:26.827 'Processed issues for main main 4.'
09:23:26.827 'Processed issues for main main 4.'
09:23:26.827 'Processed issues for main main 4.'
09:23:26.897 'Processed issues for main main 4.'
09:23:26.898 'Processed issues for main main 4.'
09:23:26.898 'Processed issues for main main 4.'
09:23:26.961 'Processed issues for main main 4.'
09:23:26.961 'Processed issues for main main 4.'
09:23:26.961 'Processed issues for main main 4.'
09:23:27.026 'Processed issues for main main 4.'
09:23:27.027 'Processed issues for main main 4.'
09:23:27.027 'Processed issues for main main 4.'
09:23:27.027 'Processed issues for main main 4.'
09:23:27.108 'Processed issues for main main 4.'
09:23:27.108 'Processed issues for main main 4.'
09:23:27.109 'Processed issues for main main 4.'
09:23:27.109 'Processed issues for main main 4.'
09:23:27.195 'Processed issues for main main 4.'
09:23:27.195 'Processed issues for main main 4.'
09:23:27.195 'Processed issues for main main 4.'
09:23:27.196 'Processed issues for main main 4.'
09:23:27.294 'Processed issues for main main 4.'
09:23:27.294 'Processed issues for main main 4.'
09:23:27.295 'Processed issues for main main 4.'
09:23:27.295 'Processed issues for main main 4.'
09:23:27.295 'Processed issues for main main 4.'
09:23:27.408 'Processed issues for main main 4.'
09:23:27.409 'Processed issues for main main 4.'
09:23:27.409 'Processed issues for main main 4.'
09:23:27.409 'Processed issues for main main 4.'
09:23:27.409 'Processed issues for main main 4.'
09:23:27.479 'Processed issues for main main 4.'
09:23:27.479 'Processed issues for main main 4.'
09:23:27.479 'Processed issues for main main 4.'
09:23:27.479 'Processed issues for main main 4.'
09:23:27.579 'Processed issues for main main 4.'
09:23:27.579 'Processed issues for main main 4.'
09:23:27.579 'Processed issues for main main 4.'
09:23:27.579 'Processed issues for main main 4.'
09:23:27.579 'Processed issues for main main 4.'
09:23:27.694 'Processed issues for main main 4.'
09:23:27.695 'Processed issues for main main 4.'
09:23:27.695 'Processed issues for main main 4.'
09:23:27.695 'Processed issues for main main 4.'
09:23:27.695 'Processed issues for main main 4.'
09:23:27.812 'Processed issues for main main 4.'
09:23:27.812 'Processed issues for main main 4.'
09:23:27.812 'Processed issues for main main 4.'
09:23:27.812 'Processed issues for main main 4.'
09:23:27.812 'Processed issues for main main 4.'
09:23:27.813 'Processed issues for main main 4.'
09:23:27.927 'Processed issues for main main 4.'
09:23:27.927 'Processed issues for main main 4.'
09:23:27.927 'Processed issues for main main 4.'
09:23:27.928 'Processed issues for main main 4.'
09:23:27.928 'Processed issues for main main 4.'
09:23:27.928 'Processed issues for main main 4.'
09:23:28.028 'Processed issues for main main 4.'
09:23:28.028 'Processed issues for main main 4.'
09:23:28.028 'Processed issues for main main 4.'
09:23:28.028 'Processed issues for main main 4.'
09:23:28.029 'Processed issues for main main 4.'
09:23:28.112 'Processed issues for main main 4.'
09:23:28.112 'Processed issues for main main 4.'
09:23:28.112 'Processed issues for main main 4.'
09:23:28.112 'Processed issues for main main 4.'
09:23:28.208 'Processed issues for main main 4.'
09:23:28.209 'Processed issues for main main 4.'
09:23:28.209 'Processed issues for main main 4.'
09:23:28.209 'Processed issues for main main 4.'
09:23:28.295 'Processed issues for main main 4.'
09:23:28.295 'Processed issues for main main 4.'
09:23:28.295 'Processed issues for main main 4.'
09:23:28.295 'Processed issues for main main 4.'
09:23:28.378 'Processed issues for main main 4.'
09:23:28.378 'Processed issues for main main 4.'
09:23:28.378 'Processed issues for main main 4.'
09:23:28.378 'Processed issues for main main 4.'
09:23:28.439 'Processed issues for main main 4.'
09:23:28.439 'Processed issues for main main 4.'
09:23:28.440 'Processed issues for main main 4.'
09:23:28.506 'Processed issues for main main 4.'
09:23:28.506 'Processed issues for main main 4.'
09:23:28.506 'Processed issues for main main 4.'
09:23:28.582 'Processed issues for main main 4.'
09:23:28.583 'Processed issues for main main 4.'
09:23:28.583 'Processed issues for main main 4.'
09:23:28.583 'Processed issues for main main 4.'
09:23:28.649 'Processed issues for main main 4.'
09:23:28.649 'Processed issues for main main 4.'
09:23:28.649 'Processed issues for main main 4.'
09:23:28.726 'Processed issues for main main 4.'
09:23:28.726 'Processed issues for main main 4.'
09:23:28.726 'Processed issues for main main 4.'
09:23:28.726 'Processed issues for main main 4.'
09:23:28.796 'Processed issues for main main 4.'
09:23:28.796 'Processed issues for main main 4.'
09:23:28.796 'Processed issues for main main 4.'
09:23:28.863 'Processed issues for main main 4.'
09:23:28.863 'Processed issues for main main 4.'
09:23:28.863 'Processed issues for main main 4.'
09:23:28.863 'Processed issues for main main 4.'
09:23:28.932 'Processed issues for main main 4.'
09:23:28.932 'Processed issues for main main 4.'
09:23:28.932 'Processed issues for main main 4.'
09:23:29.008 'Processed issues for main main 4.'
09:23:29.008 'Processed issues for main main 4.'
09:23:29.009 'Processed issues for main main 4.'
09:23:29.009 'Processed issues for main main 4.'
09:23:29.067 'Processed issues for main main 4.'
09:23:29.068 'Processed issues for main main 4.'
09:23:29.068 'Processed issues for main main 4.'
09:23:29.133 'Processed issues for main main 4.'
09:23:29.133 'Processed issues for main main 4.'
09:23:29.133 'Processed issues for main main 4.'
09:23:29.201 'Processed issues for main main 4.'
09:23:29.202 'Processed issues for main main 4.'
09:23:29.202 'Processed issues for main main 4.'
09:23:29.276 'Processed issues for main main 4.'
09:23:29.276 'Processed issues for main main 4.'
09:23:29.276 'Processed issues for main main 4.'
09:23:29.276 'Processed issues for main main 4.'
09:23:29.370 'Processed issues for main main 4.'
09:23:29.371 'Processed issues for main main 4.'
09:23:29.371 'Processed issues for main main 4.'
09:23:29.371 'Processed issues for main main 4.'
09:23:29.466 'Processed issues for main main 4.'
09:23:29.466 'Processed issues for main main 4.'
09:23:29.467 'Processed issues for main main 4.'
09:23:29.467 'Processed issues for main main 4.'
09:23:29.467 'Processed issues for main main 4.'
09:23:29.546 'Processed issues for main main 4.'
09:23:29.546 'Processed issues for main main 4.'
09:23:29.546 'Processed issues for main main 4.'
09:23:29.546 'Processed issues for main main 4.'
09:23:29.626 'Processed issues for main main 4.'
09:23:29.626 'Processed issues for main main 4.'
09:23:29.626 'Processed issues for main main 4.'
09:23:29.626 'Processed issues for main main 4.'
09:23:29.699 'Processed issues for main main 4.'
09:23:29.699 'Processed issues for main main 4.'
09:23:29.700 'Processed issues for main main 4.'
09:23:29.802 'Processed issues for main main 4.'
09:23:29.802 'Processed issues for main main 4.'
09:23:29.802 'Processed issues for main main 4.'
09:23:29.803 'Processed issues for main main 4.'
09:23:29.952 'Processed issues for main main 4.'
09:23:29.952 'Processed issues for main main 4.'
09:23:29.952 'Processed issues for main main 4.'
09:23:29.952 'Processed issues for main main 4.'
09:23:29.953 'Processed issues for main main 4.'
09:23:29.953 'Processed issues for main main 4.'
09:23:30.133 'Processed issues for main main 4.'
09:23:30.133 'Processed issues for main main 4.'
09:23:30.134 'Processed issues for main main 4.'
09:23:30.134 'Processed issues for main main 4.'
09:23:30.134 'Processed issues for main main 4.'
09:23:30.135 'Processed issues for main main 4.'
09:23:30.135 'Processed issues for main main 4.'
09:23:30.135 'Processed issues for main main 4.'
09:23:30.347 'Processed issues for main main 4.'
09:23:30.347 'Processed issues for main main 4.'
09:23:30.348 'Processed issues for main main 4.'
09:23:30.348 'Processed issues for main main 4.'
09:23:30.348 'Processed issues for main main 4.'
09:23:30.348 'Processed issues for main main 4.'
09:23:30.348 'Processed issues for main main 4.'
09:23:30.432 'Processed issues for main main 4.'
09:23:30.432 'Processed issues for main main 4.'
09:23:30.432 'Processed issues for main main 4.'
09:23:30.432 'Processed issues for main main 4.'
09:23:30.565 'Processed issues for main main 4.'
09:23:30.565 'Processed issues for main main 4.'
09:23:30.565 'Processed issues for main main 4.'
09:23:30.565 'Processed issues for main main 4.'
09:23:30.565 'Processed issues for main main 4.'
09:23:30.682 'Processed issues for main main 4.'
09:23:30.682 'Processed issues for main main 4.'
09:23:30.682 'Processed issues for main main 4.'
09:23:30.682 'Processed issues for main main 4.'
09:23:30.682 'Processed issues for main main 4.'
09:23:30.753 'Processed issues for main main 4.'
09:23:30.753 'Processed issues for main main 4.'
09:23:30.753 'Processed issues for main main 4.'
09:23:30.754 'Processed issues for main main 4.'
09:23:30.863 'Processed issues for main main 4.'
09:23:30.864 'Processed issues for main main 4.'
09:23:30.864 'Processed issues for main main 4.'
09:23:30.864 'Processed issues for main main 4.'
09:23:30.864 'Processed issues for main main 4.'
09:23:30.935 'Processed issues for main main 4.'
09:23:30.936 'Processed issues for main main 4.'
09:23:30.936 'Processed issues for main main 4.'
09:23:31.015 'Processed issues for main main 4.'
09:23:31.015 'Processed issues for main main 4.'
09:23:31.015 'Processed issues for main main 4.'
09:23:31.015 'Processed issues for main main 4.'
09:23:31.133 'Processed issues for main main 4.'
09:23:31.133 'Processed issues for main main 4.'
09:23:31.133 'Processed issues for main main 4.'
09:23:31.133 'Processed issues for main main 4.'
09:23:31.134 'Processed issues for main main 4.'
09:23:31.134 'Processed issues for main main 4.'
09:23:31.212 'Processed issues for main main 4.'
09:23:31.212 'Processed issues for main main 4.'
09:23:31.212 'Processed issues for main main 4.'
09:23:31.212 'Processed issues for main main 4.'
09:23:31.311 'Processed issues for main main 4.'
09:23:31.311 'Processed issues for main main 4.'
09:23:31.311 'Processed issues for main main 4.'
09:23:31.311 'Processed issues for main main 4.'
09:23:31.379 'Processed issues for main main 4.'
09:23:31.379 'Processed issues for main main 4.'
09:23:31.379 'Processed issues for main main 4.'
09:23:31.379 'Processed issues for main main 4.'
09:23:31.451 'Processed issues for main main 4.'
09:23:31.451 'Processed issues for main main 4.'
09:23:31.451 'Processed issues for main main 4.'
09:23:31.451 'Processed issues for main main 4.'
09:23:31.520 'Processed issues for main main 4.'
09:23:31.521 'Processed issues for main main 4.'
09:23:31.521 'Processed issues for main main 4.'
09:23:31.587 'Processed issues for main main 4.'
09:23:31.587 'Processed issues for main main 4.'
09:23:31.587 'Processed issues for main main 4.'
09:23:31.649 'Processed issues for main main 4.'
09:23:31.649 'Processed issues for main main 4.'
09:23:31.649 'Processed issues for main main 4.'
09:23:31.713 'Processed issues for main main 4.'
09:23:31.713 'Processed issues for main main 4.'
09:23:31.714 'Processed issues for main main 4.'
09:23:31.783 'Processed issues for main main 4.'
09:23:31.783 'Processed issues for main main 4.'
09:23:31.783 'Processed issues for main main 4.'
09:23:31.863 'Processed issues for main main 4.'
09:23:31.863 'Processed issues for main main 4.'
09:23:31.863 'Processed issues for main main 4.'
09:23:31.863 'Processed issues for main main 4.'
09:23:31.954 'Processed issues for main main 4.'
09:23:31.954 'Processed issues for main main 4.'
09:23:31.954 'Processed issues for main main 4.'
09:23:31.955 'Processed issues for main main 4.'
09:23:31.955 'Processed issues for main main 4.'
09:23:32.044 'Processed issues for main main 4.'
09:23:32.045 'Processed issues for main main 4.'
09:23:32.045 'Processed issues for main main 4.'
09:23:32.045 'Processed issues for main main 4.'
09:23:32.114 'Processed issues for main main 4.'
09:23:32.114 'Processed issues for main main 4.'
09:23:32.114 'Processed issues for main main 4.'
09:23:32.115 'Processed issues for main main 4.'
09:23:32.184 'Processed issues for main main 4.'
09:23:32.184 'Processed issues for main main 4.'
09:23:32.184 'Processed issues for main main 4.'
09:23:32.249 'Processed issues for main main 4.'
09:23:32.250 'Processed issues for main main 4.'
09:23:32.250 'Processed issues for main main 4.'
09:23:32.318 'Processed issues for main main 4.'
09:23:32.318 'Processed issues for main main 4.'
09:23:32.319 'Processed issues for main main 4.'
09:23:32.319 'Processed issues for main main 4.'
09:23:32.395 'Processed issues for main main 4.'
09:23:32.396 'Processed issues for main main 4.'
09:23:32.396 'Processed issues for main main 4.'
09:23:32.513 'Processed issues for main main 4.'
09:23:32.514 'Processed issues for main main 4.'
09:23:32.514 'Processed issues for main main 4.'
09:23:32.514 'Processed issues for main main 4.'
09:23:32.515 'Processed issues for main main 4.'
09:23:32.515 'Processed issues for main main 4.'
09:23:32.602 'Processed issues for main main 4.'
09:23:32.602 'Processed issues for main main 4.'
09:23:32.602 'Processed issues for main main 4.'
09:23:32.602 'Processed issues for main main 4.'
09:23:32.670 'Processed issues for main main 4.'
09:23:32.670 'Processed issues for main main 4.'
09:23:32.671 'Processed issues for main main 4.'
09:23:32.671 'Processed issues for main main 4.'
09:23:32.731 'Processed issues for main main 4.'
09:23:32.732 'Processed issues for main main 4.'
09:23:32.732 'Processed issues for main main 4.'
09:23:32.800 'Processed issues for main main 4.'
09:23:32.801 'Processed issues for main main 4.'
09:23:32.801 'Processed issues for main main 4.'
09:23:32.879 'Processed issues for main main 4.'
09:23:32.879 'Processed issues for main main 4.'
09:23:32.879 'Processed issues for main main 4.'
09:23:32.879 'Processed issues for main main 4.'
09:23:32.953 'Processed issues for main main 4.'
09:23:32.953 'Processed issues for main main 4.'
09:23:32.953 'Processed issues for main main 4.'
09:23:33.013 'Processed issues for main main 4.'
09:23:33.013 'Processed issues for main main 4.'
09:23:33.013 'Processed issues for main main 4.'
09:23:33.013 'Processed issues for main main 4.'
09:23:33.071 'Processed issues for main main 4.'
09:23:33.071 'Processed issues for main main 4.'
09:23:33.131 'Processed issues for main main 4.'
09:23:33.131 'Processed issues for main main 4.'
09:23:33.131 'Processed issues for main main 4.'
09:23:33.196 'Processed issues for main main 4.'
09:23:33.196 'Processed issues for main main 4.'
09:23:33.196 'Processed issues for main main 4.'
09:23:33.197 'Processed issues for main main 4.'
09:23:33.266 'Processed issues for main main 4.'
09:23:33.267 'Processed issues for main main 4.'
09:23:33.267 'Processed issues for main main 4.'
09:23:33.347 'Processed issues for main main 4.'
09:23:33.347 'Processed issues for main main 4.'
09:23:33.347 'Processed issues for main main 4.'
09:23:33.347 'Processed issues for main main 4.'
09:23:33.413 'Processed issues for main main 4.'
09:23:33.413 'Processed issues for main main 4.'
09:23:33.413 'Processed issues for main main 4.'
09:23:33.484 'Processed issues for main main 4.'
09:23:33.484 'Processed issues for main main 4.'
09:23:33.485 'Processed issues for main main 4.'
09:23:33.485 'Processed issues for main main 4.'
09:23:33.550 'Processed issues for main main 4.'
09:23:33.550 'Processed issues for main main 4.'
09:23:33.550 'Processed issues for main main 4.'
09:23:33.629 'Processed issues for main main 4.'
09:23:33.629 'Processed issues for main main 4.'
09:23:33.630 'Processed issues for main main 4.'
09:23:33.630 'Processed issues for main main 4.'
09:23:33.698 'Processed issues for main main 4.'
09:23:33.698 'Processed issues for main main 4.'
09:23:33.698 'Processed issues for main main 4.'
09:23:33.780 'Processed issues for main main 4.'
09:23:33.780 'Processed issues for main main 4.'
09:23:33.780 'Processed issues for main main 4.'
09:23:33.781 'Processed issues for main main 4.'
09:23:33.869 'Processed issues for main main 4.'
09:23:33.870 'Processed issues for main main 4.'
09:23:33.870 'Processed issues for main main 4.'
09:23:33.870 'Processed issues for main main 4.'
09:23:33.870 'Processed issues for main main 4.'
09:23:33.955 'Processed issues for main main 4.'
09:23:33.955 'Processed issues for main main 4.'
09:23:33.956 'Processed issues for main main 4.'
09:23:33.956 'Processed issues for main main 4.'
09:23:34.031 'Processed issues for main main 4.'
09:23:34.032 'Processed issues for main main 4.'
09:23:34.032 'Processed issues for main main 4.'
09:23:34.032 'Processed issues for main main 4.'
09:23:34.115 'Processed issues for main main 4.'
09:23:34.115 'Processed issues for main main 4.'
09:23:34.115 'Processed issues for main main 4.'
09:23:34.115 'Processed issues for main main 4.'
09:23:34.223 'Processed issues for main main 4.'
09:23:34.223 'Processed issues for main main 4.'
09:23:34.223 'Processed issues for main main 4.'
09:23:34.223 'Processed issues for main main 4.'
09:23:34.223 'Processed issues for main main 4.'
09:23:34.318 'Processed issues for main main 4.'
09:23:34.318 'Processed issues for main main 4.'
09:23:34.319 'Processed issues for main main 4.'
09:23:34.319 'Processed issues for main main 4.'
09:23:34.319 'Processed issues for main main 4.'
09:23:34.397 'Processed issues for main main 4.'
09:23:34.397 'Processed issues for main main 4.'
09:23:34.398 'Processed issues for main main 4.'
09:23:34.479 'Processed issues for main main 4.'
09:23:34.480 'Processed issues for main main 4.'
09:23:34.480 'Processed issues for main main 4.'
09:23:34.480 'Processed issues for main main 4.'
09:23:34.539 'Processed issues for main main 4.'
09:23:34.539 'Processed issues for main main 4.'
09:23:34.539 'Processed issues for main main 4.'
09:23:34.614 'Processed issues for main main 4.'
09:23:34.614 'Processed issues for main main 4.'
09:23:34.614 'Processed issues for main main 4.'
09:23:34.614 'Processed issues for main main 4.'
09:23:34.680 'Processed issues for main main 4.'
09:23:34.680 'Processed issues for main main 4.'
09:23:34.680 'Processed issues for main main 4.'
09:23:34.753 'Processed issues for main main 4.'
09:23:34.753 'Processed issues for main main 4.'
09:23:34.753 'Processed issues for main main 4.'
09:23:34.813 'Processed issues for main main 4.'
09:23:34.813 'Processed issues for main main 4.'
09:23:34.813 'Processed issues for main main 4.'
09:23:34.887 'Processed issues for main main 4.'
09:23:34.888 'Processed issues for main main 4.'
09:23:34.888 'Processed issues for main main 4.'
09:23:34.888 'Processed issues for main main 4.'
09:23:35.008 'Processed issues for main main 4.'
09:23:35.009 'Processed issues for main main 4.'
09:23:35.009 'Processed issues for main main 4.'
09:23:35.009 'Processed issues for main main 4.'
09:23:35.009 'Processed issues for main main 4.'
09:23:35.090 'Processed issues for main main 4.'
09:23:35.091 'Processed issues for main main 4.'
09:23:35.091 'Processed issues for main main 4.'
09:23:35.091 'Processed issues for main main 4.'
09:23:35.091 'Processed issues for main main 4.'
09:23:35.168 'Processed issues for main main 4.'
09:23:35.169 'Processed issues for main main 4.'
09:23:35.169 'Processed issues for main main 4.'
09:23:35.169 'Processed issues for main main 4.'
09:23:35.238 'Processed issues for main main 4.'
09:23:35.238 'Processed issues for main main 4.'
09:23:35.238 'Processed issues for main main 4.'
09:23:35.301 'Processed issues for main main 4.'
09:23:35.301 'Processed issues for main main 4.'
09:23:35.301 'Processed issues for main main 4.'
09:23:35.362 'Processed issues for main main 4.'
09:23:35.363 'Processed issues for main main 4.'
09:23:35.363 'Processed issues for main main 4.'
09:23:35.434 'Processed issues for main main 4.'
09:23:35.434 'Processed issues for main main 4.'
09:23:35.434 'Processed issues for main main 4.'
09:23:35.434 'Processed issues for main main 4.'
09:23:35.501 'Processed issues for main main 4.'
09:23:35.501 'Processed issues for main main 4.'
09:23:35.501 'Processed issues for main main 4.'
09:23:35.565 'Processed issues for main main 4.'
09:23:35.565 'Processed issues for main main 4.'
09:23:35.565 'Processed issues for main main 4.'
09:23:35.637 'Processed issues for main main 4.'
09:23:35.637 'Processed issues for main main 4.'
09:23:35.637 'Processed issues for main main 4.'
09:23:35.701 'Processed issues for main main 4.'
09:23:35.702 'Processed issues for main main 4.'
09:23:35.702 'Processed issues for main main 4.'
09:23:35.702 'Processed issues for main main 4.'
09:23:35.769 'Processed issues for main main 4.'
09:23:35.769 'Processed issues for main main 4.'
09:23:35.769 'Processed issues for main main 4.'
09:23:35.838 'Processed issues for main main 4.'
09:23:35.838 'Processed issues for main main 4.'
09:23:35.839 'Processed issues for main main 4.'
09:23:35.904 'Processed issues for main main 4.'
09:23:35.905 'Processed issues for main main 4.'
09:23:35.905 'Processed issues for main main 4.'
09:23:35.905 'Processed issues for main main 4.'
09:23:35.971 'Processed issues for main main 4.'
09:23:35.971 'Processed issues for main main 4.'
09:23:35.971 'Processed issues for main main 4.'
09:23:36.046 'Processed issues for main main 4.'
09:23:36.047 'Processed issues for main main 4.'
09:23:36.047 'Processed issues for main main 4.'
09:23:36.121 'Processed issues for main main 4.'
09:23:36.122 'Processed issues for main main 4.'
09:23:36.122 'Processed issues for main main 4.'
09:23:36.122 'Processed issues for main main 4.'
09:23:36.200 'Processed issues for main main 4.'
09:23:36.200 'Processed issues for main main 4.'
09:23:36.200 'Processed issues for main main 4.'
09:23:36.200 'Processed issues for main main 4.'
09:23:36.256 'Processed issues for main main 4.'
09:23:36.257 'Processed issues for main main 4.'
09:23:36.307 'Processed issues for main main 4.'
09:23:36.307 'Processed issues for main main 4.'
09:23:36.307 'Processed issues for main main 4.'
09:23:36.382 'Processed issues for main main 4.'
09:23:36.382 'Processed issues for main main 4.'
09:23:36.382 'Processed issues for main main 4.'
09:23:36.453 'Processed issues for main main 4.'
09:23:36.454 'Processed issues for main main 4.'
09:23:36.454 'Processed issues for main main 4.'
09:23:36.454 'Processed issues for main main 4.'
09:23:36.516 'Processed issues for main main 4.'
09:23:36.516 'Processed issues for main main 4.'
09:23:36.516 'Processed issues for main main 4.'
09:23:36.573 'Processed issues for main main 4.'
09:23:36.573 'Processed issues for main main 4.'
09:23:36.573 'Processed issues for main main 4.'
09:23:36.624 'Processed issues for main main 4.'
09:23:36.624 'Processed issues for main main 4.'
09:23:36.687 'Processed issues for main main 4.'
09:23:36.687 'Processed issues for main main 4.'
09:23:36.687 'Processed issues for main main 4.'
09:23:36.752 'Processed issues for main main 4.'
09:23:36.752 'Processed issues for main main 4.'
09:23:36.752 'Processed issues for main main 4.'
09:23:36.752 'Processed issues for main main 4.'
09:23:36.820 'Processed issues for main main 4.'
09:23:36.820 'Processed issues for main main 4.'
09:23:36.820 'Processed issues for main main 4.'
09:23:36.882 'Processed issues for main main 4.'
09:23:36.882 'Processed issues for main main 4.'
09:23:36.882 'Processed issues for main main 4.'
09:23:36.952 'Processed issues for main main 4.'
09:23:36.952 'Processed issues for main main 4.'
09:23:36.952 'Processed issues for main main 4.'
09:23:37.035 'Processed issues for main main 4.'
09:23:37.035 'Processed issues for main main 4.'
09:23:37.035 'Processed issues for main main 4.'
09:23:37.035 'Processed issues for main main 4.'
09:23:37.101 'Processed issues for main main 4.'
09:23:37.101 'Processed issues for main main 4.'
09:23:37.101 'Processed issues for main main 4.'
09:23:37.182 'Processed issues for main main 4.'
09:23:37.182 'Processed issues for main main 4.'
09:23:37.182 'Processed issues for main main 4.'
09:23:37.182 'Processed issues for main main 4.'
09:23:37.251 'Processed issues for main main 4.'
09:23:37.251 'Processed issues for main main 4.'
09:23:37.251 'Processed issues for main main 4.'
09:23:37.251 'Processed issues for main main 4.'
09:23:37.318 'Processed issues for main main 4.'
09:23:37.319 'Processed issues for main main 4.'
09:23:37.319 'Processed issues for main main 4.'
09:23:37.690 'Processed issues for main main 4.'
09:23:37.690 'Processed issues for main main 4.'

I’m not sure why it looks like it would keep on logging forever until I manually stop the execution. The ‘collect’ block still collects just the 8 issues : it’s not what I intended it to collect because I’d expect this to collect issues per main item, but neither does it explain the endless logs.

Hi @jd-forem

Thank you for providing all these details. The best practice here is to flatten your original list into a single array and loop through it with a single for <> collect loop. This should prevent unwanted results.

Try using the following in an evaluate block instead of the if block:

issues.flatMap((issue) =>
  issue.issues.map((innerIssue) => ({
    id: issue.id,
    name: issue.name,
    description: issue.description,
    issueId: innerIssue.id,
    issueName: innerIssue.name
  }))
);

This will merge the sub-array with the parent object so you end up with a list of objects that has all the info you need to perform your process. Empty issue list objects will be filtered out.

Your resulting flow will look something like this:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.