Mailbox Integration - initial mail as comment

We're experiencing the problem that customers are sending us VERY long emails - which are only partly describing the problem correctly. So we have to scroll down a long text every time we want to read the comments. In addition customers are mostly NOT very good to describe problems. So we very often need to attach additional text to the description field of a ticket to really describe the problem.

What will solve both problems at once is to keep the description field of the issue empty and attach the initial email as comment. This would allow us to create our own descriptions of the problem, reply would still work correctly in the process and we don't need to read / scroll over the initial e-mail over and over again.

As far as I understand it this is a thing of the mailbox integration feature. Can anybody think of a workaround in the workflow feature doing this with the current mailbox integration and still keep the entire notification process correct?

0
3 comments
Official comment

Hi!

I'm Sergey from the Youtrack team.

Thank you for the message. I'm happy to help you.

It should definitely be possible via a workflow. Below is a sample that you can use. When an issue is created and there're no comments, it creates a new comment from the description text and clears the description. You can adjust it as needed. 

var entities = require('@jetbrains/youtrack-scripting-api/entities');

exports.rule = entities.Issue.onChange({
title: 'Replace description with comment',
guard: function(ctx) {
return ctx.issue.becomesReported && ctx.issue.comments.isEmpty();
},
action: function(ctx) {
var issue = ctx.issue;
var text = issue.description;
var author = issue.reporter;
issue.addComment(text, author);
issue.description = '';
},
requirements: {

}
});

P.S. if you'd like to get in touch with our support team directly for a quick answer to your question, please fill in a direct request at https://youtrack-support.jetbrains.com/hc/en-us/requests/new We'll be happy to help.

Hello Sergey,

I've added those lines to my " collect-emails-from-reported-issue" - this works like a charm! Thank you very much.

Kind regards,
Andreas

0

Thank you for the update. Happy to hear that it helped.

If any questions appear, feel free to ask. 

0

Please sign in to leave a comment.