I have a custom field on all of our JIRA issues that contains a projectId from a supporting project management system. That projectId should always be, "PV{12345}" or "XP{12345}" or "MB{123}" where the content within the {} is variable and may contain a "."
Is there a way to enforce this pattern on issues when they're created? I've been searching through the forums without much luck.
TIA!
Using the JIRA Suite Utility (JSU) add-on, I was able to use the "Regular Expression Check (JSU)" workflow validator which validates field contents against a regular expression during a workflow transition.
I used the following regex: (PV+[0-9]{5,}|XP+[0-9]{5,}|MB#\d{2}.\d{2}|MB#\d+(?!.)) and added this validator to the "Create" function of an issue.
When the criteria is not met, I notify the user with the following message, "Please enter a valid Project Number using the following formatting: PV12345, XP12345, or MB#12.3"
Wondering if my answer helped you achieve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One way to achieve this would be through a workflow validator. Basically you would add the field in a workflow transition screen. Then add a JSU Regular expression validator to the transition. This would check the field value before transition.
You could also use scriptrunner validator. You would probably need to know some groovy scripting for this. For JSU, you just need a regular expression that would match your project id'.s
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.