Issue295

Title title is changed by email updates when only whitespace had changed
Priority bug Status chatting
Superseder Nosy List eric.araujo, ezio.melotti, r.david.murray
Assigned To Topics

Created on 2009-07-21.12:36:01 by r.david.murray, last changed 2012-05-22.00:52:10 by ezio.melotti.

Messages
msg1445 (view) Author: r.david.murray Date: 2009-07-21.12:36:00
When someone responds to an issue email, the tracker will change the title when
the only thing that has changed is whitespace (generally a tab introduced by the
respondent's email client).  It would be better if whitespace changes were ignored.
msg1452 (view) Author: ezio.melotti Date: 2009-07-27.02:59:52
When a new issue is created or a message is added the title could be passed to
re.sub('[\t\n\r\f\v]+', '', title). This will remove all the whitespaces except
normal spaces (I don't see any valid reason to have tabs, newlines and similar
in the title anyway).
This regex will preserve the original normal spaces (so if the user put two or
more spaces they will be saved as they are).
A simpler approach is to use re.sub('\s+', ' ', title) (or '
'.join(title.split())) to replace all the whitespaces with a single space.
msg2080 (view) Author: ezio.melotti Date: 2011-06-07.11:41:46
This can be fixed in roundup-src/roundup/mailgw.py:1026 [0].
The split/join approach should be OK.  IIUC the title might still be changed if someone inserts for example a double space or a tab, and then the split/join removes it when someone replies via mail, but after the first normalization there shouldn't be other changes given by tabs inserted by the mail client.

[0]: http://svn.python.org/view/tracker/roundup-src/roundup/mailgw.py?view=markup
msg2081 (view) Author: r.david.murray Date: 2011-06-08.01:50:59
There is actually another problem here that this doesn't address.  What happens periodically is that someone changes the issue title, then someone else replies to a previous message on the issue, and the title gets changed back to the old title.  What would be ideal would be if we can detect that the change is sourced in an email submission and disallow changing the issue title from the email.  I think this would be acceptable since if I recall correctly we already disallow changing properties via the special syntax in the email title.
msg2082 (view) Author: r.david.murray Date: 2011-06-08.01:52:06
An advantage of doing the fix the way I just suggested is that it would be done in a reactor and not require a patch to the roundup source.
msg2083 (view) Author: ezio.melotti Date: 2011-06-09.17:18:13
Apparently there's no way for a detector to know if a message comes from an email or from the web interface, so using a detector to prevent title changes from emails is not possible.
The whitespace normalization can still be done with a detector though.  Another option is to do it in the mailgw, adding a config option to enable/disable it and submit the patch upstream to Roundup.
For the record the problem of the title changed while replying to an older message has been reported in #395.
msg2499 (view) Author: ezio.melotti Date: 2012-05-22.00:52:10
> Apparently there's no way for a detector to know if a message
> comes from an email or from the web interface

See http://issues.roundup-tracker.org/issue2550731
History
Date User Action Args
2012-05-22 00:52:10ezio.melottisetmessages: + msg2499
2011-06-09 17:18:13ezio.melottisetmessages: + msg2083
2011-06-08 01:52:06r.david.murraysetmessages: + msg2082
2011-06-08 01:50:59r.david.murraysetmessages: + msg2081
2011-06-07 11:41:47ezio.melottisetmessages: + msg2080
2010-08-27 00:14:55eric.araujosetnosy: + eric.araujo
2009-07-27 02:59:52ezio.melottisetstatus: unread -> chatting
nosy: + ezio.melotti
messages: + msg1452
2009-07-21 12:36:01r.david.murraycreate