Smart Rules - applying in order? (ideally "on import')

Hi everyone.

I’ve been getting to know the product for a couple of weeks. Loving it, will probably implement it for both my Dad to replace “Neat” (don’t even start) and for me to replace Hazel + other scripting.

I’ve managed to get lots of things working with the help of the documentation and especially this forum - so many active, clever, and helpful contributors!

However, I’m stuck on applying a sequence of Smart Rules on documents newly imported to a specific inbox.

Rather than complicate things with my actual goals / specific rules, I’ve created some really simple rules to help debug and can’t get them to work the way I’d expect. Core is the issue of whether rules apply in order, or not, or perhaps even “all at once” if “on import” (that’s what seems to happen in my testing, but isn’t what forum posts seem to imply ( - I can’t include a link it seems - ://discourse.devontechnologies.com/t/smart-rules-execution-order/67336).

I’ve made five nearly identical rules, numbered 1-5 and in that order (top to bottom) in DT. All they do is check if the document is pdf, and apply a tag (on import) “one”, “two” etc. for each rule. If I import some pdfs, every document ends up with all five tags. So far, so good.

If I change rule three by adding “stop processing rules”, all documents still get all five tags (which doesn’t seem to indicate it’s processing them sequentially.

If I change rule three to add a condition “Tag is not “two””, all give tags are still applied… still seems wrong.

What’s even more confusing is that if I turn rule three off (remove the “perform” check mark so the name is greyed out) and it’s not applied on import, it shows no matching files (I assume that’s the number to the right of the name?) - which I’d take to mean the rule is written correctly, hence me thinking all five are just applying simultaneously on import.

I also tried changing the trigger to “on tagging”, and then rule three just didn’t apply (didn’t seem to pick up the import rules applying tags).

If there is a better way to apply rules in order on import (rather than messing around with things like “every hour”), please let me know.

Thanks in advance.

Will.

One option is to run a single Smart Rule on import. This Smart Rule runs any number of Apply Rule actions to call other Smart Rules in the desirable order.

You haven’t specified an example use case in the original post. You might want to run a single Smart Rule containing multiple chained actions, rather than multiple Rules with the same trigger conditions.

2 Likes

The order matters.

A screenshot of your rules would be great as this might be a bug.

The conditions are matched right when an event (e.g. import) triggers rules and then all matching rules are queued for execution. Therefore this is working as intended.

It’s indeed a bug, the next maintenance release will fix this.

1 Like

Awesome. The community (and company reps) support is why I’m willing to invest in this.

Do you still want a screenshot or logs or anything else?

@meosky’s advice is a work around enough for me at the moment, but keen to know which version patches this.

Will.

1 Like

Well, the next release will be 3.9.7. However, we don’t comment publicly on release timeframes.

Yes, I’ve noted the position on commenting in advance. I suppose what I meant was it would be good to know when the release that is meant to fix this is available, so I can validate and rework some of my rules.

Ta.

I was able to reproduce & fix this in the meantime, therefore it’s not necessary anymore.