Edgewall Software
Modify

Opened 11 years ago

Last modified 6 months ago

#9740 new defect

Impossible to CC a username with spaces

Reported by: david+trac@… Owned by:
Priority: normal Milestone: 1.6.1
Component: ticket system Version: 0.12-stable
Severity: normal Keywords: username spaces cc fieldrefactoring
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It is impossible to CC a username with spaces in the username such as "Joe Bloggs", attempting to enter that treats as two different users Joe and Bloggs.

Suggest first attempt to establish that usernames separated by commas as known usernames before splitting by spaces for known usernames.

Attachments (3)

ticket_9740.patch (7.1 KB ) - added by Cinc-th 8 months ago.
Patch to enable spaces in user names for the cc list. Includes changes to functional and unit tests
ticket_9740_dbupgrade.patch (8.9 KB ) - added by Cinc-th 8 months ago.
Database upgrade and test cases for previous patch. (Enabling spaces in user names for the cc list)
ticket_9740-2.patch (15.0 KB ) - added by Cinc-th 8 months ago.
Complete patch to enable spaces in user names for the cc list. Includes environment upgrade, changes to functional and unit tests and additional unit tests.

Download all attachments as: .zip

Change History (15)

comment:1 by Christian Boos, 11 years ago

Milestone: unscheduled

If you can come up with a simple patch for the above suggestion, then why not, PatchWelcome. Otherwise I'm not too keen on making the CC: code more complex than it already is, when we're targeting an overhaul of the notification system (#1660).

comment:2 by Dirk Stöcker, 7 years ago

CC is sanitized with "," for some time now. Couldn't spaces be dropped as separarator completely? Would make code easier.

Otherwise quoting should be supported.

in reply to:  2 comment:3 by Christian Boos, 7 years ago

Keywords: fieldrefactoring added
Milestone: unschedulednext-major-releases

Replying to dstoecker:

CC is sanitized with "," for some time now. Couldn't spaces be dropped as separarator completely? Would make code easier.

+1, but would probably need an upgrade step to be sure that all existing lists are normalized with ',' separator.

comment:4 by anonymous, 7 years ago

This really need to be fixed.. drop spaces as separator!

comment:5 by mapx, 7 years ago

still unfixed after 4 years ?

by Cinc-th, 8 months ago

Attachment: ticket_9740.patch added

Patch to enable spaces in user names for the cc list. Includes changes to functional and unit tests

comment:7 by Cinc-th, 8 months ago

This patch enables spaces for user names in the cc field. Cc entries were saved in the database with , as separator for some time and the documentation says all entries have to be separated by , anyway.

As a sideeffect the contents of ticket fields with type list (for example the keywords field) is shown with comma as separator, too (property box at the top of tickets). That's only a rendering thing. No code was added to allow entries with spaces for such fields. This was done to keep the code changes to a minimum.

Because of the new rendering a functional test had to be adapted.

AFAICS this change doesn't lead to any regressions. The tickets #10828 and #8597 were tested without problems.

And to really top it off, this ticket just crossed the 10 years threshold: ThisTicketWasOpenedTenYearsAgo. So we are good to go ;-).

comment:8 by Ryan J Ollos, 8 months ago

Just quickly looked at the patch, but I believe we'd need a database upgrade step to handle existing space-separated entries.

in reply to:  8 comment:9 by Cinc-th, 8 months ago

Replying to Ryan J Ollos:

Just quickly looked at the patch, but I believe we'd need a database upgrade step to handle existing space-separated entries.

I was thinking about that too. The comma was introduced with r3240 quite some time ago. Question is if there are untouched 15 years old tickets with a populated cc list…

by Cinc-th, 8 months ago

Attachment: ticket_9740_dbupgrade.patch added

Database upgrade and test cases for previous patch. (Enabling spaces in user names for the cc list)

comment:10 by Ryan J Ollos, 8 months ago

Milestone: next-major-releases1.5.4

Will look at for the upcoming release. Thanks!

by Cinc-th, 8 months ago

Attachment: ticket_9740-2.patch added

Complete patch to enable spaces in user names for the cc list. Includes environment upgrade, changes to functional and unit tests and additional unit tests.

comment:11 by Cinc-th, 8 months ago

I added some unit tests for cc filed handling and created a single patch file.

Patch includes now:

  • fix for spaces in usernames (same as first patch)
  • changes to existing unit and functional tests to account for the fix (same as first patch)
  • database upgrade to make sure cc field is properly formatted (same as second patch)
  • additional unit tests for cc field handling (new)

comment:12 by Ryan J Ollos, 6 months ago

Milestone: 1.5.41.6.1

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.