Page 1 of 1

Wrong rule fires, how to fix it?

PostPosted: Sun Jan 27, 2013 6:12 am
by hepabolu
From my phone provider I can download 2 versions of the monthly invoice, one with the calls specified, one without. I want the first for my own administration and the last for declaration at work. Both PDFs get the same download name.
So I wrote 2 rules to figure out which is which. They basically do this:

Specified invoice:
if all match
- name contains <provider accountnumber>
- contents contain "start time"
then
- rename file
- move file to home/phone

Unspecified invoice:
if all match
- name contains <provider accountnumber>
then
- rename file
- move file to work/yyyy-mm

They are in the order above.

If I disable the second rule, the first fires as expected, but if I enable the second rule, the second always fires.

What's going wrong?

Re: Wrong rule fires, how to fix it?

PostPosted: Sun Jan 27, 2013 11:53 am
by a_freyer
So just to be clear, the rules are in the order above (i.e. first rule is above the second rule)? I can't come up with a reason why this behavior presents.

Does the first rule match against your work PDFs as well when the second rule is disabled?

Re: Wrong rule fires, how to fix it?

PostPosted: Mon Jan 28, 2013 5:00 pm
by Mr_Noodle
Did you check the preview? Pause the folder and download the files and check the preview and report back.

I get the feeling that it's more timing based. Disabling the second rule should have no affect on whether the first one matches.

Re: Wrong rule fires, how to fix it?

PostPosted: Tue Jan 29, 2013 4:10 pm
by hepabolu
Yes, the first rule is above the second. I actually moved the second rule down a few other rules to lessen the chance that the second one fires before the first has the time to figure out the conditions (if that is relevant).

OK, I tried once again today, switched off the Hazel rules, downloaded both files and checked the rules. Turns out that I used a specific word in the content to distinguish one from the other and now the word was used in both versions.
After I used another word, it looks like the rules fire as expected.