プロジェクト

全般

プロフィール

Vote #75504

完了

MailHandler should ignore bogus issue strings [some-string#1234] in subject

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

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

0%

予定工数:
category_id:
29
version_id:
88
issue_org_id:
17705
author_id:
3866
assigned_to_id:
3866
comments:
8
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Currently the mail handler will try to parse anything that remotely resembles square brackets containing a hash followed by a number, whatever else happens to be in front of the hash in the brackets. This leads the mail handler to try to parse things like:

[12345678901234567890#1234]

and

[some-string#1234]
used by other systems.

The proposed patch Requires the hash to be either preceded by the opening bracket @[@ or a space.


journals

No problem merging that as long as it has some more tests for failing strings we introduce... and for good ones too, as I can't find tests in @test/unit/mail_handler_test.rb@. Maybe it's time to refactor the logic in @MailHandler#dispatch@ too. Felix: can you handle that ? Thanks!
--------------------------------------------------------------------------------
Jean-Baptiste Barth wrote:
> No problem merging that as long as it has some more tests for failing strings we introduce... and for good ones too, as I can't find tests in @test/unit/mail_handler_test.rb@.

Sure, can you assign it back to me so that I can remember it? Thanks :-)

> Maybe it's time to refactor the logic in @MailHandler#dispatch@ too.

I'll see about that, but I guess it's out of scope for this ticket.
--------------------------------------------------------------------------------
Here we go!
--------------------------------------------------------------------------------
Jean-Baptiste, there's already tests for good strings of sorts with the test that try to import emails and make sure they've been imported correctly. I fear the best I can do would be to provide 1 or 2 examples of incoming emails that should fail, or even with bad and good strings pointing to different issues.
--------------------------------------------------------------------------------
Here's a patch with 2 test-emails containing subjects with strings we don't want to match anymore pointing to the wrong issue and strings we want to match pointing to the right one.
--------------------------------------------------------------------------------
Is this planned to be included in a release soon? I think this would make the email integration with OTRS much simpler!
--------------------------------------------------------------------------------
Fix committed in r13593 with tests edited, thanks.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

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

いいね!0
いいね!0