Centuran / OTRS-Community-Edition

((OTRS)) Community Edition is a freely available, open source, web-based ticketing system used for Help Desk, Customer Service, and IT Service Management purposes.
https://otrscommunityedition.com/
GNU General Public License v3.0
45 stars 10 forks source link

Add subject prefixes to be removed #20

Open ikedas opened 1 year ago

ikedas commented 1 year ago

Description

In this PR, I add variants in several languages of the prefixes like RE: / Fwd: that should be scraped off the subject. That is, those listed in [1][2][3] that I could actually find on the Internet, or some I have discovered independently.

In addition, several other improvements have been made: In some languages, a space is also placed before a colon [4]; a fullwidth colon is sometimes used after the prefix in Chinese ideographs; the space is not always placed after a colon.

Question

I think this PR could be applied to Znuny and OTOBO. Should I submit separate PRs for each?

References

[1] Wikipedia: "List of email subject abbreviations#Abbreviations in other languages". [2] GNU Mailman 2.1: Mailman/Handleres/CookHeaders.py. [3] Sympa 6.2: Sympa/Regexps.pm. [4] Bug #893290.

odyniec commented 1 year ago

In this PR, I add variants in several languages of the prefixes like RE: / Fwd: that should be scraped off the subject. That is, those listed in [1][2][3] that I could actually find on the Internet, or some I have discovered independently.

Thanks for this, this will surely be useful. However, there's an existing mechanism in place that assumes the different prefixes are stored in system configuration parameters rather that being hardcoded in Kernel::System::Ticket, and I think it would be better to extend these parameters to include the prefixes that you have collected. We'll try to do that for the next release -- let's keep this PR open until that happens.

In addition, several other improvements have been made: In some languages, a space is also placed before a colon [4]; a fullwidth colon is sometimes used after the prefix in Chinese ideographs; the space is not always placed after a colon.

We'll make sure to take this into account (probably best to add a few tests for these cases).

Question

I think this PR could be applied to Znuny and OTOBO. Should I submit separate PRs for each?

Yes, those projects are independent from us, so probably that's the best course of action.

ikedas commented 1 year ago

In this PR, I add variants in several languages of the prefixes like RE: / Fwd: that should be scraped off the subject. That is, those listed in [1][2][3] that I could actually find on the Internet, or some I have discovered independently.

Thanks for this, this will surely be useful. However, there's an existing mechanism in place that assumes the different prefixes are stored in system configuration parameters rather that being hardcoded in Kernel::System::Ticket, and I think it would be better to extend these parameters to include the prefixes that you have collected. We'll try to do that for the next release -- let's keep this PR open until that happens.

Thank you for being interested in this. I look forward for the next replease!

In addition, several other improvements have been made: In some languages, a space is also placed before a colon [4]; a fullwidth colon is sometimes used after the prefix in Chinese ideographs; the space is not always placed after a colon.

We'll make sure to take this into account (probably best to add a few tests for these cases).

I updated and added test cases.

Question

I think this PR could be applied to Znuny and OTOBO. Should I submit separate PRs for each?

Yes, those projects are independent from us, so probably that's the best course of action.

All right, I'll see how this PR ends up first and then decide what to do.