Bugzilla@Mozdev – Bug 26626
Edit As New duplicates content unless Stationery is installed
Last modified: 2019-07-28 06:45:16
You need to log in before you can comment on or make changes to this bug.
When right-clicking a message and selecting the "Edit as New Message" option is selected, the content of the email is duplicated in composer. This does not happen if the Stationery Add-on is installed and the option "Support Stationery addon" is enabled. "Template Support" was meant to enable updating fields in templates when a new meessage was generated from a template. AS of https://dxr.mozilla.org/comm-central/source/comm/mailnews/compose/public/nsIMsgComposeParams.idl#16 Thunderbird 60 has the new types nsIMsgCompType.EditAsNew (15) - for Mails being composed with the context menu as described above. In this case, no processing of the message is desired. nsIMsgCompType.EditTemplate (16) - for editing templates themselves (and saving them as templates). In this case, processing of ST4 variables should be explicitely disabled. The older type: nsIMsgCompType.Template - is used when a new message is generated from a tempalte (here processing variables can be useful, as we can use %date% and late resolving variables.) this should be used the same way as whene writing a New email (not a reply) Problem: in Thunderbird 52, nsIMsgCompType.Template is also used for "Edit as New". For this case, processing should be avoided.
Created an attachment (id=8570) [details] 2.1 pre 6 Test version: this will disable processing on templates in Thunderbird 52. It also will not duplicate the body contents when selecting "Edit as New Message" In Thunderbird 60 the template source code will be processed similar to the "New" template when writing a new message. This allows using variables like %to(name)% when writing new mails from thunderbird templates. When the command "Edit template" is selected, the variables will be *not* replaced. This makes it possible to edit variable fields in templates without loosing them until a new Mail is created "New Message From template" or double clicking a template. In that case variables are resolved.
Created an attachment (id=8571) [details] 2.1 pre 7 Added functionality when a current version of Stationery is enabled in Thunderbird 60 - Stationery does not fire the event in case a template from the Thunderbird templates folder is edited. Hence I added an additional call to SmartTemplateā“'s notifyComposeBodyReady() function which carries out template variable replacement.
Created an attachment (id=8596) [details] 2.1 pre 106 Latest prerelease version, lots of changes
Resolved Fixed: Release 2.1 - 28/07/2019