Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Regex Validator not recognizing the default text

Jon Karnofsky
Contributor
September 11, 2023

I have a multiline custom text field which I would like have a default value, but validate during one transition that the value is still not the default value. I have a strong preference to not use Jira Automation, but the Workflow editor (but it's definitely a fallback option!)

I have put in a multiline default value (this is an example, my actual one is 9 lines):


Line 1: 

Line 2: 

Line 3: 


I have a required field validator (which works fine), and I have added a Regex validator:

^(?!Line\s1:\s\nLine\s2:\s\nLine\s3:\s)[\s\S]*$

So this does a negative lookahead for the specific value and fails if it find it exactly (even if there's other stuff directly after). But, it passes if there's even one character difference, which is what I want.

So here's what's weird that I don't understand and need help with:

  1. I create the issue, the default value is in the field fine
  2. I go from Status A to Status B it allows the transition (which it shouldn't)
  3. I revert back to Status A
  4. I edit the field, copy the entire field, simply paste the entire thing on top of itself, and save the field
  5. I try to transition to Status B, the failed validation message occurs

Is there something special about default values that it doesn't register as either empty, or the actual default value text? I don't understand why it seems to accept the text value if I paste over the default value with itself.

Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
Atlassian, Team '25 Europe, Atlassian conference, AI-powered teamwork, Atlassian events, keynote speakers, Barcelona tech conference, Atlassian Williams Racing, Carlos Sainz, Jenson Button, Mike Cannon-Brookes, Anu Bharadwaj, Atlassian Rovo

Atlassian Williams Racing is coming to Team '25 Europe 🏎️

Discover the teamwork and precision behind success on and off the track. See how this high-performing team makes the impossible possible. Be one of the first 100 customers to register for a chance to win 2 tickets to an Atlassian Williams 2026 race.

Register now
AUG Leaders

Atlassian Community Events