First Last Prev Next    No search results available
Details
: Edit As New duplicates content unless Stationery is insta...
Bug#: 26626
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P2
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Axel Grude <axel.grude@gmail.com>
Assigned To: Axel Grude <axel.grude@gmail.com>

Attachments
2.1 pre 6 (535.82 KB, application/x-xpinstall)
2018-12-29 08:20, Axel Grude
no flags Details
2.1 pre 7 (535.94 KB, application/x-xpinstall)
2018-12-29 09:42, Axel Grude
no flags Details
2.1 pre 106 (529.64 KB, application/x-xpinstall)
2019-02-23 06:28, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2018-12-29 07:28
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.
------- Comment #1 From Axel Grude 2018-12-29 08:20:07 -------
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.
------- Comment #2 From Axel Grude 2018-12-29 09:42:22 -------
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.
------- Comment #3 From Axel Grude 2019-02-23 06:28:50 -------
Created an attachment (id=8596) [details]
2.1 pre 106

Latest prerelease version, lots of changes
------- Comment #4 From Axel Grude 2019-07-28 06:45:16 -------
Resolved Fixed: Release 2.1 - 28/07/2019

First Last Prev Next    No search results available