Roundup Tracker - Issues

Issue 2550936

classification
email gateway discards changes to messages and files (done with subject tag) if there is a message body
Type: behavior Severity: normal
Components: Mail interface Versions: devel
process
Status: open remind
:
: : rouilj
Priority: normal : patch

Created on 2017-03-11 01:50 by rouilj, last changed 2023-07-20 02:15 by rouilj.

Files
File name Uploaded Description Edit Remove
message_file_prop_update_via_email.patch rouilj, 2017-03-11 02:36 patch to make prop setting for files and messages work if there is a message body or file attachment.
Messages
msg5942 Author: [hidden] (rouilj) Date: 2017-03-11 01:50
When updating an issue via email with the following tag at the end:

   [messages=+25;files=+10]

the change only took effect if there was no message created or file
added. Otherwise setting messages/files on the subject line is
ignored.

The key is not to trigger/run this code (from create_msg, but similar
in create_file):
 
             if self.nodeid:
                 # add the message to the node's list
                 messages = self.cl.get(self.nodeid, 'messages') # **
                 messages.append(message_id)
                 self.props['messages'] = messages
 
It looks like this code gets the message list from the database and
discards the pending changes. So the modified version of the message
field, created by parsing the subject properties, is discarded.
msg5943 Author: [hidden] (rouilj) Date: 2017-03-11 02:36
Here is the patch.

In retrospect, I wonder if ignoring the files and messages property
setting was intentional and the rationale was just not recorded in
the file.

I am going to have this sit here for others to comment if fixing
this is a good idea.

-- rouilj
History
Date User Action Args
2023-07-20 02:15:48rouiljsetresolution: remind
2017-03-18 15:45:34rouiljsettitle: email gateway discards changes to messages and files if there is a message body -> email gateway discards changes to messages and files (done with subject tag) if there is a message body
2017-03-11 02:37:00rouiljsetkeywords: + patch
assignee: rouilj ->
messages: + msg5943
files: + message_file_prop_update_via_email.patch
2017-03-11 01:50:52rouiljsetstatus: new -> open
2017-03-11 01:50:44rouiljcreate