Workflow with email validation in the input channel with online from
Hi, I'm trying to work with the workflow to validate my email input field
By using the “JavaScript Editor” and defined new workflow to get the online form when it's summited in order to validate the email field and refuse to create a ticket if email does not respect my REGEX
// Regular expression to validate email format, var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
But I'm new with YouTrack and I'm not sure whish rights steps I need to flow
Please sign in to leave a comment.
Hi!
I'm Sergey from the YouTrack team.
Firstly, if you are not familiar with the workflow functionality, please refer to our tutorial. It covers the basics you need to know to start.
To prevent an action, one can use the workflow.check() method. As for checking issue or ticket creation, you can use the becomesReported property of the Issue entity.
Hi Sergey Merzlov your answer is appreciated and rely help full
and I didn't know that workflow.check exist and I'm glad that pointed out.
I'm trying to get the source of creation ticket (FeedbackForm or MailboxChannel) by using ctx.issue.channel but I have face this error message: “Processing Issue 3-159: Cannot resolve property FeedbackForm.name” and look like my “ctx.issue” created from the FeedbackForm not contain the object “channel”?
I don't understand why if you can help with:
Hello,
Thank you for your response.
It appears that you've encountered this bug: JT-82509 Workflows: issue.channel property doesn't work. It has already been fixed and is pending release. Please feel free to vote for this issue. Your vote helps us measure how many customers encounter this problem, and you'll also be subscribed to the issue’s notifications. To vote, sign in to JetBrains YouTrack and click the thumbs-up icon.
I apologize for any trouble caused. If you have any questions, please let me know.