Issue updating a thing based on multiple dependencies

Hey everyone,

I’m struggling in trying to do something on my productivity app since a few days. :sweat_smile:

I have a few tasks and each task can have “blockers” and “dependencies”. For example, one task can’t be displayed when its blocker is not completed yet. And each task can have multiple blockers.

Here is my workflow:

  1. When I click on a button, this task is marked as Scheduled (make change to a thing)
  2. Then, I update all the tasks which have this completed task as “blocker” to change their status to “Available”. (make change to a list of things: do a search for, or parent group task is a blocker for)

This part is working when the number of “blockers” is 1.

If the task I’m trying to change status to available contains 2 blockers and the task status can only be changed to available if the blockers are both marked as “complete” (and not only one of them), then it’s still changing the task to available, even if it recognizes that it has 2 blockers and only one of them is marked as complete.

See the attached file.

In this picture, I’m using a custom event, that’s why you see “task:filtered” instead of “do a search for” or else. I tried to do it directly, with a backend workflow, with a custom event… same issue unfortunately.

Any idea whatI’m doing wrong? I’m just trying to update all the tasks status, only when all the associated “blockers” (blocked by, or is a blocker for depending on the context) are marked as completed.

Thanks a lot! :slight_smile:

Hi there,

I’m not sure I have fully grasped your data structure, but I think the problem you are running in to is the “contains” element of your Advanced Filter. I believe this is filtering every Task that has a blocker with at least one status of complete, rather than Tasks with Blockers that only have statuses that are complete.

A potential fix is to add another filter in your advanced filter. I think it would be something along the lines of:

Advanced: This Task’s Is Blocked By:each item’s Status:filtered:count is 0

For the second filter: This Status is not Complete.

The logic of the above is that a Task is included if it is has 0 instances of Blockers with a Status of anything other than Complete. But, this also means if there are no Blockers in that Task it might also be marked as Complete (I’m not sure if you want or don’t want that).

I hope that helps! I could be completely off the mark here if I have misjudged your data structure.

1 Like

That’s perfect, it’s the solution! I got so mixed up by all the scenarios from my workflows that I didn’t think of it clearly!

Thank you so much @chris.fajou! :star_struck::muscle:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.