On the portal we have one user picker field. During the creation of the request from the portal we would like to validate the user picker field that the user is provided the correct email address and user needs be available on the Jira system. If the user does not available or not provided the correct email address then it should show an error on the portal.
We are using the JMWE, JWT and scriptrunner apps.
Hi @Kishore ,
so that the public can also participate in the solution we worked out via our support, here again briefly summarized:
The goal was to distinguish between users with a 'default' username and users where the username is an email address, e.g. demo.user vs. demo.user@example.com
This was achieved with a boolean validator by Jira Workflow Toolbox with the help of some regular expression magic:
NOT matches(%{nnnnn},"([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)")
in this scenario, nnnnn had to be replaced with the field code of the single user picker used to validate.
Cheers
Thorsten
Hi,
If you have a User Picker field, only existing, valid users can be input so I'm not sure what you're trying to validate here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @David Fischer ,
Yes, that's true. Basically we want to restrict the customer to provide the username on the user picker field and if any username is contains with email address as a username and if they provide email address on the user picker field then Jira should not allow to create a request from the portal.
Regards,
Kishore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm still confused, because a User picker will not let customers enter anything that's not a valid user (it's a user picker, not a freeform text input). If the customer types an email address and that email address matches a valid user, then it will be accepted - but then it's a valid user...
Or are you trying to accept only specific users (from specific groups, or with specific project roles, etc.)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.