プロジェクト

全般

プロフィール

Vote #70283

完了

Setting issue attributes from mail should be case-insensitive

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
開始日:
2011/07/07
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
35
issue_org_id:
8759
author_id:
29374
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリEmail receiving_29 にセット
  • 対象バージョン1.2.1_35 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0