Import csv if statement doesn't work on hledger field name

rules:

fields , date, desc1, desc2, amount
# set description to 2 fields
description %desc1 %desc2

referencing description does not work

if %description Bankgiro inbetalning
 account2 revenue

but the named fields work

if %desc2 Bankgiro inbetalning
 account2 revenue

Shouldn't using description for the if statement also work?
Easy to work around, just thought I'd mention it and maybe worth creating an issue? Or maybe I am missing something?

If rules can only test the csv fields - not the hledger field values, which may not be fully constructed yet.
https://hledger.org/1.42/hledger.html#matchers

1 Like

(Don't use a hledger field name here, unless it is also a CSV field name.)

Got it