Add project name to email template

Is there a variable for inserting the project name in the email template? I’ve tried {$project} and {$invoice.project}, but it doesn’t get replaced with the project name.

Hi,

@david can you please advise?

Using $project.name has worked for me in the past. However, if there is more than one project in the invoice then it will only include one.

Upon further investigation, I’ve found that $project.name does work if the invoice has a project associated with it (thanks to @xabster), but if the invoice is not associated with a project then it puts the literal text ‘$project.name’ in the email instead, which is not ideal.
Is there a way to specify that a variable should only be included if it actually has a value?

Update: Proposed a fix in PR#9675

1 Like