Wrong rule fires, how to fix it?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Wrong rule fires, how to fix it? 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?
hepabolu
 
Posts: 16
Joined: Sat Aug 11, 2012 10:47 am

Re: Wrong rule fires, how to fix it? 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?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: Wrong rule fires, how to fix it? 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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Wrong rule fires, how to fix it? 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.
hepabolu
 
Posts: 16
Joined: Sat Aug 11, 2012 10:47 am


Return to Support