Defect #8759

Setting issue attributes from mail should be case-insensitive

Added by Alex Shulgin over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-07-07
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:1.2.1
Resolution:Fixed Affected version:

Description

Currently, when you want to set issue attribute, e.g. Status, from mail you would add (in the mail body):

Status: Closed

The attribute name can be set in either case: status, STATUS, etc., but it fails to recognize the attribute value unless it's set in title-case, i.e. exactly as it appears in web interface.

The attached patch fixes this problem by titleizeing certain attribute values extracted from the mail body.

0001-Setting-issue-attributes-by-mail-allow-lower-mixed-c.patch Magnifier (2.55 KB) Alex Shulgin, 2011-07-07 08:44

Associated revisions

Revision 6199
Added by Jean-Philippe Lang over 6 years ago

Fixed: Setting issue attributes from mail should be case-insensitive (#8759).

History

#1 Updated by Etienne Massip over 6 years ago

  • Target version set to Candidate for next minor release

#2 Updated by Jean-Philippe Lang over 6 years ago

  • Status changed from New to Closed
  • Target version changed from Candidate for next minor release to 1.2.1
  • Resolution set to Fixed

Fixed in r6199.

This patch assumes that values are titleized in the database which may not be the case. The fix uses a different approach based on reusable scopes and applies to priorities and categories as well.

#3 Updated by Alex Shulgin over 6 years ago

Jean-Philippe Lang wrote:

Fixed in r6199.

This patch assumes that values are titleized in the database which may not be the case. The fix uses a different approach based on reusable scopes and applies to priorities and categories as well.

Thank you! I've had the feeling that my approach can be improved, but didn't know where to look exactly.

Btw, aren't we making code less DRY with all these named_scope :named, ...? Can be extracted in a module for sure.

#4 Updated by Jean-Philippe Lang over 6 years ago

Alex Shulgin wrote:

Btw, aren't we making code less DRY with all these named_scope :named, ...? Can be extracted in a module for sure.

Indeed.

Also available in: Atom PDF