Single Mailbox - Multiple Projects
Hello,
Our situation is as follows:
- one mailbox that receives messages from some controlled domains
- for each sender domain, we have a separate YouTrack project
Is there a way to dispatch the emails to their proper YouTrack project based on the domain name? Other than creating email filters that put emails in different folders (we don't have that functionality on the server side).
Thanks!
Please sign in to leave a comment.
Hi!
I'm Sergey from the YouTrack team.
This would be by far the most efficient approach, as the whole mailbox feature was designed with this flow in mind. However, you should still be able to come up with a workaround using a workflow feature. A workflow is an automation tool. Basically, you create a script that automates issue-related tasks. If you are not familiar with this functionality, please refer to our tutorial.
Here's the general approach:
store the sender's domain in a custom field. You can check a ready-to-use example to use as a basis
once the issue is reported, parse this field's value
depending the sender email, move the issue to the corresponding project. You can do it via the applyCommand() method. The command itself is
move <project name>
If you get any questions, please let me know.
Thanks Sergey!
I was thinking the same thing, but, if the mailbox integration creates a ticket in project, then the workflow moves it to another project, then, someone replies to that email and gets picked up by the mailbox integration, would the moved ticket get a comment? Or, would a new ticket get created?
Thanks,
Constantin.
Thanks for your response.
When it comes to comments, the project plays no direct role (unless there's some overall misconfiguration there). The logic used to add a comment is described here: https://www.jetbrains.com/help/youtrack/server/Mailbox-Integration.html#mailbox-integration-comments.
Thanks Sergey!
We'll give that a try.
-Constantin
Sure, feel free to reach out if you face any issues.