Setup info for new issue notifications is incorrect
Answered
In one of the setup steps to enable sending new issue notification to users who create issues through emails, it says the following:
If you choose to send a notification, just add the following lines of code to the Collect related emails on issue creation rule of the Notify Multiple Unregistered Users workflow (right before the Last message related emails=null
line):
var reporterEmail = Last message related emails.split(" ",preserveAllTokens).first sendMail(reporterEmail, "Your subject", "Your email body")
The problem is - the line "Last message related emails=null" does not exist anywhere in that code!
Can someone please help?
Please sign in to leave a comment.
Hi,
The documentation is gonna be updated soon. This code is written in old API. In the new (JS-based) API you need to add the following:
Thanks Mariya - that works!
However, the email does not include the ID of the issue created. How do I include that in my initial issue creation email?
And in fact, if there is a way to include the email text that the user entered for the issue, that would be amazing.
Thanks,
Sunil
Hello,
I am very sorry for the delay.
You can modify the workflow considering the following:
1.
issue.id
will return the ID of the created issue (https://www.jetbrains.com/help/youtrack/standalone/v1-Issue.html#properties);2.
issue.summary
andissue.description
will return the summary and dewcription respectively (https://www.jetbrains.com/help/youtrack/standalone/v1-Issue.html#properties).