#871  [service desk] Add option to trim replies send out by 1dev
Released
wojtek opened 2 years ago

Usually in service desk scenarios, email notification send out with the reply contains something along the line of ##- Please enter your reply above this line -## so when processing reply to such email notification, everything below that line is cut before inserting as a comment to the issue.

OneDev changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
OneDev commented 2 years ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 years ago
Previous Value Current Value
Closed
Released
OneDev commented 2 years ago

State changed as build #2904 is successful

wojtek commented 2 years ago

I updated to OneDev 7.4.21, configured the string but it's not included in any of the emails send. The notification only has:

Wojciech commented

comment

Reply this email to post comment, or visit https://<domain>/projects/33/issues/6#IssueComment-1856 for details

---------------------------------------------
You received this notification as you are participating in this topic. Mail to <local>+issueunsubscribe~502@<domain> with any content to unsubscribe
Robin Shen commented 2 years ago

I was thinking you want to add the marker line in the issue creation email instead of comment reply...


For comment reply email, OneDev tries its best to automatically trim all quoted contents. It does so by searching for the line containing the system email address specified in mail setting, and remove that line and all contents below that line. 

I tested several email clients (Gmail, Outlook, Mac Mail) and this works fine. What is your email client? And what is the content posted at OneDev as comment if you reply the notification email?
wojtek commented 2 years ago

Hi, I replied to this issue by email (to also check how the comment/quote would be handled) but it seems it never arrived.

Anyhow, this was the comment: No, the idea was to avoid problems with "trying to be smart" and detecting quotations and simply have a token that would explicitly mark cut-off part. The majority of helpdesk systems do this for this exact reason, as it's simply a bullet-proof solution and virtually reduces chances of something incorrect slipping by to 0% To summarize, reiterate - the proposed feature intends to include "quotation token" in all outgoing emails so that all replies to such email would not include any quotation. Such quotation token should be the very first line in the outgoing notification email.

Robin Shen commented 2 years ago
I understand your point. I hope that OneDev can trim quoted content using existing information instead of adding an extra setting. 

I also replied this via email, and seems that OneDev is trimming quotation correctly without any marker line. I will test with Thunderbird though. 
wojtek commented 2 years ago
I think that my previous intent to reply by mail was dropped by having slightly different `from` address, which didn't match one registerd on code.onedev.io. Hopefully it will work this time

Regarding the issue, I'm aware that you may be reluctant to add such funcion, but considering there is already a textbox and supossedly rudimentary handling of it, I see no downside to making it trim for comment replies.

And instead of chasing rabbits and trying to do "smart detection" it would be better to have something which works 100% times and would be resilient to any changes / odd clients.

El 21/08/2022 a las 11:55, OneDev escribió: > Robin Shen commented > >

>
> >
>
>
> I understand your point. I hope that OneDev can trim quoted content using existing information instead of adding an extra setting.  >
>
>
>
>
> I also replied this via email, and seems that OneDev is trimming quotation correctly without any marker line. I will test with Thunderbird though.  >
> > Reply this email to post comment, or visit https://code.onedev.io/projects/160/issues/871#IssueComment-2430 for details > > --------------------------------------------- > You received this notification as you are participating in this topic. Mail to support+issueunsubscribe~912@onedev.io with any content to unsubscribe

wojtek commented 2 years ago

OK, it "worked" this time and I was able to respond by email. As you can see the quotation wasn't trimmed.

The quote itself is garbled. And there is also no handling of markdown formatting in the incoming emails (see from missing formatting)

Robin Shen commented 2 years ago

Please upgrade to build #2909 to see if it works. I hope to use as less setting as possible. Also the "reply above this line" approach will generate below content when reply even if you put the marker on the first line:

On Aug 23, 2022, OneDev wrote:
#--- reply above this line ---#

You need to manually delete the On Aug 23, 2022, OneDev wrote: thing, which is cubersome.

Robin Shen commented 2 years ago

BTW, the marker line setting in service desk is also removed.

wojtek commented 2 years ago
Hi, just updated to #2909 and lo and behold, the email reply got included in it's completeness with all quotes and so on.

I understand that adding option for the tiniest possible thing could be problematic (see maintenance burden) but in this case, this virtually makes using 1dev quite problematic.

Yes, I'm aware that token-line would result in additional single line with the timestamp but it's miniscule problem if we endup with a couple of times more of pointless content with previous comments quotes…

wojtek commented 2 years ago

OK, I tested it some more with notification generated by newer version and it seems to work better.

Do you happen to cut-off the quotation based on the "from" (i.e. ~OneDev Notifier, which seems to be quite unique)?

Robin Shen commented 2 years ago

Yes that is true. OneDev will cut quotation based on this special name, and it should work fine for most mail clients.

wojtek commented 2 years ago

So, in the end it's almost the same as custom token-line :-)

Robin Shen commented 2 years ago

Only difference is that this line is generated by mail client as the very first quoted line at time of replying. So you does not need to remove anything when reply. And the notification email itself will be a little bit neater...

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
onedev/server#871
Please wait...
Page is in error, reload to recover