Feature request: Use User in email template

Bug #488889 reported by Sharoon Thomas http://openlabs.co.in
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Power Email
Fix Released
Wishlist
Sharoon Thomas http://openlabs.co.in

Bug Description

For example, I have configured poweremail to send automatically an email when an order is confirmed. Is it possible to display in the email the login of the person who did the "Confirm order", i.e. the person who initiated the workflow transition ?

Regards,

Alexis de Lattre

Related branches

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Implementing the feature

Changed in poweremail:
assignee: nobody → Sharoon Thomas (sharoonthomas)
importance: Undecided → Wishlist
milestone: none → 0.7
status: New → In Progress
Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Hi Sixela,

A new feature has been introduced in commit 137 to incorporate this:

You can use ${env['user']} env stands for environment and I propose to introduce more variables into it.
the env[xyz] will return the browse record equivalent.

So if you want to use the name of the user then you can use:

${env['user'] and env['user'].name or ''}

Changed in poweremail:
status: In Progress → Fix Committed
Revision history for this message
Alexis de Lattre (alexis-via) wrote :

It's working great !

Thank you very much Sharoon !

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

By the way, it would be great to be able to access the database name with ${env['db']} for example.

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Feature request accepted.

Changed in poweremail:
status: Fix Committed → In Progress
Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Can you check and revert? I have put in the feature

Changed in poweremail:
status: In Progress → Fix Committed
Revision history for this message
Alexis de Lattre (alexis-via) wrote :

It is working very well. Users can now put ${env['db']} to print the database name in their mail templates !

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Thanks for the update

Changed in poweremail:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.