Defect #11552

MailHandler does not match assignee name with spaces

Added by Kameron Hott over 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Email receiving
Target version:2.1.0
Resolution:Fixed Affected version:1.4.1

Description

We are working with the imap email ticket creation. It basically works except when the name has a - in it. Example would be First name = "IS -" and Last name = "Operations". If the First name is IS and the Last name = "Operations", the email processes fine. I saw while Googling around that I could use the Login instead which is isoperations. Tried that and it fails.

We are on version 1.4.1.stable.9612(MySql).
Our mail client is Exchange.

defect-11552.patch Magnifier (2.47 KB) William Roush, 2012-07-31 21:11

defect-11552.patch Magnifier (3.13 KB) William Roush, 2012-07-31 21:31

Associated revisions

Revision 10236
Added by Jean-Philippe Lang about 5 years ago

MailHandler: Match assignee on the full display name (#11552).

History

#1 Updated by William Roush over 5 years ago

Confirmed, this test fails when the user has a dash in their first name.

However assigning to the user "dashtest" works fine (the user's log in name).

#2 Updated by William Roush over 5 years ago

William Roush wrote:

Confirmed, this test fails when the user has a dash in their first name.

However assigning to the user "dashtest" works fine (the user's log in name).

Actually let me correct myself, the problem is that there is a space in the first name, I think Redmine is splitting on that space, and fails to look up the user.

Setting the name to "IS- Operations" works fine.

So I think it's doing first name "IS", last name "- Operations".

#3 Updated by Jean-Philippe Lang over 5 years ago

I think Redmine is splitting on that space, and fails to look up the user

You're perfectly right.

#4 Updated by William Roush over 5 years ago

Alright, here is a patch that adds a test that replicates the issue and a fix (Redmine 2.0 default branch).

I added the last combined check as a last-ditch check (re-iteration), I'm a bit worried about catching other names by accident so I only want to grab it if all other name look-ups fail first.

Of course the devs can move that somewhere else if they think that isn't a problem.

#5 Updated by William Roush over 5 years ago

#6 Updated by Kameron Hott over 5 years ago

  • Status changed from New to Resolved

Thank you, that patch did fix it. The email works now with IS - Operations. Have a great day and thank you for the very quick fix!!

#7 Updated by William Roush over 5 years ago

Edit: sorry, scratch that, I had a filter issue.

#8 Updated by Jean-Philippe Lang over 5 years ago

  • Target version set to 2.1.0

#9 Updated by Jean-Philippe Lang about 5 years ago

  • Subject changed from redmine:email:receive_imap assignee name with a - fails. to MailHandler does not match assignee name with spaces
  • Category set to Email receiving
  • Status changed from Resolved to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r10236 with a slightly different approach, thanks for pointing this out.

Also available in: Atom PDF