Smart rules stop matching files and/or never execute actions on certain files

Hi folks,

I feel like I did enough due diligence and I am now out of ideas.

I am a relatively new DEVONthink user and I am in the process of settings some Smart Rules to automatically organise various files such as bank statements, utility bills, and so on.

I have a dozen of rules that all work like a charm and look more or less like this:

All my files are imported, not indexed. The import happens via the Global Inbox location in Finder; the files are either copied there by me or moved by Hazel (no Folder Actions/scripts/etc.) involved.

Recently I have been trying to add a few extra rules of the same nature, and I have been running into very bizarre issues with them.

Below is a new rule that I’d like to use for organising my account statements from Chase (sensitive data removed):

When I import a file, no matches are displayed:

However, as soon as I make any meaningless change to my rule — such as checking the Highlight Occurrences box, then unchecking it, and then saving — the match appears.

At that point, I assume the whole sequence is past the On Import event, so the actions are not triggered.

However, I’d expect switching the trigger to Every Minute would help — but it does not. Immediately upon switching to Every Minute, the actions got executed. While that looked promising at first, importing 4 new matching files results in exactly the same behaviour: no matches displayed, no actions performed — even after a few minutes. Doing the same dance with some meaningless change to the rule gets it all to work (I guess due to some cache getting invalidated).

I also tried expanding the triggers to include On Creation etc., but to no avail.

I feel like either I am missing something fundamental here or it’s an actual bug, so any help would be truly appreciated.

Welcome @motohedgehog

  • Does the rule work if you move it above other rules in the Smart Rules section of the Navigate sidebar?

  • Does the behavior persist after quitting and relaunching DEVONthink?

PS: While it may be okay for testing, I wouldn’t keep the Every Minute event trigger unless it’s actually needed (and it’s rare circumstances in which it is).

Thank you for looking into this @BLUEFROG!

  • The rule position doesn’t make any difference — as you can see from my screenshots, I deliberately put it at the top to rule out (no pun intended) any ordering issues
  • Yes, the behaviour persists across DEVONthink restarts and even across reboots

One interesting thing I’ve noticed is that Hazel seems to do execute the same kind of logic just fine — that is, for my other rules that work, the end-to-end pipeline looks like this:

  1. Download something into the Downloads directory
  2. Hazel picks up the file based on a certain set of predicates and moves it to DEVONthink inbox
  3. DEVONthink uses the same predicates to route it into a specific category in my DB

And unlike in DEVONthink, the predicates in Hazel that are responsible for processing those problematic Chase statements, work just fine.

P. S. To be clear, my original post is based strictly on manual import via Inbox location in Finder to avoid any red herrings coming from Hazel, but I thought it might be worth mentioning since it seems to at least partially share the predicate system with DEVONthink.

You’re welcome :slight_smile:

  1. In DEVONthink, hold the Option key and select Help > Report Bug.
  2. Drag and drop your smart rule to a new folder in the Finder.
  3. Drag and drop a Chase document into the same folder.
  4. In the Finder, Control-click > Compress it, and attach it to your ticket so I can take a look here.

Thanks!

Thank you — just filed a ticket. Considering the sensitivity of the document, I am a tad wary of sending it as is, however I was able to repro the issue on a redacted copy.

If that’s not good enough, please let me know and I’ll see what else I can do.

Everything is confidential and never leaves our hands. Thanks!

Just gonna share some knowledge with other users: the problem was solved after @BLUEFROG kindly passed the devs’ advice to quote the terms, i.e. use "Sort code: 60-84-07" rather than Sort code: 60-84-07.

It would be great to add some information to the docs because I couldn’t find any guidance on when the quotes are strictly necessary and most of my rules work just fine without them.

1 Like

The quotes are recommended if the text is not just an alphanumeric string and therefore could conflict with the search syntax.