Hi All,
I'm trying to make a Custom Filed characters limitation while creating an epic.
I've tried 2 possibilities but it didn't work, let me share them with you.
1.
Go to Project Setting > Workflows
Edit the workflow for the affected issue type
Switch to Diagram mode
On Create transition, click on the Validators
Choose Add Validator > Regular Expression Check
- > Well I do not have such an option in my Jira ....
2.
I used a simple script validator :
String myCF = cfValues["Summary"]; if (myCF.length() == 4 && myCF.isInteger()) { 1 == 1; }
Well in that case if I put more than 4 character , indeed there is a error msg, but if I put 4 or less characters there also the error msg.
Do I have something wrong in my script ?
Thank you, dear community, for your help :)
Regards,
Wojtek
Hello,
Your script shold look like this:
String myCF = cfValues["Summary"]; if (myCF.length() == 4 && myCF.isInteger()) { return true; }
return false;
Hi Alexey,
Thank you for your answer.
I've tried your script and I have the same situation as with the 1st one.
" I put more than 4 character , indeed there is a error msg, but if I put 4 or less characters there also the error msg. "
It's very strange.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Wojtek Drozdz
Are you trying to validate some custom field that calls summary or system field summary?
If system it should be like this:
issue.summary.length() < 5
this condition validates that summary have 4 characters or fewer
And for custom field:
cfValues['Summary'].length() < 5
In your condition you also checks that summary field is integer. Is this requriment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Thank you.
My question is for a Custom Field - not the "system" filed.
Unfortunately your code didn't work :/
Have you maybe another solution ?
Thank you again !
BR,
Wojtek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.